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: missing pc map for empty functions #3202

Merged

Conversation

charles-cooper
Copy link
Member

the IR generated inside of a function (that is not generated in stmt.py or expr.py) was not annotated with the source pos. this annotates the root node of the function with the source pos as the fallback.

What I did

fix #3200

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 IR generated inside of a function (that is not generated in stmt.py
or expr.py) was not annotated with the source pos. this annotates the
root node of the function with the source pos as the fallback.
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2022

Codecov Report

Merging #3202 (c73063b) into master (f992492) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3202   +/-   ##
=======================================
  Coverage   88.43%   88.43%           
=======================================
  Files          88       88           
  Lines       11046    11046           
  Branches     2338     2338           
=======================================
  Hits         9769     9769           
  Misses        822      822           
  Partials      455      455           
Impacted Files Coverage Δ
.../codegen/function_definitions/external_function.py 100.00% <100.00%> (ø)

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

@charles-cooper charles-cooper marked this pull request as ready for review December 24, 2022 22:36
@charles-cooper charles-cooper changed the title [wip] fix: missing pc map for empty functions fix: missing pc map for empty functions Dec 24, 2022
Copy link
Contributor

@bout3fiddy bout3fiddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@charles-cooper charles-cooper merged commit 7ea1f88 into vyperlang:master Dec 31, 2022
@charles-cooper charles-cooper deleted the fix/empty_fn_source_map branch December 31, 2022 17:10
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.

pc_pos_map for small methods is empty
4 participants