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)
commit6af9921f14c3cb94dddd7127b3de35028cfb38a5
treeb044be4b34b5cf19e439d69add97ca240303710d
parent415ed3cf9f11939dab3a54a5cbbb50879f7f1cb4
parent6c49cd48ac44a87581c2a800c38c9b75a7404124
Merge: Improve internal mechanisms of the nitvm

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>