[pypy-commit] lang-js default: moved root_map into object_map.py

stepahn noreply at buildbot.pypy.org
Fri Dec 28 11:32:39 CET 2012


Author: Stephan <stephan at stzal.com>
Branch: 
Changeset: r141:71150147f311
Date: 2011-11-02 10:52 +0100
http://bitbucket.org/pypy/lang-js/changeset/71150147f311/

Log:	moved root_map into object_map.py

diff --git a/js/jsobj.py b/js/jsobj.py
--- a/js/jsobj.py
+++ b/js/jsobj.py
@@ -7,6 +7,7 @@
 from pypy.rlib.jit import hint
 from pypy.rlib import jit, debug
 from js.utils import StackMixin
+from js.object_map import root_map
 
 import string
 # see ECMA 8.6.1 Property attributes
@@ -15,11 +16,6 @@
 READ_ONLY = RO = 4 # ReadOnly
 INTERNAL = IT = 8 # Internal
 
-from js.object_map import MapRoot
-ROOT_MAP = MapRoot()
-
-def _get_root_map():
-    return ROOT_MAP
 
 class SeePage(NotImplementedError):
     pass
@@ -154,7 +150,7 @@
 class W_PrimitiveObject(W_Root):
     def __init__(self, ctx=None, Prototype=None, Class='Object', Value=w_Undefined, callfunc=None):
         self.Prototype = Prototype
-        self.property_map = _get_root_map()
+        self.property_map = root_map()
         self.property_values = []
         if Prototype is None:
             Prototype = w_Undefined
diff --git a/js/object_map.py b/js/object_map.py
--- a/js/object_map.py
+++ b/js/object_map.py
@@ -97,3 +97,8 @@
         else:
             n = self.back.set_flags(name, flags)
             return n.add(self.name, self.flags)
+
+ROOT_MAP = MapRoot()
+
+def root_map():
+    return ROOT_MAP


More information about the pypy-commit mailing list