Skip to content

Commit

Permalink
add a note on reads
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Sep 21, 2023
1 parent fe9f6ea commit 3ba2740
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vyper/codegen/ir_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ def gas(self):
def is_complex_ir(self):
# list of items not to cache. note can add other env variables
# which do not change, e.g. calldatasize, coinbase, etc.
# reads (from memory or storage) should not be cached because
# they can have side effects.
do_not_cache = {"~empty", "calldatasize", "callvalue"}

return (
Expand Down

0 comments on commit 3ba2740

Please sign in to comment.