You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: constructor context for internal functions (#3388)
this commit fixes two related issues with initcode generation:
- nested internal functions called from the constructor would cause a
compiler panic
- internal functions called from the constructor would not read/write
from the correct immutables space
the relevant examples reproducing each issue are in the tests. this
commit fixes the issue by
- not trying to traverse the call graph to figure out which internal
functions to include in the initcode. instead, all internal functions
are included, and we rely on the dead code eliminator to remove unused
functions
- adding a "constructor" flag to the codegen, so we can distinguish
between internal calls which are being generated to include in
initcode or runtime code.
0 commit comments