[pypy-svn] r62472 - pypy/trunk/pypy/translator/cli

afa at codespeak.net afa at codespeak.net
Tue Mar 3 14:38:47 CET 2009


Author: afa
Date: Tue Mar  3 14:38:46 2009
New Revision: 62472

Modified:
   pypy/trunk/pypy/translator/cli/function.py
   pypy/trunk/pypy/translator/cli/opcodes.py
Log:
cli backend: the "class" keywords seems mandatory for the Microsoft compiler


Modified: pypy/trunk/pypy/translator/cli/function.py
==============================================================================
--- pypy/trunk/pypy/translator/cli/function.py	(original)
+++ pypy/trunk/pypy/translator/cli/function.py	Tue Mar  3 14:38:46 2009
@@ -131,7 +131,9 @@
             if isinstance(link.last_exception, flowmodel.Variable):
                 self.ilasm.opcode('dup')
                 self.store(link.last_exc_value)
-                self.ilasm.call_method('[mscorlib]System.Type object::GetType()', virtual=True)
+                self.ilasm.call_method(
+                    'class [mscorlib]System.Type object::GetType()',
+                    virtual=True)
                 self.store(link.last_exception)
             else:
                 self.store(link.last_exc_value)

Modified: pypy/trunk/pypy/translator/cli/opcodes.py
==============================================================================
--- pypy/trunk/pypy/translator/cli/opcodes.py	(original)
+++ pypy/trunk/pypy/translator/cli/opcodes.py	Tue Mar  3 14:38:46 2009
@@ -49,7 +49,7 @@
     'cli_fieldinfo_for_const':  [FieldInfoForConst],
     'oois':                     'ceq',
     'oononnull':                [PushAllArgs, 'ldnull', 'ceq']+Not,
-    'classof':                  [PushAllArgs, 'callvirt instance [mscorlib]System.Type object::GetType()'],
+    'classof':                  [PushAllArgs, 'callvirt instance class [mscorlib]System.Type object::GetType()'],
     'instanceof':               [CastTo, 'ldnull', 'cgt.un'],
     'subclassof':               [PushAllArgs, 'call bool [pypylib]pypy.runtime.Utils::SubclassOf(class [mscorlib]System.Type, class[mscorlib]System.Type)'],
     'ooidentityhash':           [PushAllArgs, 'callvirt instance int32 object::GetHashCode()'],



More information about the Pypy-commit mailing list