fix static fields that were being accessed non-statically
authortupshin <tupshin@tupshin.com>
Wed, 4 Feb 2004 03:01:08 +0000 (03:01 +0000)
committertupshin <tupshin@tupshin.com>
Wed, 4 Feb 2004 03:01:08 +0000 (03:01 +0000)
darcs-hash:20040204030108-a9258-9834bcf8703ddce667b7a0f0def752ff423c30f3.gz

src/org/ibex/Scheduler.java
src/org/ibex/Template.java
src/org/ibex/js/Parser.java

index 4ec0aec..43be3d9 100644 (file)
@@ -11,7 +11,7 @@ public class Scheduler {
 
     private static Scheduler singleton;
     public static interface Task { public abstract void perform() throws Exception; }
-    public static void add(Task t) { singleton.runnable.append(t); }
+    public static void add(Task t) { Scheduler.runnable.append(t); }
     public static void init() { if (singleton == null) (singleton = Platform.getScheduler()).run(); }
 
     private static Task current = null;
index 00e580a..edd9334 100644 (file)
@@ -61,12 +61,12 @@ public class Template {
         try {
             apply(b, null);
         } catch (IOException e) {
-            b.clear(b.VISIBLE);
+            b.clear(Box.VISIBLE);
             b.mark_for_repack();
             Log.warn(this, e);
             throw new JSExn(e.toString());
         } catch (JSExn e) {
-            b.clear(b.VISIBLE);
+            b.clear(Box.VISIBLE);
             b.mark_for_repack();
             Log.warn(this, e);
             throw e;
index f36eda4..6b37917 100644 (file)
@@ -494,7 +494,7 @@ class Parser extends Lexer implements ByteCodes {
             break;
         }
         case OR: case AND: {
-            b.add(parserLine, tok == AND ? b.JF : b.JT, JS.ZERO);       // test to see if we can short-circuit
+            b.add(parserLine, tok == AND ? JSFunction.JF : JSFunction.JT, JS.ZERO);       // test to see if we can short-circuit
             int size = b.size;
             startExpr(b, precedence[tok]);                                     // otherwise check the second value
             b.add(parserLine, JMP, JS.N(2));                            // leave the second value on the stack and jump to the end
@@ -880,7 +880,7 @@ class Parser extends Lexer implements ByteCodes {
                 if (peekToken() != SEMI)
                     startExpr(e2, -1);
                 else
-                    e2.add(parserLine, b.LITERAL, Boolean.TRUE);         // handle the for(foo;;foo) case
+                    e2.add(parserLine, JSFunction.LITERAL, Boolean.TRUE);         // handle the for(foo;;foo) case
                 consume(SEMI);
                 if (label != null) b.add(parserLine, LABEL, label);
                 b.add(parserLine, LOOP);