Merge: Improve internal mechanisms of the nitvm
authorJean Privat <jean@pryen.org>
Thu, 28 May 2015 00:19:00 +0000 (20:19 -0400)
committerJean Privat <jean@pryen.org>
Thu, 28 May 2015 00:19:00 +0000 (20:19 -0400)
This PR fixes a bug that was hidden in the nitvm for a too long time, the recursion in class loading was bad and is now corrected.

Then a more accurate mechanism is introduce to deal with positions of methods and attributes in internal structures of classes and objects.
When a method dispatch is performed, this mechanism allows to ask precisely for a class the position of a block of methods (or attributes). This should increase the proportion of object mechanisms "compiled" in an efficient way.

Finally, the class loading is optimized: an indirectly loaded class is not fully constructed and allocated.
Instead, its identifier is computed to allow subtyping tests.

For now, these more accurate mechanisms need recompilations of callsite. This sould be done in further PR.

Pull-Request: #1398
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>


Trivial merge