Skip to content

Commit

Permalink
chore: leave todo, come back and resolve immutable offsets at compile…
Browse files Browse the repository at this point in the history
… time
  • Loading branch information
skellet0r committed Nov 12, 2021
1 parent 90c8594 commit 417e6aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions vyper/old_codegen/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ def parse_Name(self):
else:
immutable_section_size = self.context.global_ctx.immutable_section_size
offset = self.expr._metadata["type"].position.offset
# TODO: resolve code offsets for immutables at compile time
return LLLnode.from_list(
["sub", "codesize", immutable_section_size - offset],
typ=var.typ,
Expand Down
1 change: 1 addition & 0 deletions vyper/old_codegen/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def parse_regular_functions(

immutables = [_global for _global in global_ctx._globals.values() if _global.is_immutable]

# TODO: enable usage of the data section beyond just user defined immutables
if len(immutables) > 0:
# find position of the last immutable so we do not overwrite it in memory
# when we codecopy the runtime code to memory
Expand Down

0 comments on commit 417e6aa

Please sign in to comment.