Merge: Subtyping test with perfect hashing in the Nit vm
authorJean Privat <jean@pryen.org>
Mon, 16 Jun 2014 17:30:16 +0000 (13:30 -0400)
committerJean Privat <jean@pryen.org>
Mon, 16 Jun 2014 23:45:26 +0000 (19:45 -0400)
commitd630b33bfbef8394cc58a373f2997f1b13600283
treebaba38a5c5162eb3d63407f9a87a92549dcef11c
parent67bf8cb8de5725d0211311db4f10f6ef708df7e4
parent4ec93ca371e8b72cd4903433400a3ddd0adaa87a
Merge: Subtyping test with perfect hashing in the Nit vm

This pull request contains the first files for the Nit virtual machine.

In this PR, the vm constructs runtime structures for each MClass of the model. These structures represent virtual tables for classes. When constructed, the virtual tables only reserve memory for method pointer but the method call is made with the naive_interpreter mechanisms.

The virtual machine can now performs subtyping test with the perfect hashing approach.

In the perfect_hashing module, numbering of items now start at 1 instead of 0.

Pull-Request: #497
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>