Evgenii Stratonikov
4488f61777
compiler: compile init
even if there are no globals
...
`init` can be useful even if no globals are present,
e.g. we can use some syscall inside.
2020-08-05 12:59:53 +03:00
Evgenii Stratonikov
439d9ff94d
compiler: initialize packages according to go spec
...
`init()` functions should be called during package initialization,
after global variables were processed.
2020-08-05 11:15:07 +03:00
Evgenii Stratonikov
6f2759be3a
compiler: process packages in deterministic order
2020-08-05 11:00:25 +03:00
Evgenii Stratonikov
b771d2d024
compiler: allow to use init
function
...
Process `init()` functions after global variables has been processed.
It's body is saved into the `_initialize` method where all
initialization is performed.
2020-08-05 11:00:25 +03:00