[pypy-svn] r27945 - in pypy/dist/pypy/translator/js2: . test

fijal at codespeak.net fijal at codespeak.net
Wed May 31 00:25:11 CEST 2006


Author: fijal
Date: Wed May 31 00:25:09 2006
New Revision: 27945

Modified:
   pypy/dist/pypy/translator/js2/database.py
   pypy/dist/pypy/translator/js2/test/test_class.py
Log:
Bugfix for failing test.


Modified: pypy/dist/pypy/translator/js2/database.py
==============================================================================
--- pypy/dist/pypy/translator/js2/database.py	(original)
+++ pypy/dist/pypy/translator/js2/database.py	Wed May 31 00:25:09 2006
@@ -90,7 +90,10 @@
             return None
         const = AbstractConst.make(self, value)
         try:
-            return self.consts[const]
+            if retval == 'name':
+                return self.consts[const]
+            else:
+                return const
         except KeyError:
             log("New const:%r"%value)
             if isinstance(value, ootype._string):
@@ -120,7 +123,6 @@
         def generate_constants(consts):
             all_c = [const for const,name in consts.iteritems()]
             rendered = set()
-            
             while len(all_c) > 0:
                 const = all_c.pop()
                 if const not in rendered:

Modified: pypy/dist/pypy/translator/js2/test/test_class.py
==============================================================================
--- pypy/dist/pypy/translator/js2/test/test_class.py	(original)
+++ pypy/dist/pypy/translator/js2/test/test_class.py	Wed May 31 00:25:09 2006
@@ -87,7 +87,7 @@
         assert f(False) == llvmsnippet.call_degrading_func(False)
     
     def test_circular_classdef(self):
-        py.test.skip("Problems with constant names")
+        #py.test.skip("Problems with constant names")
         #py.test.skip("Inheritance not implemented")
         f = compile_function(llvmsnippet.circular_classdef, [])
         assert f() == 10



More information about the Pypy-commit mailing list