Skip to content

Commit

Permalink
feat[ir]: emit djump in dense selector table (#3849)
Browse files Browse the repository at this point in the history
emit the possible jump targets in the dense selector table for the venom
pipeline to pick up.
  • Loading branch information
harkal authored Mar 8, 2024
1 parent 7a083d3 commit cf37ec2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vyper/codegen/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ def _selector_section_dense(external_functions, module_t):
error_msg="bad calldatasize or callvalue",
)
x.append(check_entry_conditions)
x.append(["jump", function_label])
jump_targets = [func.args[0].value for func in function_irs]
jump_instr = IRnode.from_list(["djump", function_label, *jump_targets])
x.append(jump_instr)
selector_section.append(b1.resolve(x))

bucket_headers = ["data", "BUCKET_HEADERS"]
Expand Down

0 comments on commit cf37ec2

Please sign in to comment.