Commit graph

7 commits

Author SHA1 Message Date
Evgeniy Stratonikov
b66b853285 compiler: drop stack after inline
Some control-flow statements drop stack items, for example
`return` when it is used inside of `range` loop.
For inlined calls this `return` should drop only portion of stack
which belongs to inlined call.
2021-03-01 11:48:42 +03:00
Evgeniy Stratonikov
0a4ff9d3e4 compiler: allow to use inlined functions to init globals 2021-02-25 15:12:16 +03:00
Evgeniy Stratonikov
cf459002f7 compiler: allow to inline global variables 2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
6e560c6c9f compiler: allow to inline var arg functions 2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
3484025065 compiler: load constants directly on inline 2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
27e60455c7 compiler: do not introduce excessive locals on inline
When function call-site parameter is an identifier,
we may load it directly. Currently it can be also modified,
this will be fixed in a separate commit.
2021-02-15 18:48:33 +03:00
Evgeniy Stratonikov
1ae0d022dd compiler: support basic inlining 2021-02-15 18:48:33 +03:00