[pypy-svn] r45256 - in pypy/dist/pypy/translator/js: . modules test

fijal at codespeak.net fijal at codespeak.net
Sun Jul 22 19:41:00 CEST 2007


Author: fijal
Date: Sun Jul 22 19:40:59 2007
New Revision: 45256

Modified:
   pypy/dist/pypy/translator/js/database.py
   pypy/dist/pypy/translator/js/modules/dom.py
   pypy/dist/pypy/translator/js/test/test_basicexternal.py
Log:
Fix tests + adhere to better name handling


Modified: pypy/dist/pypy/translator/js/database.py
==============================================================================
--- pypy/dist/pypy/translator/js/database.py	(original)
+++ pypy/dist/pypy/translator/js/database.py	Sun Jul 22 19:40:59 2007
@@ -2,6 +2,7 @@
 """ genjs constant database module
 """
 
+import py
 from pypy.rpython.ootypesystem import ootype
 from pypy.translator.js.opcodes import opcodes
 from pypy.translator.js.function import Function
@@ -413,9 +414,6 @@
         super(ClassConst, self).__init__(db, const)
         self.cts.lltype_to_cts(const._INSTANCE) # force scheduling of class
     
-    def get_name(self):
-        return "const_class"
-    
     def get_key(self):
         return self.get_name()
     
@@ -483,7 +481,7 @@
         return self.name
     
     def get_name(self):
-        return self.const._TYPE._name.split('.')[-1][:-2]
+        return self.const._TYPE._name
     
     def init(self, ilasm):
         _class = self.const._TYPE._class_

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	Sun Jul 22 19:40:59 2007
@@ -335,9 +335,9 @@
 register_external(setTimeout, args=[genericcallable([]), int], result=None)
 
 window = Window()
+window._render_name = 'window'
 document = window.document
-Window._render_name = 'window'
-Document._render_name = 'document'
+document._render_name = 'document'
 
 # rtyper stuff
 

Modified: pypy/dist/pypy/translator/js/test/test_basicexternal.py
==============================================================================
--- pypy/dist/pypy/translator/js/test/test_basicexternal.py	(original)
+++ pypy/dist/pypy/translator/js/test/test_basicexternal.py	Sun Jul 22 19:40:59 2007
@@ -56,7 +56,7 @@
 ee = EE()
 ee._render_name = 'ee'
 
-def test_prebuild_basicexternal():
+def test_prebuilt_basicexternal():
     def tt_fun():
         ee.bb()
     



More information about the Pypy-commit mailing list