[pypy-commit] pypy optresult-unroll: fix, in-progress
arigo
noreply at buildbot.pypy.org
Mon Aug 24 15:26:15 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: optresult-unroll
Changeset: r79202:8851cf14646f
Date: 2015-08-24 14:56 +0200
http://bitbucket.org/pypy/pypy/changeset/8851cf14646f/
Log: fix, in-progress
diff --git a/rpython/jit/backend/llgraph/runner.py b/rpython/jit/backend/llgraph/runner.py
--- a/rpython/jit/backend/llgraph/runner.py
+++ b/rpython/jit/backend/llgraph/runner.py
@@ -90,7 +90,9 @@
class SizeDescr(AbstractDescr):
def __init__(self, S, vtable, runner):
+ assert not isinstance(vtable, bool)
self.S = S
+ self._vtable = vtable
self._is_object = vtable is not None
self.all_fielddescrs = heaptracker.all_fielddescrs(runner, S,
get_field_descr=LLGraphCPU.fielddescrof)
@@ -102,8 +104,7 @@
return self._is_object
def get_vtable(self):
- return heaptracker.adr2int(llmemory.cast_ptr_to_adr(
- self._corresponding_vtable))
+ return heaptracker.adr2int(llmemory.cast_ptr_to_adr(self._vtable))
def count_fields_if_immutable(self):
return heaptracker.count_fields_if_immutable(self.S)
@@ -692,7 +693,7 @@
result = lltype.malloc(descr.S, zero=True)
result_as_objptr = lltype.cast_pointer(rclass.OBJECTPTR, result)
result_as_objptr.typeptr = support.cast_from_int(rclass.CLASSTYPE,
- descr._corresponding_vtable)
+ descr._vtable)
return lltype.cast_opaque_ptr(llmemory.GCREF, result)
def bh_new_array(self, length, arraydescr):
diff --git a/rpython/jit/backend/model.py b/rpython/jit/backend/model.py
--- a/rpython/jit/backend/model.py
+++ b/rpython/jit/backend/model.py
@@ -8,10 +8,6 @@
total_freed_loops = 0
total_freed_bridges = 0
- # for heaptracker
- # _all_size_descrs_with_vtable = None
- _vtable_to_descr_dict = None
-
class AbstractCPU(object):
supports_floats = False
supports_longlong = False
diff --git a/rpython/jit/backend/test/runner_test.py b/rpython/jit/backend/test/runner_test.py
--- a/rpython/jit/backend/test/runner_test.py
+++ b/rpython/jit/backend/test/runner_test.py
@@ -1820,7 +1820,6 @@
p = p.parent
else:
descr = cpu.sizeof(T, vtable_for_T)
- descr._corresponding_vtable = vtable_for_T
t = lltype.malloc(T)
if T == self.T:
t.parent.parent.typeptr = vtable_for_T
diff --git a/rpython/jit/backend/x86/test/test_regalloc2.py b/rpython/jit/backend/x86/test/test_regalloc2.py
--- a/rpython/jit/backend/x86/test/test_regalloc2.py
+++ b/rpython/jit/backend/x86/test/test_regalloc2.py
@@ -335,11 +335,7 @@
cls1.subclassrange_min = 1
cls1.subclassrange_max = 3
if S is not None:
- descr = cpu.sizeof(S)
- if not hasattr(cpu.tracker, '_all_size_descrs_with_vtable'):
- cpu.tracker._all_size_descrs_with_vtable = []
- cpu.tracker._all_size_descrs_with_vtable.append(descr)
- descr._corresponding_vtable = cls1
+ descr = cpu.sizeof(S, cls1) # xxx may be not needed any more
return llmemory.cast_adr_to_int(llmemory.cast_ptr_to_adr(cls1), "symbolic")
def test_bug_2():
diff --git a/rpython/jit/metainterp/test/test_compile.py b/rpython/jit/metainterp/test/test_compile.py
--- a/rpython/jit/metainterp/test/test_compile.py
+++ b/rpython/jit/metainterp/test/test_compile.py
@@ -89,8 +89,6 @@
metainterp.history = History()
metainterp.history.operations = loop.operations[:-1]
metainterp.history.inputargs = loop.inputargs[:]
- cpu.tracker._all_size_descrs_with_vtable = (
- LLtypeMixin.cpu.tracker._all_size_descrs_with_vtable)
#
greenkey = 'faked'
target_token = compile_loop(metainterp, greenkey, 0,
More information about the pypy-commit
mailing list