lib/standard: Fixed implementation of to_s in Int.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>
nitg/ffi: Nit Int are C longs

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
FFI with Java: use Java long instead of int to represent Nit's Int

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/android: update to Java `long` to represent a Nit `Int`

Signed-off-by: Jean Privat <jean@pryen.org>
modelize_property: add annotation `lazy`

Signed-off-by: Jean Privat <jean@pryen.org>
modelize_property: add a guard for lazy attributes

Signed-off-by: Jean Privat <jean@pryen.org>
comp: clean AAttrPropdef#compile_to_c

Signed-off-by: Jean Privat <jean@pryen.org>
comp: compile `lazy` in the getter

For primitive and nullables, lazy is implemented with an additionnal
boolean attribute used as a guard.
The guard is also update in the setter.

For nonnullable val*, lazy is implemented with issset that is currently
only correctly implemented in this subcase.

One isset has a good implementation, the guard implemnatation can be
removed.

Signed-off-by: Jean Privat <jean@pryen.org>
niti: clean AAttrPropdef#call

Signed-off-by: Jean Privat <jean@pryen.org>
niti: Interpretor provides a service isset_attribute

Signed-off-by: Jean Privat <jean@pryen.org>
niti: extract attribute expr evaluation in its own method

Signed-off-by: Jean Privat <jean@pryen.org>
niti: implements lazy in the getter using isset

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

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: Add annotation lazy on attributes

This annotation is basically a better `cached`.

~~~
class A
   var foo: Foo = some_complex_computation is lazy
end
var a = new A # no complex computation done yet
print a.foo # complex computation is done here
~~~

Unlike cached, the attribute is visible, and if a setter is available, the lazy can be sortcut. Thus lazy is behaving like a default value.

~~~
var b = new A
b.foo = new Foo # set before get,
print b.foo # thus complex computation is never done!
~~~

Note that with `readonly` #604 the setter can be unavailable, thus having lazy the only way to initialyze attributes.

Pull-Request: #605
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Merge: fix Int#to_s and migrate Java FFI Int to longs

A rewrite that closes #592 and closes #458

Pull-Request: #609
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>