mirror of https://github.com/tinygo-org/tinygo.git
Browse Source
Whenever interp hits an unreachable instruction, it bails out at that point. However, it used to insert new instructions at the bottom with the old init calls still at the top. So when a panic() happened in a non-main package, the last packages to init would actually be called first. This commit fixes this by setting the insert point at the top of runtime.initAll before starting interpretation, so the initialization order is still correct when a panic() happens during init.pull/225/head
Ayke van Laethem
6 years ago
committed by
Ron Evans
1 changed files with 10 additions and 1 deletions
Loading…
Reference in new issue