Merge: Polymorphic extern classes
authorJean Privat <jean@pryen.org>
Wed, 10 Sep 2014 22:29:55 +0000 (18:29 -0400)
committerJean Privat <jean@pryen.org>
Wed, 10 Sep 2014 22:29:55 +0000 (18:29 -0400)
The changes in the compiler ensure that extern classes (or sub classes of Pointer) are always boxed when in the generated code. This means that we now have 2 levels of boxing, the boxing within Nit and the unboxing for user C code where extern classes are pointers (FFI and legacy NI).

This change will allow to use extern classes in virtual types and generic types. It will be used by the `android::ui` modules.

The change also detected some wrongful use of the FFI which have been corected.

There's a bug weird on my computer on the test of nitcc, hopefully pratchett will do better.

Pull-Request: #715
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>


Trivial merge