From 26a06855501ab8594d7147d494baf0e3509e5649 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Tue, 30 Jul 2013 10:37:13 -0400 Subject: [PATCH] nitc: support for native_arg[cv] as intern MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- src/compiling/compiling_icode.nit | 4 ++++ 1 file changed, 4 insertions(+) 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)" -- 1.7.9.5