]> git.mxchange.org Git - simgear.git/blobdiff - simgear/nasal/code.h
Nasal: support for standard bitwise operators.
[simgear.git] / simgear / nasal / code.h
index 3db610773d95e84bd19ab2a2fc6c57017ed0ae20..e7cb3f39edc47f2331b0491a908271699c742443 100644 (file)
@@ -26,7 +26,8 @@ enum {
     OP_MEMBER, OP_SETMEMBER, OP_LOCAL, OP_SETLOCAL, OP_NEWVEC, OP_VAPPEND,
     OP_NEWHASH, OP_HAPPEND, OP_MARK, OP_UNMARK, OP_BREAK, OP_SETSYM, OP_DUP2,
     OP_INDEX, OP_BREAK2, OP_PUSHEND, OP_JIFTRUE, OP_JIFNOT, OP_FCALLH,
-    OP_MCALLH, OP_XCHG2, OP_UNPACK, OP_SLICE, OP_SLICE2
+    OP_MCALLH, OP_XCHG2, OP_UNPACK, OP_SLICE, OP_SLICE2, OP_BIT_AND, OP_BIT_OR,
+    OP_BIT_XOR, OP_BIT_NEG
 };
 
 struct Frame {
@@ -62,7 +63,11 @@ struct Globals {
     // A hash of symbol names
     naRef symbols;
 
+    // Vector/hash containing objects which should not be freed by the gc
+    // TODO do we need a separate vector and hash?
     naRef save;
+    naRef save_hash;
+    int next_gc_key;
 
     struct Context* freeContexts;
     struct Context* allContexts;