Commit 85f5c1d9 authored by John Zhang's avatar John Zhang

some debugging information

parent 8eb50e0a
......@@ -87,6 +87,7 @@ class W_FastListIterObject(W_AbstractSeqIterObject):
w_item = w_seq.getitem(index)
except IndexError:
self.w_seq = None
print "[iterobject.py:90] caught IndexError"
raise OperationError(space.w_StopIteration, space.w_None)
self.index = index + 1
return w_item
......
......@@ -1388,6 +1388,9 @@ class AbstractUnwrappedStrategy(object):
try:
r = l[index]
except IndexError: # make RPython raise the exception
print "[%s:1391] len(l) = %d" % (__file__, len(l))
print "[%s:1392] index = %d" % (__file__, index)
print "[%s:1393] reraise IndexError" % __file__
raise
return self.wrap(r)
......
......@@ -708,7 +708,7 @@ def ll_getitem_nonneg(func, basegetitem, l, index):
print "[%s:%d] raise IndexError" % (__file__, 684)
raise IndexError
return basegetitem(l, index)
ll_getitem_nonneg._always_inline_ = True
# ll_getitem_nonneg._always_inline_ = True
# no oopspec -- the function is inlined by the JIT
def ll_getitem(func, basegetitem, l, index):
......@@ -720,7 +720,12 @@ def ll_getitem(func, basegetitem, l, index):
# check that we now have (0 <= index < length).
index = r_uint(index) + r_uint(length)
if index >= r_uint(length):
print "[%s:%d] raise IndexError" % (__file__, 723)
print "[%s:723] raise IndexError" % __file__
print "[%s:724] length = %d" % (__file__, length)
print "[%s:725] index = %d" % (__file__, index)
print "[%s:726] r_uint(length) = %d" % (__file__, r_uint(length))
# from rpython.rlib.debug import attach_gdb
# attach_gdb()
raise IndexError
index = intmask(index)
else:
......@@ -748,7 +753,7 @@ def ll_setitem_nonneg(func, l, index, newitem):
print "[%s:%d] raise IndexError" % (__file__, 748)
raise IndexError
l.ll_setitem_fast(index, newitem)
ll_setitem_nonneg._always_inline_ = True
# ll_setitem_nonneg._always_inline_ = True
# no oopspec -- the function is inlined by the JIT
def ll_setitem(func, l, index, newitem):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment