Roman Khimov
f12f871432
compiler: use new defer stack for inlined functions, fix #2281
...
Inlined functions shouldn't care about outer scope defer statements, they
can't.
2021-11-30 18:04:02 +03:00
Roman Khimov
a91581fa16
compiler: correctly handle defer in functions without return values
...
Fix #2253 .
2021-11-12 19:36:59 +03:00
Evgeniy Stratonikov
b693d54282
compiler: count local variables on the go
...
Create local variables as they are needed and remove `INITSLOT`
if there were no locals. This helps to eliminate a whole class
of bugs when calculated and real amount mismatched.
2021-05-19 11:50:07 +03:00
Evgenii Stratonikov
3d8c7af66c
compiler: handle void call to recover()
...
Other builtins such as `len` and `make` can be ignored,
because not-assigning `make` result is catched by parser.
2020-09-02 15:20:43 +03:00
Evgenii Stratonikov
5d82b82efb
compiler: support recover()
2020-08-27 10:28:50 +03:00
Evgenii Stratonikov
fa1d1a8b00
compiler: support defer
statement
...
Compile `defer` statement to a TRY/ENDFINALLY opcode pair.
2020-08-27 10:28:50 +03:00