[pypy-svn] r27984 - pypy/dist/pypy/translator/js2

fijal at codespeak.net fijal at codespeak.net
Wed May 31 15:30:33 CEST 2006


Author: fijal
Date: Wed May 31 15:30:32 2006
New Revision: 27984

Modified:
   pypy/dist/pypy/translator/js2/database.py
Log:
Stupid bugfix.


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 15:30:32 2006
@@ -93,6 +93,7 @@
             if retval == 'name':
                 return self.consts[const]
             else:
+                self.consts[const]
                 return const
         except KeyError:
             log("New const:%r"%value)
@@ -135,6 +136,7 @@
                             const.depends = None
                             all_c.append(i)
 
+        log("Consts: %r"%self.consts)
         # We need to keep track of fields to make sure
         # our items appear earlier than us
         for const,name in generate_constants(self.consts):
@@ -320,18 +322,3 @@
     def init_fields(self, ilasm, const_var, name):
         pass
 
-##        ilasm.new('instance void class %s::.ctor()' % classdef._name)
-##        while classdef is not None:
-##            for name, (type_, default) in classdef._fields.iteritems():
-##                if isinstance(type_, ootype.StaticMethod):
-##                    continue
-##                elif type_ is ootype.Class:
-##                    value = getattr(self.obj, name)
-##                    self.cts.lltype_to_cts(value._INSTANCE) # force scheduling class generation
-##                    classname = value._INSTANCE._name
-##                    ilasm.opcode('dup')
-##                    ilasm.opcode('ldtoken', classname)
-##                    ilasm.call('class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)')
-##                    ilasm.opcode('stfld class [mscorlib]System.Type %s::%s' % (classdef._name, name))
-##            classdef = classdef._superclass
-##



More information about the Pypy-commit mailing list