Author: Carl Friedrich Bolz <[email protected]>
Branch: guard-compatible
Changeset: r83429:ac6ec0fa91d4
Date: 2016-03-29 17:30 +0200
http://bitbucket.org/pypy/pypy/changeset/ac6ec0fa91d4/
Log: another shortening of pre-optimization traces
diff --git a/pypy/objspace/std/objspace.py b/pypy/objspace/std/objspace.py
--- a/pypy/objspace/std/objspace.py
+++ b/pypy/objspace/std/objspace.py
@@ -541,17 +541,19 @@
map = w_obj._get_mapdict_map_no_promote()
if map is not None and map._type_safe_to_do_getattr():
safe = True
+ name = self.str_w(w_name)
+ w_descr = map._type_lookup_safe(name)
if not safe:
w_type = self.type(w_obj)
w_descr = w_type.getattribute_if_not_from_object()
if w_descr is not None:
return self._handle_getattribute(w_descr, w_obj, w_name)
+ name = self.str_w(w_name)
+ w_descr = self.lookup(w_obj, name)
# fast path: XXX this is duplicating most of the logic
# from the default __getattribute__ and the getattr() method...
- name = self.str_w(w_name)
- w_descr = self.lookup(w_obj, name)
e = None
if w_descr is not None:
w_get = None
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit