[pypy-commit] pypy no-force-guard-lazy-set: a branch to benchmark not forcing all lazy setfield/setarrayitem at guards

alex_gaynor noreply at buildbot.pypy.org
Mon Oct 17 21:15:42 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: no-force-guard-lazy-set
Changeset: r48157:c11cb030a542
Date: 2011-10-17 15:15 -0400
http://bitbucket.org/pypy/pypy/changeset/c11cb030a542/

Log:	a branch to benchmark not forcing all lazy setfield/setarrayitem at
	guards

diff --git a/pypy/jit/metainterp/optimizeopt/heap.py b/pypy/jit/metainterp/optimizeopt/heap.py
--- a/pypy/jit/metainterp/optimizeopt/heap.py
+++ b/pypy/jit/metainterp/optimizeopt/heap.py
@@ -39,7 +39,7 @@
         cached_fieldvalue = self._cached_fields.get(structvalue, None)
 
         # Hack to ensure constants are imported from the preamble
-        if cached_fieldvalue and fieldvalue.is_constant(): 
+        if cached_fieldvalue and fieldvalue.is_constant():
             optheap.optimizer.ensure_imported(cached_fieldvalue)
             cached_fieldvalue = self._cached_fields.get(structvalue, None)
 
@@ -50,7 +50,7 @@
             if not self._lazy_setfield_registered:
                 optheap._lazy_setfields_and_arrayitems.append(self)
                 self._lazy_setfield_registered = True
-            
+
         else:
             # this is the case where the pending setfield ends up
             # storing precisely the value that is already there,
@@ -336,7 +336,7 @@
             value = self.getvalue(op.getarg(0))
             assert not value.is_virtual()      # it must be a non-virtual
             fieldvalue = self.getvalue(op.getarglist()[-1])
-            if fieldvalue.is_virtual():
+            if True: #fieldvalue.is_virtual():
                 # this is the case that we leave to resume.py
                 opnum = op.getopnum()
                 if opnum == rop.SETFIELD_GC:
@@ -388,7 +388,7 @@
         #
         cf = self.field_cache(op.getdescr())
         cf.do_setfield(self, op)
-        
+
 
     def optimize_GETARRAYITEM_GC(self, op):
         arrayvalue = self.getvalue(op.getarg(0))


More information about the pypy-commit mailing list