SpiderScript - Moved header to directory, ready to remove from tree
[tpg/acess2.git] / Usermode / Libraries / libspiderscript.so_src / bytecode_gen.c
index e2b1683..aad172d 100644 (file)
@@ -35,6 +35,7 @@ tBC_Op *Bytecode_int_AllocateOp(int Operation, int ExtraBytes)
        ret->Operation = Operation;
        ret->bUseInteger = 0;
        ret->bUseString = (ExtraBytes > 0);
+       ret->CacheEnt = NULL;
 
        return ret;
 }
@@ -226,7 +227,7 @@ int Bytecode_int_Serialize(const tBC_Function *Function, void *Output, int *Labe
                        break;
                // Special case for inline values
                case BC_OP_LOADINT:
-                       _put_index(op->Content.Integer);
+                       _put_qword(op->Content.Integer);
                        break;
                case BC_OP_LOADREAL:
                        _put_double(op->Content.Real);
@@ -412,6 +413,8 @@ void Bytecode_AppendConstString(tBC_Function *Handle, const void *Data, size_t L
        op->Content.StringInt.String[Length] = 0;
        Bytecode_int_AppendOp(Handle, op);
 }
+void Bytecode_AppendConstNull(tBC_Function *Handle)
+       DEF_BC_NONE(BC_OP_LOADNULL)
 
 // --- Indexing / Scoping
 void Bytecode_AppendElement(tBC_Function *Handle, const char *Name)

UCC git Repository :: git.ucc.asn.au