[pypy-svn] r55514 - pypy/branch/oo-jit/pypy/jit/codegen/cli
antocuni at codespeak.net
antocuni at codespeak.net
Tue Jun 3 14:45:02 CEST 2008
Author: antocuni
Date: Tue Jun 3 14:45:00 2008
New Revision: 55514
Modified:
pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py
Log:
add a new operations that prints a string, useful when debugging the backend
Modified: pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py (original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py Tue Jun 3 14:45:00 2008
@@ -194,6 +194,19 @@
self.gv_value.load(self.builder)
self.builder.graphbuilder.il.Emit(OpCodes.Stfld, self.fieldinfo)
+
+class WriteLine(Operation):
+
+ def __init__(self, builder, message):
+ self.builder = builder
+ self.message = message
+
+ def restype(self):
+ return None
+
+ def emit(self):
+ self.builder.graphbuilder.il.EmitWriteLine(self.message)
+
def opcode2attrname(opcode):
if opcode == 'ldc.r8 0':
return 'Ldc_R8, 0' # XXX this is a hack
More information about the Pypy-commit
mailing list