[pypy-commit] pypy remove-getfield-pure: Cleanup logic and include GETFIELDS in list of descriptor based pure operations
sbauman
pypy.commits at gmail.com
Fri Jan 1 03:32:38 EST 2016
Author: Spenser Andrew Bauman <sabauma at gmail.com>
Branch: remove-getfield-pure
Changeset: r81518:8322672559df
Date: 2016-01-01 03:31 -0500
http://bitbucket.org/pypy/pypy/changeset/8322672559df/
Log: Cleanup logic and include GETFIELDS in list of descriptor based pure
operations
diff --git a/rpython/jit/metainterp/pyjitpl.py b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -653,7 +653,7 @@
@arguments("box", "descr")
def opimpl_getfield_gc_i(self, box, fielddescr):
- if fielddescr.is_always_pure() != False and isinstance(box, ConstPtr):
+ if fielddescr.is_always_pure() and isinstance(box, ConstPtr):
# if 'box' is directly a ConstPtr, bypass the heapcache completely
resbox = executor.execute(self.metainterp.cpu, self.metainterp,
rop.GETFIELD_GC_I, fielddescr, box)
@@ -663,7 +663,7 @@
@arguments("box", "descr")
def opimpl_getfield_gc_f(self, box, fielddescr):
- if fielddescr.is_always_pure() != False and isinstance(box, ConstPtr):
+ if fielddescr.is_always_pure() and isinstance(box, ConstPtr):
# if 'box' is directly a ConstPtr, bypass the heapcache completely
resvalue = executor.execute(self.metainterp.cpu, self.metainterp,
rop.GETFIELD_GC_F, fielddescr, box)
@@ -673,7 +673,7 @@
@arguments("box", "descr")
def opimpl_getfield_gc_r(self, box, fielddescr):
- if fielddescr.is_always_pure() != False and isinstance(box, ConstPtr):
+ if fielddescr.is_always_pure() and isinstance(box, ConstPtr):
# if 'box' is directly a ConstPtr, bypass the heapcache completely
val = executor.execute(self.metainterp.cpu, self.metainterp,
rop.GETFIELD_GC_R, fielddescr, box)
@@ -2102,6 +2102,9 @@
if (opnum == rop.GETFIELD_RAW_I or
opnum == rop.GETFIELD_RAW_R or
opnum == rop.GETFIELD_RAW_F or
+ opnum == rop.GETFIELD_GC_I or
+ opnum == rop.GETFIELD_GC_R or
+ opnum == rop.GETFIELD_GC_F or
opnum == rop.GETARRAYITEM_RAW_I or
opnum == rop.GETARRAYITEM_RAW_F):
is_pure = descr.is_always_pure()
More information about the pypy-commit
mailing list