Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pc maps for function selectors #3487

Conversation

charles-cooper
Copy link
Member

the existing pc annotator was annotating functions too early - when we do the check in the selector table rather than when the function is actually entered into. this moves the pc annotation to a few instructions later in the codegen so that tracers will not be confused as to where the function actually starts.

What I did

How I did it

How to verify it

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

the existing pc annotator was annotating functions too early - when we
do the check in the selector table rather than when the function is
actually entered into. this moves the pc annotation to a few
instructions later in the codegen so that tracers will not be confused
as to where the function actually starts.
@charles-cooper charles-cooper requested a review from fubuloubu June 16, 2023 18:19
@charles-cooper charles-cooper marked this pull request as draft June 16, 2023 18:35
Comment on lines 466 to 467
#if self.source_pos:
# o += f"/* POS {self.source_pos} */ "

Check notice

Code scanning / CodeQL

Commented-out code

This comment appears to contain commented-out code.
@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2023

Codecov Report

Merging #3487 (48a0c65) into master (299352e) will decrease coverage by 16.36%.
The diff coverage is 100.00%.

❗ Current head 48a0c65 differs from pull request most recent head fc2627c. Consider uploading reports for the commit fc2627c to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           master    #3487       +/-   ##
===========================================
- Coverage   89.18%   72.83%   -16.36%     
===========================================
  Files          84       84               
  Lines       10970    10776      -194     
  Branches     2506     2456       -50     
===========================================
- Hits         9784     7849     -1935     
- Misses        774     2313     +1539     
- Partials      412      614      +202     
Impacted Files Coverage Δ
.../codegen/function_definitions/external_function.py 100.00% <100.00%> (ø)
vyper/codegen/ir_node.py 89.49% <100.00%> (-1.76%) ⬇️
vyper/ir/compile_ir.py 86.20% <100.00%> (-7.56%) ⬇️

... and 54 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@charles-cooper
Copy link
Member Author

this is superseded by #3496 because the method id checks were moved out of external function body code generation into module.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants