ReadyTalk / avian

[INACTIVE] Avian is a lightweight virtual machine and class library designed to provide a useful subset of Java's features, suitable for building self-contained applications.
https://readytalk.github.io/avian/
Other
1.22k stars 173 forks source link

fix lazy boostrap class initialization #404

Closed dicej closed 9 years ago

dicej commented 9 years ago

In afbd4ff30303f6f205895d86e752f493b4a91e3c, I made a low-risk, but very specific fix for a more general problem: "bootstrap" classes (i.e. classes which the VM has built-in knowledge of) need to be loaded from the classpath before any of their methods are called. Based on recent testing, I see there are more cases than I previously thought where we try to call methods on "unloaded" bootstrap classes, so we need a more general solution to the problem, preferably one that does so lazily so we don't have to load the class just because an instance is created (but no method is called)