Author: hager <sven.ha...@uni-duesseldorf.de> Branch: ppc-jit-backend Changeset: r48118:af1bd77832d4 Date: 2011-10-17 12:24 +0200 http://bitbucket.org/pypy/pypy/changeset/af1bd77832d4/
Log: Added fail_boxes_ptr to class AssemblerPPC class to make test_get_latest_value_count pass. diff --git a/pypy/jit/backend/ppc/ppcgen/ppc_assembler.py b/pypy/jit/backend/ppc/ppcgen/ppc_assembler.py --- a/pypy/jit/backend/ppc/ppcgen/ppc_assembler.py +++ b/pypy/jit/backend/ppc/ppcgen/ppc_assembler.py @@ -76,9 +76,11 @@ def __init__(self, cpu, failargs_limit=1000): self.cpu = cpu self.fail_boxes_int = values_array(lltype.Signed, failargs_limit) + self.fail_boxes_ptr = values_array(llmemory.GCREF, failargs_limit) self.mc = None self.datablockwrapper = None self.memcpy_addr = 0 + self.fail_boxes_count = 0 def load_imm(self, rD, word): if word <= 32767 and word >= -32768: diff --git a/pypy/jit/backend/ppc/runner.py b/pypy/jit/backend/ppc/runner.py --- a/pypy/jit/backend/ppc/runner.py +++ b/pypy/jit/backend/ppc/runner.py @@ -94,8 +94,9 @@ self.fail_boxes_int.setitem(index, sign_ptr) def clear_latest_values(self, count): + null = lltype.nullptr(llmemory.GCREF.TO) for index in range(count): - self.fail_boxes_int.setitem(index, 0) + self.asm.fail_boxes_ptr.setitem(index, null) # executes the stored machine code in the token def execute_token(self, looptoken): @@ -124,7 +125,7 @@ # return the number of values that can be returned def get_latest_value_count(self): - return self.fail_box_count + return self.asm.fail_boxes_count # fetch the result of the computation and return it def get_latest_value_int(self, index): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit