[pypy-commit] pypy jit-leaner-frontend: minor fixes
arigo
pypy.commits at gmail.com
Thu Mar 10 10:01:11 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: jit-leaner-frontend
Changeset: r82944:a8445a6ab102
Date: 2016-03-10 16:00 +0100
http://bitbucket.org/pypy/pypy/changeset/a8445a6ab102/
Log: minor fixes
diff --git a/rpython/jit/metainterp/opencoder.py b/rpython/jit/metainterp/opencoder.py
--- a/rpython/jit/metainterp/opencoder.py
+++ b/rpython/jit/metainterp/opencoder.py
@@ -16,7 +16,8 @@
TAGINT, TAGCONST, TAGBOX = range(3)
TAGMASK = 0x3
TAGSHIFT = 2
-NUM_SMALL_INTS = 2 ** (16 - TAGSHIFT)
+SMALL_INT_STOP = 2 ** (15 - TAGSHIFT)
+SMALL_INT_START = -SMALL_INT_STOP
class Sentinel(object):
pass
@@ -195,7 +196,7 @@
if isinstance(box, Const):
if (isinstance(box, ConstInt) and
isinstance(box.getint(), int) and # symbolics
- 0 <= box.getint() < NUM_SMALL_INTS):
+ SMALL_INT_START <= box.getint() < SMALL_INT_STOP):
return tag(TAGINT, box.getint())
else:
self._consts.append(box)
@@ -310,16 +311,9 @@
ops.append(iter.next())
return ops
- def _get_operations(self):
- """ NOT_RPYTHON
- """
- l = []
- i = self.get_iter()
- while not i.done():
- l.append(i.next())
- return l
-
def tag(kind, pos):
+ #if not SMALL_INT_START <= pos < SMALL_INT_STOP:
+ # raise some error
return (pos << TAGSHIFT) | kind
def untag(tagged):
More information about the pypy-commit
mailing list