X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FInterpreter.java;h=59b48c3f30404942319f4e469b72a12cec116026;hb=b4cbe7980419f21ef890b407e6d7e6e8026ca71e;hp=1b679cafa95d839d7ca07b48fd60ff99349cbc63;hpb=3591b88b94a6bb378af3d4abe6eb5233ce583104;p=org.ibex.core.git diff --git a/src/org/ibex/js/Interpreter.java b/src/org/ibex/js/Interpreter.java index 1b679ca..59b48c3 100644 --- a/src/org/ibex/js/Interpreter.java +++ b/src/org/ibex/js/Interpreter.java @@ -93,7 +93,9 @@ class Interpreter implements ByteCodes, Tokens { case DUP: stack.push(stack.peek()); break; case NEWSCOPE: scope = new JSScope(scope); break; case OLDSCOPE: scope = scope.getParentScope(); break; - case ASSERT: if (!JS.toBoolean(stack.pop())) throw je("ibex.assertion.failed" /*FEATURE: line number*/); break; + case ASSERT: + if (JS.checkAssertions && !JS.toBoolean(stack.pop())) + throw je("ibex.assertion.failed" /*FEATURE: line number*/); break; case BITNOT: stack.push(JS.N(~JS.toLong(stack.pop()))); break; case BANG: stack.push(JS.B(!JS.toBoolean(stack.pop()))); break; case NEWFUNCTION: stack.push(((JSFunction)arg)._cloneWithNewParentScope(scope)); break; @@ -555,7 +557,7 @@ class Interpreter implements ByteCodes, Tokens { public CallMarker(Interpreter cx) { pc = cx.pc + 1; scope = cx.scope; f = cx.f; } } - public static class CatchMarker { public CatchMarker() { } } + public static class CatchMarker { } private static CatchMarker catchMarker = new CatchMarker(); public static class LoopMarker {