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

chore: remove dead code in IR generation #3389

Closed
wants to merge 6 commits into from

Conversation

tserg
Copy link
Collaborator

@tserg tserg commented May 8, 2023

What I did

Remove dead code in IR generation

  • constant_override kwarg in FunctionSignature.from_definition of vyper/ast/signatures/function_signature.py is never set to True, and therefore the if branch is never hit.
  • parse_Name in vyper/codegen/stmt.py is never reachable because a statement can no longer be a standalone Name node. This was the original form of the equivalent function a while back. Also removed code related to a single statement Name node being "vdb", which "vdb" file no longer exists in the repo.

How I did it

Delete code.

How to verify it

Nothing.

Commit message

chore: remove dead code in IR generation

Description for the changelog

Remove dead code in IR generation.

Cute Animal Picture

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

@codecov-commenter
Copy link

codecov-commenter commented May 8, 2023

Codecov Report

Merging #3389 (c58312f) into master (3c83947) will decrease coverage by 0.28%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master    #3389      +/-   ##
==========================================
- Coverage   88.92%   88.65%   -0.28%     
==========================================
  Files          86       86              
  Lines       10726    10716      -10     
  Branches     2440     2436       -4     
==========================================
- Hits         9538     9500      -38     
- Misses        787      817      +30     
+ Partials      401      399       -2     
Impacted Files Coverage Δ
vyper/evm/opcodes.py 100.00% <ø> (ø)
vyper/ir/compile_ir.py 94.02% <ø> (+0.31%) ⬆️
vyper/utils.py 83.25% <ø> (ø)
vyper/ast/signatures/function_signature.py 92.52% <100.00%> (+3.33%) ⬆️
vyper/codegen/stmt.py 90.45% <100.00%> (+1.06%) ⬆️

... and 4 files with indirect coverage changes

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

@@ -28,13 +28,6 @@ def set_evm_verbose_logging():
logger.setLevel("DEBUG2")


# Useful options to comment out whilst working:
# set_evm_verbose_logging()
Copy link
Member

Choose a reason for hiding this comment

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

let's keep this please, it ends up being useful from time to time :)

func_ast, # vy_ast.FunctionDef
global_ctx,
interface_def=False,
constant_override=False, # CMC 20210907 what does this do?
Copy link
Member

Choose a reason for hiding this comment

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

let's try to do keep all refactoring of FunctionSignature in one place going forward, see #3390 (comment)

@tserg tserg marked this pull request as draft May 9, 2023 01:06
@tserg tserg closed this May 9, 2023
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.

3 participants