[pypy-commit] pypy jit-short_from_state: renamed paramter to make translation happy

hakanardo noreply at buildbot.pypy.org
Wed Jul 20 10:19:34 CEST 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-short_from_state
Changeset: r45760:55a935a20e28
Date: 2011-07-17 13:31 +0200
http://bitbucket.org/pypy/pypy/changeset/55a935a20e28/

Log:	renamed paramter to make translation happy

diff --git a/pypy/jit/metainterp/optimizeopt/vstring.py b/pypy/jit/metainterp/optimizeopt/vstring.py
--- a/pypy/jit/metainterp/optimizeopt/vstring.py
+++ b/pypy/jit/metainterp/optimizeopt/vstring.py
@@ -47,7 +47,7 @@
 class __extend__(optimizer.OptValue):
     """New methods added to the base class OptValue for this file."""
 
-    def getstrlen(self, optimization, mode, lengthbox=None):
+    def getstrlen(self, optimizer, mode, lengthbox=None):
         if mode is mode_string:
             s = self.get_constant_string_spec(mode_string)
             if s is not None:
@@ -56,13 +56,13 @@
             s = self.get_constant_string_spec(mode_unicode)
             if s is not None:
                 return ConstInt(len(s))
-        if optimization is None:
+        if optimizer is None:
             return None
         self.ensure_nonnull()
         box = self.force_box()
         if not lengthbox:
             lengthbox = BoxInt()
-        optimization.emit_operation(ResOperation(mode.STRLEN, [box], lengthbox))
+        optimizer.emit_operation(ResOperation(mode.STRLEN, [box], lengthbox))
         return lengthbox
 
     @specialize.arg(1)
@@ -125,7 +125,7 @@
         assert 0 <= start <= stop <= len(longerlist)
         self._chars = longerlist[start:stop]
 
-    def getstrlen(self, _, mode, lengthbox=None):
+    def getstrlen(self, optimizer, mode, lengthbox=None):
         if self._lengthbox is None:
             self._lengthbox = ConstInt(len(self._chars))
         return self._lengthbox
@@ -250,7 +250,7 @@
         self.vstart = vstart
         self.vlength = vlength
 
-    def getstrlen(self, _, mode, lengthbox=None):
+    def getstrlen(self, optimizer, mode, lengthbox=None):
         return self.vlength.force_box()
 
     @specialize.arg(1)


More information about the pypy-commit mailing list