From: Alexis Laferrière Date: Tue, 30 Jul 2013 14:37:13 +0000 (-0400) Subject: nitc: support for native_arg[cv] as intern X-Git-Tag: v0.6.1~74^2~4 X-Git-Url: http://nitlanguage.org nitc: support for native_arg[cv] as intern Signed-off-by: Alexis Laferrière --- diff --git a/src/compiling/compiling_icode.nit b/src/compiling/compiling_icode.nit index 26c8f43..ccccb08 100644 --- a/src/compiling/compiling_icode.nit +++ b/src/compiling/compiling_icode.nit @@ -874,6 +874,10 @@ redef class INative else if c == once "Sys".to_symbol then if n == once "force_garbage_collection".to_symbol then s = "Nit_gc_force_garbage_collection()" + else if n == once "native_argc".to_symbol then + s = "TAG_Int(glob_argc)" + else if n == once "native_argv".to_symbol then + s = "BOX_NativeString(glob_argv[UNTAG_Int({regs[1]})])" end else if n == once "object_id".to_symbol then s = "TAG_Int((bigint)((obj_t){regs[0]})[1].object_id)"