Author: Carl Friedrich Bolz <[email protected]>
Branch: value-profiling
Changeset: r78951:0cbfedc2259a
Date: 2015-08-12 19:15 +0200
http://bitbucket.org/pypy/pypy/changeset/0cbfedc2259a/
Log: reanme to record_exact_class
diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -148,7 +148,6 @@
def _getlocal(self, varindex):
from pypy.objspace.std.intobject import W_IntObject
# some careful logic there
- vprof = None
if we_are_jitted():
vprof = self.getcode().vprofs[varindex]
if vprof.can_fold_read_int():
@@ -158,8 +157,10 @@
if w_res is not None:
return w_res
w_res = self.locals_cells_stack_w[varindex]
- if we_are_jitted() and vprof.class_is_known():
- jit.record_known_class(w_res, vprof.read_constant_cls())
+ if we_are_jitted():
+ vprof = self.getcode().vprofs[varindex]
+ if vprof.class_is_known():
+ jit.record_exact_class(w_res, vprof.read_constant_cls())
return w_res
def _setlocal(self, varindex, value):
diff --git a/pypy/objspace/std/mapdict.py b/pypy/objspace/std/mapdict.py
--- a/pypy/objspace/std/mapdict.py
+++ b/pypy/objspace/std/mapdict.py
@@ -52,7 +52,7 @@
else:
w_res = obj._mapdict_read_storage(attr.storageindex)
if jit.we_are_jitted() and attr.class_is_known():
- jit.record_known_class(w_res, attr.read_constant_cls())
+ jit.record_exact_class(w_res, attr.read_constant_cls())
return w_res
@jit.elidable
diff --git a/pypy/objspace/std/test/test_mapdict.py
b/pypy/objspace/std/test/test_mapdict.py
--- a/pypy/objspace/std/test/test_mapdict.py
+++ b/pypy/objspace/std/test/test_mapdict.py
@@ -391,7 +391,7 @@
def f(obj, cls):
seen.append((obj, cls))
monkeypatch.setattr(jit, "we_are_jitted", lambda : True)
- monkeypatch.setattr(jit, "record_known_class", f)
+ monkeypatch.setattr(jit, "record_exact_class", f)
assert obj.getdictvalue(space, "a") == a
assert obj.getdictvalue(space, "a") == a
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit