+ else if c == once "Float".to_symbol then
+ if n == once "object_id".to_symbol then
+ s = "TAG_Int((bigint)UNBOX_Float({regs[0]}))"
+ else if n == once "unary -".to_symbol then
+ s = "BOX_Float(-UNBOX_Float({regs[0]}))"
+ else if n == once "output".to_symbol then
+ s = "printf(\"%f\\n\", UNBOX_Float({regs[0]}));"
+ else if n == once "to_i".to_symbol then
+ s = "TAG_Int((bigint)UNBOX_Float({regs[0]}))"
+ else if n == once "+".to_symbol then
+ s = "BOX_Float(UNBOX_Float({regs[0]})+UNBOX_Float({regs[1]}))"
+ else if n == once "-".to_symbol then
+ s = "BOX_Float(UNBOX_Float({regs[0]})-UNBOX_Float({regs[1]}))"
+ else if n == once "*".to_symbol then
+ s = "BOX_Float(UNBOX_Float({regs[0]})*UNBOX_Float({regs[1]}))"
+ else if n == once "/".to_symbol then
+ s = "BOX_Float(UNBOX_Float({regs[0]})/UNBOX_Float({regs[1]}))"
+ else if n == once "<".to_symbol then
+ s = "TAG_Bool(UNBOX_Float({regs[0]})<UNBOX_Float({regs[1]}))"
+ else if n == once ">".to_symbol then
+ s = "TAG_Bool(UNBOX_Float({regs[0]})>UNBOX_Float({regs[1]}))"
+ else if n == once "<=".to_symbol then
+ s = "TAG_Bool(UNBOX_Float({regs[0]})<=UNBOX_Float({regs[1]}))"
+ else if n == once ">=".to_symbol then
+ s = "TAG_Bool(UNBOX_Float({regs[0]})>=UNBOX_Float({regs[1]}))"
+ end
+ else if c == once "Char".to_symbol then
+ if n == once "object_id".to_symbol then
+ s = "TAG_Int(UNTAG_Char({regs[0]}))"
+ else if n == once "unary -".to_symbol then
+ s = "TAG_Char(-UNTAG_Char({regs[0]}))"
+ else if n == once "output".to_symbol then
+ s = "printf(\"%c\", (unsigned char)UNTAG_Char({regs[0]}));"
+ else if n == once "ascii".to_symbol then
+ s = "TAG_Int((unsigned char)UNTAG_Char({regs[0]}))"
+ else if n == once "succ".to_symbol then
+ s = "TAG_Char(UNTAG_Char({regs[0]})+1)"
+ else if n == once "prec".to_symbol then
+ s = "TAG_Char(UNTAG_Char({regs[0]})-1)"
+ else if n == once "to_i".to_symbol then
+ s = "TAG_Int(UNTAG_Char({regs[0]})-'0')"
+ else if n == once "+".to_symbol then
+ s = "TAG_Char(UNTAG_Char({regs[0]})+UNTAG_Char({regs[1]}))"
+ else if n == once "-".to_symbol then
+ s = "TAG_Char(UNTAG_Char({regs[0]})-UNTAG_Char({regs[1]}))"
+ else if n == once "*".to_symbol then
+ s = "TAG_Char(UNTAG_Char({regs[0]})*UNTAG_Char({regs[1]}))"
+ else if n == once "/".to_symbol then
+ s = "TAG_Char(UNTAG_Char({regs[0]})/UNTAG_Char({regs[1]}))"
+ else if n == once "%".to_symbol then
+ s = "TAG_Char(UNTAG_Char({regs[0]})%UNTAG_Char({regs[1]}))"
+ else if n == once "<".to_symbol then
+ s = "TAG_Bool(UNTAG_Char({regs[0]})<UNTAG_Char({regs[1]}))"
+ else if n == once ">".to_symbol then
+ s = "TAG_Bool(UNTAG_Char({regs[0]})>UNTAG_Char({regs[1]}))"
+ else if n == once "<=".to_symbol then
+ s = "TAG_Bool(UNTAG_Char({regs[0]})<=UNTAG_Char({regs[1]}))"
+ else if n == once ">=".to_symbol then
+ s = "TAG_Bool(UNTAG_Char({regs[0]})>=UNTAG_Char({regs[1]}))"
+ else if n == once "==".to_symbol then
+ s = "TAG_Bool(({regs[0]})==({regs[1]}))"
+ else if n == once "!=".to_symbol then
+ s = "TAG_Bool(({regs[0]})!=({regs[1]}))"
+ end
+ else if c == once "Bool".to_symbol then
+ if n == once "object_id".to_symbol then
+ s = "TAG_Int(UNTAG_Bool({regs[0]}))"
+ else if n == once "unary -".to_symbol then
+ s = "TAG_Bool(-UNTAG_Bool({regs[0]}))"
+ else if n == once "output".to_symbol then
+ s = "(void)printf(UNTAG_Bool({regs[0]})?\"true\\n\":\"false\\n\");"
+ else if n == once "ascii".to_symbol then
+ s = "TAG_Bool(UNTAG_Bool({regs[0]}))"
+ else if n == once "to_i".to_symbol then
+ s = "TAG_Int(UNTAG_Bool({regs[0]}))"
+ else if n == once "==".to_symbol then
+ s = "TAG_Bool(({regs[0]})==({regs[1]}))"
+ else if n == once "!=".to_symbol then
+ s = "TAG_Bool(({regs[0]})!=({regs[1]}))"
+ end
+ else if c == once "NativeArray".to_symbol then
+ if n == once "object_id".to_symbol then
+ s = "TAG_Int(((Nit_NativeArray){regs[0]})->object_id)"
+ else if n == once "[]".to_symbol then
+ s = "((Nit_NativeArray){regs[0]})->val[UNTAG_Int({regs[1]})]"
+ else if n == once "[]=".to_symbol then
+ s = "((Nit_NativeArray){regs[0]})->val[UNTAG_Int({regs[1]})]={regs[2]}"
+ else if n == once "copy_to".to_symbol then
+ s = "(void)memcpy(((Nit_NativeArray ){regs[1]})->val, ((Nit_NativeArray){regs[0]})->val, UNTAG_Int({regs[2]})*sizeof(val_t))"
+ end
+ else if c == once "NativeString".to_symbol then
+ if n == once "object_id".to_symbol then
+ s = "TAG_Int(UNBOX_NativeString({regs[0]}))"
+ else if n == once "atoi".to_symbol then
+ s = "TAG_Int(atoi(UNBOX_NativeString({regs[0]})))"
+ else if n == once "[]".to_symbol then
+ s = "TAG_Char(UNBOX_NativeString({regs[0]})[UNTAG_Int({regs[1]})])"
+ else if n == once "[]=".to_symbol then
+ s = "UNBOX_NativeString({regs[0]})[UNTAG_Int({regs[1]})]=UNTAG_Char({regs[2]});"
+ else if n == once "copy_to".to_symbol then
+ s = "(void)memcpy(UNBOX_NativeString({regs[1]})+UNTAG_Int({regs[4]}), UNBOX_NativeString({regs[0]})+UNTAG_Int({regs[3]}), UNTAG_Int({regs[2]}));"
+ end
+ else if n == once "object_id".to_symbol then
+ s = "TAG_Int((bigint)((obj_t){regs[0]})[1].object_id)"
+ else if n == once "sys".to_symbol then
+ s = "(G_sys)"
+ else if n == once "is_same_type".to_symbol then
+ s = "TAG_Bool((VAL2VFT({regs[0]})==VAL2VFT({regs[1]})))"
+ else if n == once "exit".to_symbol then
+ s = "exit(UNTAG_Int({regs[1]}));"
+ else if n == once "calloc_array".to_symbol then
+ s = "NEW_NativeArray(UNTAG_Int({regs[1]}), sizeof(val_t))"
+ else if n == once "calloc_string".to_symbol then
+ s = "BOX_NativeString((char*)raw_alloc((UNTAG_Int({regs[1]}) * sizeof(char))))"