[pypy-commit] pypy default: make get_location_str always return a high-level string
fijal
noreply at buildbot.pypy.org
Tue Jun 7 10:44:12 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r44769:0bf5c374be8c
Date: 2011-06-07 10:31 +0200
http://bitbucket.org/pypy/pypy/changeset/0bf5c374be8c/
Log: make get_location_str always return a high-level string
diff --git a/pypy/jit/metainterp/warmstate.py b/pypy/jit/metainterp/warmstate.py
--- a/pypy/jit/metainterp/warmstate.py
+++ b/pypy/jit/metainterp/warmstate.py
@@ -599,12 +599,8 @@
get_location_ptr = self.jitdriver_sd._get_printable_location_ptr
if get_location_ptr is None:
missing = '(no jitdriver.get_printable_location!)'
- missingll = llstr(missing)
def get_location_str(greenkey):
- if we_are_translated():
- return missingll
- else:
- return missing
+ return missing
else:
rtyper = self.warmrunnerdesc.rtyper
unwrap_greenkey = self.make_unwrap_greenkey()
@@ -612,10 +608,10 @@
def get_location_str(greenkey):
greenargs = unwrap_greenkey(greenkey)
fn = support.maybe_on_top_of_llinterp(rtyper, get_location_ptr)
- res = fn(*greenargs)
- if not we_are_translated() and not isinstance(res, str):
- res = hlstr(res)
- return res
+ llres = fn(*greenargs)
+ if not we_are_translated() and isinstance(res, str):
+ return llres
+ return hlstr(llres)
self.get_location_str = get_location_str
#
confirm_enter_jit_ptr = self.jitdriver_sd._confirm_enter_jit_ptr
More information about the pypy-commit
mailing list