rta: store real types in live_cast_type

The separate compiler need to distinguish if the target is nullable or not.
So do not un-nullable cast types.

rta_metrics.nit is also updated to deal with the change of the static
type of the attribute.

nitg-g is also modified to use the new correct the RTA information
(this remove a workaround)

Signed-off-by: Jean Privat <jean@pryen.org>
nitg-s: add hardening_live_open_type and hardening_cast_type

with --hardening, add additional runtime-test on type resolution and
type checks.

Signed-off-by: Jean Privat <jean@pryen.org>
nitg-s: use the original type in type tests

RTA discovers original types, thus do not try to un-nullify some.

Signed-off-by: Jean Privat <jean@pryen.org>
nitg-s: use table_size instead of resolution_table to check live types

A future commit will remove resolution_table on live type that does not
need one (no formal types)

Signed-off-by: Jean Privat <jean@pryen.org>
nitg-s: compile_type_to_c generate partial tables for dead types

If a type is not live (instantiated) or not cast-live (someone try to
type check to it), parts of the generated C tables are empty (marked DEAD).

Signed-off-by: Jean Privat <jean@pryen.org>
nitg-s: do not color undead types

`undead` things are dead things but that are referenced in C code, thus
need a definition to permit the link.

undead types are no more colored but the C declarations need to remain.

Signed-off-by: Jean Privat <jean@pryen.org>
nitg-s: remove partial_types

rta and nitg-s now do the right thing for detecting and compiling type tests.
The partial types hack is thus useless.

Signed-off-by: Jean Privat <jean@pryen.org>
Merge branch 'hardening_types'
benchs: remove old nitc related benchs

Signed-off-by: Jean Privat <jean@pryen.org>
benchs: compile last nitg from bin/nitg

Signed-off-by: Jean Privat <jean@pryen.org>
benchs: rename bench_nitg-g_options-hardening to slower

Signed-off-by: Jean Privat <jean@pryen.org>
benchs: fix bench_compilation_time

Signed-off-by: Jean Privat <jean@pryen.org>
Merge remote-tracking branch 'alexis/mnit-fixes-and-numbers'

This time we fix the Linux side of mnit and add the NumberImages class
to easily display numbers. Finally you can know your score when playing
Crazy Moles!
benchs: provide .gitignore to ignore generated files

Signed-off-by: Jean Privat <jean@pryen.org>
Merge branch 'benchs'

the `benchmarks/bench_engines.sh` script was not updated for the
*killnitc* transition.

This series cleaup the file, making it usable again.
lib: add `MapRead::get_or_null` to provide a more standard usage of Maps

Signed-off-by: Jean Privat <jean@pryen.org>
Merge remote-tracking branch 'alexis/various-fixes-for-games'

Latest additions to the standard library for Round'n Round.

The Float::abs implemetation corrects a bug present in master.
Merge remote-tracking branch 'alexis/ffi-fix'

In most cases the generated code use a wrong types (Custom types in
extern classes aren't visible inside the main generated code). Also
fixed an alias.
lib: add `provide_default_value` in Map to allow subclasses to provide
specific behavior when there is no value associated with a key.

The default behavior is to abort, as usual.

Basically this patch factorizes the `abort` in a single function that can
be redefined.

Signed-off-by: Jean Privat <jean@pryen.org>
lib/more_collection: MultiHashMap associates new arrays to unknown keys

Signed-off-by: Jean Privat <jean@pryen.org>