[pypy-svn] r53555 - pypy/branch/jit-hotpath/pypy/jit/timeshifter
fijal at codespeak.net
fijal at codespeak.net
Tue Apr 8 00:06:10 CEST 2008
Author: fijal
Date: Tue Apr 8 00:06:10 2008
New Revision: 53555
Modified:
pypy/branch/jit-hotpath/pypy/jit/timeshifter/vlist.py
Log:
Complain louder than silent NotImplementedError
Modified: pypy/branch/jit-hotpath/pypy/jit/timeshifter/vlist.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/timeshifter/vlist.py (original)
+++ pypy/branch/jit-hotpath/pypy/jit/timeshifter/vlist.py Tue Apr 8 00:06:10 2008
@@ -6,6 +6,9 @@
from pypy.rpython.lltypesystem import lloperation
debug_print = lloperation.llop.debug_print
+class NotConstInAVlist(Exception):
+ pass
+
def TypeDesc(RGenOp, rtyper, exceptiondesc, LIST):
if rtyper.type_system.name == 'lltypesystem':
return LLTypeListTypeDesc(RGenOp, rtyper, exceptiondesc, LIST)
@@ -60,8 +63,11 @@
box = item_boxes[i]
if box is not None:
gv_value = box_gv_reader(box)
- v = gv_value.revealconst(LIST.ITEM)
- l.ll_setitem_fast(i, v)
+ if gv_value.is_const:
+ v = gv_value.revealconst(LIST.ITEM)
+ l.ll_setitem_fast(i, v)
+ else:
+ raise NotConstInAVlist("Cannot put variable to a vlist")
self.allocate = allocate
self.populate = populate
More information about the Pypy-commit
mailing list