updated Makefile.common
[org.ibex.core.git] / src / org / ibex / js / ByteCodes.java
index e8170f1..84c5926 100644 (file)
@@ -24,10 +24,11 @@ interface ByteCodes {
     /** if given a non-null argument declare its argument in the current scope and push
         it to the stack, else, declares the element on the top of the stack and leaves it
         there */
-    public static final byte DECLARE = -6;       
+    //public static final byte DECLARE = -6;       
 
     /** push a reference to the current scope onto the stack */
-    public static final byte TOPSCOPE = -7;
+    // FIXME: Document this
+    public static final byte GLOBALSCOPE = -7;
 
     /** if given a null literal pop two elements off the stack; push stack[-1].get(stack[top])
         else pop one element off the stack, push stack[top].get(literal) */
@@ -85,10 +86,14 @@ interface ByteCodes {
     /** finish a finally block and carry out whatever instruction initiated the finally block */
     public static final byte MAKE_GRAMMAR = -25;
     
+    // FIXME: Document these and NEWSCOPE/OLDSCOPE/TOPSCOPE changes
+    public static final byte SCOPEGET = -26;
+    public static final byte SCOPEPUT = -27;    
+    
     public static final String[] bytecodeToString = new String[] {
-        "", "", "LITERAL", "ARRAY", "OBJECT", "NEWFUNCTION", "DECLARE", "TOPSCOPE",
+        "", "", "LITERAL", "ARRAY", "OBJECT", "NEWFUNCTION", "DECLARE", "GLOBALSCOPE",
         "GET", "GET_PRESERVE", "PUT", "JT", "JF", "JMP", "POP", "CALL", "PUSHKEYS",
         "SWAP", "NEWSCOPE", "OLDSCOPE", "DUP", "LABEL", "LOOP", "CALLMETHOD",
-        "FINALLY_DONE", "MAKE_GRAMMAR"
+        "FINALLY_DONE", "MAKE_GRAMMAR", "SCOPEGET", "SCOPEPUT"
     };
 }