Skip to content

Commit

Permalink
change prefix of internal functions to their ir id
Browse files Browse the repository at this point in the history
  • Loading branch information
sandbubbles committed Nov 24, 2024
1 parent 1170e27 commit 4a95adb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/unit/cli/vyper_json/test_output_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def has_suffix_key(data: dict, suffix: str) -> bool:
return True
return False

assert has_suffix_key(out, "<unknown>: foo")
assert has_suffix_key(out, "0: foo")
assert has_suffix_key(out, "bar")
assert has_suffix_key(out, "A.vy: foo")
assert has_suffix_key(out, "1: foo")
assert not has_suffix_key(out, "faa")
2 changes: 1 addition & 1 deletion vyper/compiler/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def build_metadata_output(compiler_data: CompilerData) -> dict:
for fn_t in module_t.exposed_functions:
assert isinstance(fn_t.ast_def, vy_ast.FunctionDef)
for rif_t in fn_t.reachable_internal_functions:
sigs[rif_t.ast_def.module_node._metadata["type"]._id + ": " + rif_t.name] = rif_t
sigs[str(rif_t._ir_info.func_t._function_id) + ": " + rif_t.name] = rif_t
sigs[fn_t.name] = fn_t

def _var_rec_dict(variable_record):
Expand Down

0 comments on commit 4a95adb

Please sign in to comment.