[pypy-svn] r34460 - pypy/dist/pypy/translator/js/modules

fijal at codespeak.net fijal at codespeak.net
Fri Nov 10 14:27:46 CET 2006


Author: fijal
Date: Fri Nov 10 14:27:45 2006
New Revision: 34460

Modified:
   pypy/dist/pypy/translator/js/modules/dom.py
Log:
Make Style NonConstant. Probably everything else should be non-constant too, or we just need to kill constantness at some point on bltregistry.


Modified: pypy/dist/pypy/translator/js/modules/dom.py
==============================================================================
--- pypy/dist/pypy/translator/js/modules/dom.py	(original)
+++ pypy/dist/pypy/translator/js/modules/dom.py	Fri Nov 10 14:27:45 2006
@@ -14,6 +14,7 @@
 
 import time
 from pypy.rpython.ootypesystem.bltregistry import BasicExternal, MethodDesc
+from pypy.rlib.nonconst import NonConstant
 
 from pypy.translator.stackless.test.test_transform import one
 from xml.dom import minidom
@@ -298,7 +299,7 @@
         'scrollLeft' : 12,
         'scrollTop' : 12,
         'scrollWidth' : 12,
-        'style' : Style(),
+        'style' : NonConstant(Style()),
         'tabIndex' : 12,
         'tagName' : "aa",
         'textContent' : "aa",
@@ -483,18 +484,16 @@
 # set the global 'window' instance to an empty HTML document, override using
 # dom.window = Window(html) (this will also set dom.document)
 window = Window()
+
 def get_document():
-    return document
+    return NonConstant(document)
 
 def get_window():
-    return window
+    return NonConstant(window)
 
 get_window.suggested_primitive = True
 get_document.suggested_primitive = True
 
-def some_fun():
-    pass
-
 def setTimeout(func, delay):
     # scheduler call, but we don't want to mess with threads right now
     if one():



More information about the Pypy-commit mailing list