compile: better types checks on virtual type
authorJean Privat <jean@pryen.org>
Fri, 25 Nov 2011 15:31:50 +0000 (10:31 -0500)
committerJean Privat <jean@pryen.org>
Fri, 25 Nov 2011 16:02:05 +0000 (11:02 -0500)
commit0c23ea47f678814deea7f4603358225990773105
treede51752129b64d3586424545ddb8be7c10bf583e
parent60d5705cc287dcb8cd7d0c84fecb1055d88ad6e9
compile: better types checks on virtual type

Two new TableElt are added for each global property of a virtual type,
one (TableEltVTClassColor) is used to store the color of the class of
the bound and the other (TableEltVTClassId) is for the identifier.

The C generation of ITypeCheck is therefore updated to use theses when
the static type is a virtual type.

Note that generics is still erased and that type checks on formal type
parameter is blindly (and wrongly) performed on the bound.

Signed-off-by: Jean Privat <jean@pryen.org>
src/compiling/compiling_base.nit
src/compiling/compiling_global.nit
src/compiling/compiling_icode.nit
src/compiling/table_computation.nit