[pypy-svn] r52017 - in pypy/branch/jit-refactoring/pypy/jit: rainbow rainbow/test timeshifter/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Sat Mar 1 21:10:36 CET 2008
Author: cfbolz
Date: Sat Mar 1 21:10:34 2008
New Revision: 52017
Added:
pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_0tlc.py
- copied, changed from r51886, pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_0tlc.py
Removed:
pypy/branch/jit-refactoring/pypy/jit/timeshifter/test/test_0tlc.py
Modified:
pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py
pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py
Log:
port over one of the tiny language test files
Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py Sat Mar 1 21:10:34 2008
@@ -722,6 +722,14 @@
def handle_reverse_split_queue_hint(self, op, arg, result):
self.emit("reverse_split_queue")
+ def handle_forget_hint(self, op, arg, result):
+ # a hint for testing only
+ assert self.varcolor(result) == "green"
+ assert self.varcolor(arg) != "green"
+ self.emit("revealconst")
+ self.emit(self.serialize_oparg("red", arg))
+ self.register_greenvar(result)
+
def args_of_call(self, args, colored_as):
result = []
reds, greens = self.sort_by_color(args, colored_as)
@@ -1036,7 +1044,6 @@
destboxindex = self.serialize_oparg("red", args[0])
indexboxindex = self.serialize_oparg("red", args[1])
valboxindex = self.serialize_oparg("red", args[2])
- fieldname = args[1].value
fielddescindex = self.arrayfielddesc_position(PTRTYPE.TO)
if fielddescindex == -1: # Void field
return
Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py Sat Mar 1 21:10:34 2008
@@ -358,6 +358,10 @@
kind = self.frame.bytecode.typekinds[typeid]
return redboxcls(kind, genconst)
+ @arguments("red", returns="green_from_red")
+ def opimpl_revealconst(self, box):
+ return box
+
@arguments("jumptarget")
def opimpl_goto(self, target):
self.frame.pc = target
More information about the Pypy-commit
mailing list