Merge: Use linker symbols to encode colors
authorJean Privat <jean@pryen.org>
Tue, 13 Jan 2015 01:29:02 +0000 (20:29 -0500)
committerJean Privat <jean@pryen.org>
Tue, 13 Jan 2015 01:29:02 +0000 (20:29 -0500)
commitaaaff8e681fc583e8104ff324e7dd2ce8e87eeb7
treef60236457ac640bf713e5a8e6b20634ad2e76c1c
parentc11db51d0cf96cfcfe340e7fe51637496fecc794
parent8e3a28d4f420c4bada5d8b2d8148857a762988ab
Merge: Use linker symbols to encode colors

Genuine constant static variables are used to store the colors used in OO mechanisms.
This makes the compiler program slower since additional indirections are required to get the values.
It also produces a little bit larger executables since static memory has to store the colors.

This PR introduce a trick user in the original PRM that uses linker symbols to encode the colors.
It is not completely portable so it must be activated with the option `--colors-are-symbols`

For numbers (with the traditional nitc/nitc/nitc)
before: 0m7.544s
after: 0m7.228s (so -4%)

Pull-Request: #1093
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
src/compiler/abstract_compiler.nit
src/compiler/android_platform.nit
src/compiler/separate_compiler.nit