Author: Stephan <[email protected]>
Branch: 
Changeset: r47:c8225b9ef5e7
Date: 2011-05-12 17:16 +0200
http://bitbucket.org/pypy/lang-js/changeset/c8225b9ef5e7/

Log:    removed retlast parameter

diff --git a/js/interpreter.py b/js/interpreter.py
--- a/js/interpreter.py
+++ b/js/interpreter.py
@@ -150,7 +150,7 @@
         bytecode = JsCode()
         node.emit(bytecode)
         func = bytecode.make_js_function()
-        return func.run(ctx, retlast = True)
+        return func.run(ctx)
 
 class W_ParseInt(W_NewBuiltin):
     length = 1
@@ -319,7 +319,7 @@
         bytecode = JsCode()
         ast.emit(bytecode)
         func = bytecode.make_js_function()
-        return func.run(ctx, retlast=True)
+        return func.run(ctx)
 
     def Construct(self, ctx, args=[]):
         return self.Call(ctx, args, this=None)
@@ -898,6 +898,6 @@
             self._code = bytecode
         func = bytecode.make_js_function()
         if interactive:
-            return func.run(self.global_context, retlast=True)
+            return func.run(self.global_context)
         else:
             func.run(self.global_context)
diff --git a/js/jscode.py b/js/jscode.py
--- a/js/jscode.py
+++ b/js/jscode.py
@@ -138,17 +138,17 @@
         self.params = params
         self.opcodes = code
 
-    def run(self, ctx, check_stack=True, retlast=False):
+    def run(self, ctx, check_stack=True):
         if we_are_translated():
             stack = []
         else:
             stack = T()
         try:
-            return self.run_bytecode(ctx, stack, check_stack, retlast)
+            return self.run_bytecode(ctx, stack, check_stack)
         except ReturnException, e:
             return e.value
 
-    def run_bytecode(self, ctx, stack, check_stack=True, retlast=False):
+    def run_bytecode(self, ctx, stack, check_stack=True):
         i = 0
         to_pop = 0
         try:
diff --git a/js/jsobj.py b/js/jsobj.py
--- a/js/jsobj.py
+++ b/js/jsobj.py
@@ -147,7 +147,7 @@
         w_Arguments = W_Arguments(self, args)
         act.Put(ctx, 'arguments', w_Arguments)
         newctx = function_context(self.Scope, act, this)
-        val = self.callfunc.run(ctx=newctx, retlast=True)
+        val = self.callfunc.run(ctx=newctx)
         return val
 
     def Construct(self, ctx, args=[]):
diff --git a/js/test/test_interp.py b/js/test/test_interp.py
--- a/js/test/test_interp.py
+++ b/js/test/test_interp.py
@@ -14,7 +14,7 @@
     bytecode.emit('ADD')
     bytecode.emit('POP')
     func = bytecode.make_js_function()
-    res = func.run(ExecutionContext([W_Object()]), check_stack=False, 
retlast=True)
+    res = func.run(ExecutionContext([W_Object()]), check_stack=False)
     assert res.ToNumber(None) == 6.0
 
 def assertp(code, prints):
@@ -39,7 +39,7 @@
         bytecode = JsCode()
         interpreter.load_source(code, '').emit(bytecode)
         func = bytecode.make_js_function()
-        code_val = func.run(ExecutionContext([ctx]), retlast=True)
+        code_val = func.run(ExecutionContext([ctx]))
     except ThrowException, excpt:
         code_val = excpt.exception
     print code_val, value
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to