X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fjs%2FInterpreter.java;h=5c7163b4b791468a8b8610d5e81a2188af4ad26d;hb=3d545db9c5a99535462adc62cbf9fc88d3dd619b;hp=c049088e591bcc59bd236c170717c39de3fd21e9;hpb=e8762b25b82d2113ce27869e7f2f096eca10239e;p=org.ibex.core.git diff --git a/src/org/xwt/js/Interpreter.java b/src/org/xwt/js/Interpreter.java index c049088..5c7163b 100644 --- a/src/org/xwt/js/Interpreter.java +++ b/src/org/xwt/js/Interpreter.java @@ -167,7 +167,7 @@ class Interpreter implements ByteCodes, Tokens { Trap t = ts.t.next; while (t != null && t.f.numFormalArgs == 0) t = t.next; if (t == null) { - ((JS)ts.t.trapee).put(t.name, ts.val); + ((JS)ts.t.trapee).put(ts.t.name, ts.val); if (pausecount > initialPauseCount) { pc++; return null; } // we were paused } else { stack.push(o); @@ -182,7 +182,7 @@ class Interpreter implements ByteCodes, Tokens { } } scope = ((CallMarker)o).scope; - pc = ((CallMarker)o).pc; + pc = ((CallMarker)o).pc - 1; f = (JSFunction)((CallMarker)o).f; stack.push(retval); continue OUTER; @@ -203,7 +203,7 @@ class Interpreter implements ByteCodes, Tokens { throw je("tried to assign \"" + (val==null?"(null)":val.toString()) + "\" to the null key"); Trap t = null; if (target instanceof JS) { - t = ((JS)target).getTrap(val); + t = ((JS)target).getTrap(key); while (t != null && t.f.numFormalArgs == 0) t = t.next; } else if (target instanceof Trap.TrapScope && key.equals("cascade")) { Trap.TrapScope ts = (Trap.TrapScope)target; @@ -290,7 +290,6 @@ class Interpreter implements ByteCodes, Tokens { stack.pop(); } } - Object[] rest = numArgs > 3 ? new Object[numArgs - 3] : null; for(int i=numArgs - 1; i>2; i--) rest[i-3] = stack.pop(); Object a2 = numArgs <= 2 ? null : stack.pop();