Author: Stephan <[email protected]>
Branch:
Changeset: r126:d0fcefecc961
Date: 2011-09-07 16:25 +0200
http://bitbucket.org/pypy/lang-js/changeset/d0fcefecc961/
Log: pass params for CatchContext into constructor
diff --git a/js/jsexecution_context.py b/js/jsexecution_context.py
--- a/js/jsexecution_context.py
+++ b/js/jsexecution_context.py
@@ -154,6 +154,7 @@
init_mapdict_with_map(self, func.scope.local_variables)
class CatchContext(ExecutionContext):
- def __init__(self, parent=None):
+ def __init__(self, parent, param, exception):
+ self.put(param, exception)
ExecutionContext.__init__(self, parent)
self._map_dict_values_init_with_size(1)
diff --git a/js/opcodes.py b/js/opcodes.py
--- a/js/opcodes.py
+++ b/js/opcodes.py
@@ -532,8 +532,7 @@
if self.catchfunc is not None:
# XXX just copied, I don't know if it's right
from js.jsexecution_context import CatchContext
- newctx = CatchContext(ctx)
- newctx.put(self.catchparam, e.exception)
+ newctx = CatchContext(ctx, self.catchparam, e.exception)
self.catchfunc.run(newctx)
if self.finallyfunc is not None:
self.finallyfunc.run(ctx)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit