-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: call internal functions from constructor (#2496)
this commit allows the user to call internal functions from the `__init__` function. it does this by generating a call graph during the annotation phase and then generating code for the functions called from the init function for during deploy code generation this also has a performance benefit (compiler time) because we can get rid of the two-pass method for tracing frame size. now that we have a call graph, this commit also introduces a topsort of functions based on the call dependency tree. this ensures we can compile functions that call functions that occur after them in the source code. lastly, this commit also refactors vyper/codegen/module.py so that the payable logic is cleaner, it uses properties instead of calculations more, and cleans up properties on IRnode, FunctionSignature and Context.
- Loading branch information
1 parent
03b2f1d
commit 4b44ee7
Showing
22 changed files
with
383 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .function_signature import FunctionSignature, VariableRecord | ||
from .function_signature import FrameInfo, FunctionSignature, VariableRecord |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .common import generate_ir_for_function, is_default_func, is_initializer # noqa | ||
from .common import generate_ir_for_function # noqa |
Oops, something went wrong.