[pypy-commit] pypy default: improve comment, as per fijal's request

antocuni noreply at buildbot.pypy.org
Wed Nov 25 05:46:54 EST 2015


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r80938:fdfae75d80b9
Date: 2015-11-25 11:47 +0100
http://bitbucket.org/pypy/pypy/changeset/fdfae75d80b9/

Log:	improve comment, as per fijal's request

diff --git a/rpython/jit/metainterp/optimizeopt/heap.py b/rpython/jit/metainterp/optimizeopt/heap.py
--- a/rpython/jit/metainterp/optimizeopt/heap.py
+++ b/rpython/jit/metainterp/optimizeopt/heap.py
@@ -535,9 +535,12 @@
         cf.do_setfield(self, op)
 
     def optimize_GETARRAYITEM_GC_I(self, op):
-        # When using str_storage_getitem we op.getarg(0) is a string, NOT an
-        # array. In that case, we cannot cache the getarrayitem as if it were
-        # an array, obviously
+        # When using str_storage_getitem it might happen that op.getarg(0) is
+        # a virtual string, NOT an array. In that case, we cannot cache the
+        # getarrayitem as if it were an array, obviously. In theory we could
+        # improve by writing special code to interpter the buffer of the
+        # virtual string as if it were an array, but it looks complicate,
+        # fragile and not worth it.
         arrayinfo = self.ensure_ptr_info_arg0(op)
         indexb = self.getintbound(op.getarg(1))
         cf = None


More information about the pypy-commit mailing list