[pypy-svn] r28457 - pypy/dist/pypy/translator/cli

antocuni at codespeak.net antocuni at codespeak.net
Wed Jun 7 16:25:14 CEST 2006


Author: antocuni
Date: Wed Jun  7 16:25:13 2006
New Revision: 28457

Modified:
   pypy/dist/pypy/translator/cli/database.py
Log:
Added support for null instances as field of constant instances.



Modified: pypy/dist/pypy/translator/cli/database.py
==============================================================================
--- pypy/dist/pypy/translator/cli/database.py	(original)
+++ pypy/dist/pypy/translator/cli/database.py	Wed Jun  7 16:25:13 2006
@@ -370,6 +370,10 @@
         return self.cts.lltype_to_cts(self.static_type)
 
     def init(self, ilasm):
+        if not self.obj:
+            ilasm.opcode('ldnull')
+            return
+
         classdef = self.obj._TYPE        
         ilasm.new('instance void class %s::.ctor()' % classdef._name)
         while classdef is not None:



More information about the Pypy-commit mailing list