Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed May 23, 2023
1 parent c407db8 commit de36749
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions tests/compiler/asm/test_asm_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ def __init__():
foo_label = "_sym_internal_foo___"
qux_label = "_sym_internal_qux___"

# all the labels should be in all the unoptimized asms
# qux reachable from unoptimized initcode, foo not reachable.
assert qux_label + "_deploy" in initcode_asm
assert foo_label + "_deploy" not in initcode_asm

# all labels should be in unoptimized runtime asm
for s in (foo_label, qux_label):
assert s + "_deploy" in initcode_asm
assert s + "_runtime" in runtime_asm

c = CompilerData(code, no_optimize=False)
Expand Down
2 changes: 0 additions & 2 deletions vyper/codegen/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ def _runtime_ir(runtime_functions, global_ctx):
["label", "fallback", ["var_list"], fallback_ir],
]

# note: dead code eliminator will clean dead functions
runtime.extend(internal_functions_ir)

return runtime
Expand Down Expand Up @@ -186,7 +185,6 @@ def generate_ir_for_module(global_ctx: GlobalContext) -> tuple[IRnode, IRnode]:
func_ir = generate_ir_for_function(
f, global_ctx, skip_nonpayable_check=False, is_ctor_context=True
)
# note: we depend on dead code eliminator to clean dead function defs
deploy_code.append(func_ir)

else:
Expand Down

0 comments on commit de36749

Please sign in to comment.