[pypy-svn] r65346 - in pypy/branch/pyjitpl5/pypy/jit/backend/cli: . test

antocuni at codespeak.net antocuni at codespeak.net
Thu May 21 13:55:09 CEST 2009


Author: antocuni
Date: Thu May 21 13:55:06 2009
New Revision: 65346

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/cli/method.py
   pypy/branch/pyjitpl5/pypy/jit/backend/cli/runner.py
   pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_vlist.py
Log:
implement emit_op_new_arry, but comment it out as it cannot be tested without translation.



Modified: pypy/branch/pyjitpl5/pypy/jit/backend/cli/method.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/cli/method.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/cli/method.py	Thu May 21 13:55:06 2009
@@ -502,12 +502,18 @@
         self.il.Emit(OpCodes.Castclass, clitype)
         self.il.Emit(OpCodes.Ldlen)
         self.store_result(op)
-        
-    def not_implemented(self, op):
+
+    def emit_op_new_array(self, op):
         raise NotImplementedError
+##         descr = op.descr
+##         assert isinstance(descr, runner.TypeDescr)
+##         item_clitype = descr.get_clitype()
+##         op.args[0].load(self)
+##         self.il.Emit(OpCodes.Newarr, item_clitype)
+##         self.store_result(op)        
 
-    emit_op_guard_nonvirtualized = not_implemented
-    emit_op_new_array = not_implemented
+    def emit_op_guard_nonvirtualized(self, op):
+        raise NotImplementedError
 
     def lltype_only(self, op):
         print 'Operation %s is lltype specific, should not get here!' % op.getopname()

Modified: pypy/branch/pyjitpl5/pypy/jit/backend/cli/runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/cli/runner.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/cli/runner.py	Thu May 21 13:55:06 2009
@@ -277,13 +277,12 @@
         self.getarraylength = getarraylength
         self.instanceof = instanceof
         self.ooclass = get_class_for_type(TYPE)
-        self.ooarrayclass = get_class_for_type(ARRAY)
 
     def get_clitype(self):
         return dotnet.class2type(self.ooclass)
 
     def get_array_clitype(self):
-        return dotnet.class2type(self.ooarrayclass)
+        return self.get_clitype().MakeArrayType()
 
     def get_constructor_info(self):
         clitype = self.get_clitype()

Modified: pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_vlist.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_vlist.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_vlist.py	Thu May 21 13:55:06 2009
@@ -10,9 +10,6 @@
     def skip(self):
         py.test.skip("works only after translation")
 
-    def _skip(self):
-        py.test.skip("in-progress")
-
-    test_list_pass_around = _skip
-    test_cannot_be_virtual = _skip
-    test_ll_fixed_setitem_fast = _skip
+    test_list_pass_around = skip
+    test_cannot_be_virtual = skip
+    test_ll_fixed_setitem_fast = skip



More information about the Pypy-commit mailing list