Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r65760:6137a9ea6b51
Date: 2013-07-28 13:12 -0700
http://bitbucket.org/pypy/pypy/changeset/6137a9ea6b51/
Log: Removed some code that had been commented out since forever:
http://nedbatchelder.com/text/deleting-code.html
diff --git a/rpython/annotator/builtin.py b/rpython/annotator/builtin.py
--- a/rpython/annotator/builtin.py
+++ b/rpython/annotator/builtin.py
@@ -210,8 +210,6 @@
r.const, = answers
return r
-##def builtin_callable(s_obj):
-## return SomeBool()
def builtin_tuple(s_iterable):
if isinstance(s_iterable, SomeTuple):
diff --git a/rpython/config/translationoption.py
b/rpython/config/translationoption.py
--- a/rpython/config/translationoption.py
+++ b/rpython/config/translationoption.py
@@ -151,11 +151,6 @@
BoolOption("no__thread",
"don't use __thread for implementing TLS",
default=False, cmdline="--no__thread", negation=False),
-## --- not supported since a long time. Use the env vars CFLAGS/LDFLAGS.
-## StrOption("compilerflags", "Specify flags for the C compiler",
-## cmdline="--cflags"),
-## StrOption("linkerflags", "Specify flags for the linker (C backend only)",
-## cmdline="--ldflags"),
IntOption("make_jobs", "Specify -j argument to make for compilation"
" (C backend only)",
cmdline="--make-jobs", default=detect_number_of_processors()),
diff --git a/rpython/jit/backend/llsupport/test/test_gc.py
b/rpython/jit/backend/llsupport/test/test_gc.py
--- a/rpython/jit/backend/llsupport/test/test_gc.py
+++ b/rpython/jit/backend/llsupport/test/test_gc.py
@@ -137,18 +137,6 @@
self.gc_ll_descr = gc_ll_descr
self.fake_cpu = FakeCPU()
-## def test_args_for_new(self):
-## S = lltype.GcStruct('S', ('x', lltype.Signed))
-## sizedescr = get_size_descr(self.gc_ll_descr, S)
-## args = self.gc_ll_descr.args_for_new(sizedescr)
-## for x in args:
-## assert lltype.typeOf(x) == lltype.Signed
-## A = lltype.GcArray(lltype.Signed)
-## arraydescr = get_array_descr(self.gc_ll_descr, A)
-## args = self.gc_ll_descr.args_for_new(sizedescr)
-## for x in args:
-## assert lltype.typeOf(x) == lltype.Signed
-
def test_gc_malloc(self):
S = lltype.GcStruct('S', ('x', lltype.Signed))
sizedescr = descr.get_size_descr(self.gc_ll_descr, S)
diff --git a/rpython/jit/backend/x86/test/test_rx86_32_auto_encoding.py
b/rpython/jit/backend/x86/test/test_rx86_32_auto_encoding.py
--- a/rpython/jit/backend/x86/test/test_rx86_32_auto_encoding.py
+++ b/rpython/jit/backend/x86/test/test_rx86_32_auto_encoding.py
@@ -190,10 +190,6 @@
#
for args in args_lists:
suffix = ""
- ## all = instr.as_all_suffixes
- ## for m, extra in args:
- ## if m in (i386.MODRM, i386.MODRM8) or all:
- ## suffix = suffixes[sizes[m]] + suffix
if (argmodes and not self.is_xmm_insn
and not instrname.startswith('FSTP')):
suffix = suffixes[self.WORD]
diff --git a/rpython/jit/codewriter/test/test_longlong.py
b/rpython/jit/codewriter/test/test_longlong.py
--- a/rpython/jit/codewriter/test/test_longlong.py
+++ b/rpython/jit/codewriter/test/test_longlong.py
@@ -236,17 +236,3 @@
assert list(op1.args[3]) == vlist
assert op1.result == v_result
-
-##def test_singlefloat_constants():
-## v_x = varoftype(TYPE)
-## vlist = [v_x, const(rffi.cast(TYPE, 7))]
-## v_result = varoftype(TYPE)
-## op = SpaceOperation('llong_add', vlist, v_result)
-## tr = Transformer(FakeCPU(), FakeBuiltinCallControl())
-## op1 = tr.rewrite_operation(op)
-## #
-## assert op1.opname == 'residual_call_irf_f'
-## assert list(op1.args[2]) == []
-## assert list(op1.args[3]) == []
-## assert list(op1.args[4]) == vlist
-## assert op1.result == v_result
diff --git a/rpython/jit/metainterp/executor.py
b/rpython/jit/metainterp/executor.py
--- a/rpython/jit/metainterp/executor.py
+++ b/rpython/jit/metainterp/executor.py
@@ -283,22 +283,6 @@
# ____________________________________________________________
-##def do_force_token(cpu):
-## raise NotImplementedError
-
-##def do_virtual_ref(cpu, box1, box2):
-## raise NotImplementedError
-
-##def do_virtual_ref_finish(cpu, box1, box2):
-## raise NotImplementedError
-
-##def do_debug_merge_point(cpu, box1):
-## from rpython.jit.metainterp.warmspot import get_stats
-## loc = box1._get_str()
-## get_stats().add_merge_point_location(loc)
-
-# ____________________________________________________________
-
def _make_execute_list():
execute_by_num_args = {}
diff --git a/rpython/jit/metainterp/optimizeopt/rewrite.py
b/rpython/jit/metainterp/optimizeopt/rewrite.py
--- a/rpython/jit/metainterp/optimizeopt/rewrite.py
+++ b/rpython/jit/metainterp/optimizeopt/rewrite.py
@@ -411,18 +411,6 @@
def optimize_INSTANCE_PTR_NE(self, op):
self._optimize_oois_ooisnot(op, True, True)
-## def optimize_INSTANCEOF(self, op):
-## value = self.getvalue(op.args[0])
-## realclassbox = value.get_constant_class(self.optimizer.cpu)
-## if realclassbox is not None:
-## checkclassbox = self.optimizer.cpu.typedescr2classbox(op.descr)
-## result = self.optimizer.cpu.ts.subclassOf(self.optimizer.cpu,
-## realclassbox,
-## checkclassbox)
-## self.make_constant_int(op.result, result)
-## return
-## self.emit_operation(op)
-
def optimize_CALL(self, op):
# dispatch based on 'oopspecindex' to a method that handles
# specifically the given oopspec call. For non-oopspec calls,
diff --git a/rpython/jit/metainterp/optimizeopt/virtualize.py
b/rpython/jit/metainterp/optimizeopt/virtualize.py
--- a/rpython/jit/metainterp/optimizeopt/virtualize.py
+++ b/rpython/jit/metainterp/optimizeopt/virtualize.py
@@ -698,7 +698,6 @@
self.make_constant_int(op.result, value.getlength())
else:
value.ensure_nonnull()
- ###self.optimize_default(op)
self.emit_operation(op)
def optimize_GETARRAYITEM_GC(self, op):
diff --git a/rpython/jit/metainterp/pyjitpl.py
b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -1254,10 +1254,6 @@
def setup_resume_at_op(self, pc):
self.pc = pc
- ## values = ' '.join([box.repr_rpython() for box in self.env])
- ## log('setup_resume_at_op %s:%d [%s] %d' % (self.jitcode.name,
- ## self.pc, values,
- ## self.exception_target))
def run_one_step(self):
# Execute the frame forward. This method contains a loop that leaves
diff --git a/rpython/memory/gctransform/framework.py
b/rpython/memory/gctransform/framework.py
--- a/rpython/memory/gctransform/framework.py
+++ b/rpython/memory/gctransform/framework.py
@@ -299,10 +299,6 @@
else:
malloc_fixedsize_meth = None
self.malloc_fixedsize_ptr = self.malloc_fixedsize_clear_ptr
-## self.malloc_varsize_ptr = getfn(
-## GCClass.malloc_varsize.im_func,
-## [s_gc] + [annmodel.SomeInteger(nonneg=True) for i in range(5)]
-## + [annmodel.SomeBool()], s_gcref)
self.malloc_varsize_clear_ptr = getfn(
GCClass.malloc_varsize_clear.im_func,
[s_gc, s_typeid16]
diff --git a/rpython/memory/gctransform/refcounting.py
b/rpython/memory/gctransform/refcounting.py
--- a/rpython/memory/gctransform/refcounting.py
+++ b/rpython/memory/gctransform/refcounting.py
@@ -12,22 +12,6 @@
counts = {}
-## def print_call_chain(ob):
-## import sys
-## f = sys._getframe(1)
-## stack = []
-## flag = False
-## while f:
-## if f.f_locals.get('self') is ob:
-## stack.append((f.f_code.co_name, f.f_locals.get('TYPE')))
-## if not flag:
-## counts[f.f_code.co_name] = counts.get(f.f_code.co_name, 0)
+ 1
-## print counts
-## flag = True
-## f = f.f_back
-## stack.reverse()
-## for i, (a, b) in enumerate(stack):
-## print ' '*i, a, repr(b)[:100-i-len(a)], id(b)
ADDRESS_VOID_FUNC = lltype.FuncType([llmemory.Address], lltype.Void)
diff --git a/rpython/rlib/rmarshal.py b/rpython/rlib/rmarshal.py
--- a/rpython/rlib/rmarshal.py
+++ b/rpython/rlib/rmarshal.py
@@ -429,26 +429,3 @@
expected_length = len(itemloaders)
unroll_item_loaders = unrolling_iterable(enumerate(itemloaders))
add_loader(s_tuple, load_tuple)
-
-
-## -- not used any more right now --
-##class __extend__(pairtype(MTag, controllerentry.SomeControlledInstance)):
-## # marshal a ControlledInstance by marshalling the underlying object
-
-## def install_marshaller((tag, s_obj)):
-## def dump_controlled_instance(buf, x):
-## real_obj = controllerentry.controlled_instance_unbox(controller,
x)
-## realdumper(buf, real_obj)
-
-## controller = s_obj.controller
-## realdumper = get_marshaller(s_obj.s_real_obj)
-## add_dumper(s_obj, dump_controlled_instance)
-
-## def install_unmarshaller((tag, s_obj)):
-## def load_controlled_instance(loader):
-## real_obj = realloader(loader)
-## return controllerentry.controlled_instance_box(controller,
-## real_obj)
-## controller = s_obj.controller
-## realloader = get_loader(s_obj.s_real_obj)
-## add_loader(s_obj, load_controlled_instance)
diff --git a/rpython/rtyper/lltypesystem/lltype.py
b/rpython/rtyper/lltypesystem/lltype.py
--- a/rpython/rtyper/lltypesystem/lltype.py
+++ b/rpython/rtyper/lltypesystem/lltype.py
@@ -343,9 +343,6 @@
def _short_name(self):
return "%s %s" % (self.__class__.__name__, self._name)
-## def _defl(self, parent=None, parentindex=None):
-## return _struct(self, parent=parent, parentindex=parentindex)
-
def _allocate(self, initialization, parent=None, parentindex=None):
return _struct(self, initialization=initialization,
parent=parent, parentindex=parentindex)
@@ -1029,15 +1026,6 @@
parent = container._parentstructure()
if parent is not None:
return parent, container._parent_index
-## if isinstance(parent, _struct):
-## for name in parent._TYPE._names:
-## if getattr(parent, name) is container:
-## return parent, name
-## raise RuntimeError("lost ourselves")
-## if isinstance(parent, _array):
-## raise TypeError("cannot fish a pointer to an array item or an "
-## "inlined substructure of it")
-## raise AssertionError("don't know about %r" % (parent,))
else:
return None, None
diff --git a/rpython/rtyper/lltypesystem/opimpl.py
b/rpython/rtyper/lltypesystem/opimpl.py
--- a/rpython/rtyper/lltypesystem/opimpl.py
+++ b/rpython/rtyper/lltypesystem/opimpl.py
@@ -452,10 +452,6 @@
def op_cast_int_to_adr(int):
return llmemory.cast_int_to_adr(int)
-##def op_cast_int_to_adr(x):
-## assert type(x) is int
-## return llmemory.cast_int_to_adr(x)
-
def op_convert_float_bytes_to_longlong(a):
from rpython.rlib.longlong2float import float2longlong
return float2longlong(a)
diff --git a/rpython/rtyper/lltypesystem/rclass.py
b/rpython/rtyper/lltypesystem/rclass.py
--- a/rpython/rtyper/lltypesystem/rclass.py
+++ b/rpython/rtyper/lltypesystem/rclass.py
@@ -54,7 +54,7 @@
# ... // extra instance attributes
# }
#
-# there's also a nongcobject
+# there's also a nongcobject
OBJECT_VTABLE = lltype.ForwardReference()
CLASSTYPE = Ptr(OBJECT_VTABLE)
@@ -284,16 +284,11 @@
cname = inputconst(Void, mangled_name)
return llops.genop('getfield', [v_vtable, cname], resulttype=r)
- def rtype_issubtype(self, hop):
+ def rtype_issubtype(self, hop):
class_repr = get_type_repr(self.rtyper)
v_cls1, v_cls2 = hop.inputargs(class_repr, class_repr)
if isinstance(v_cls2, Constant):
cls2 = v_cls2.value
- # XXX re-implement the following optimization
-## if cls2.subclassrange_max == cls2.subclassrange_min:
-## # a class with no subclass
-## return hop.genop('ptr_eq', [v_cls1, v_cls2], resulttype=Bool)
-## else:
minid = hop.inputconst(Signed, cls2.subclassrange_min)
maxid = hop.inputconst(Signed, cls2.subclassrange_max)
return hop.gendirectcall(ll_issubclass_const, v_cls1, minid,
@@ -313,7 +308,7 @@
else:
ForwardRef = lltype.FORWARDREF_BY_FLAVOR[LLFLAVOR[gcflavor]]
self.object_type = ForwardRef()
-
+
self.iprebuiltinstances = identity_dict()
self.lowleveltype = Ptr(self.object_type)
self.gcflavor = gcflavor
diff --git a/rpython/rtyper/lltypesystem/rpbc.py
b/rpython/rtyper/lltypesystem/rpbc.py
--- a/rpython/rtyper/lltypesystem/rpbc.py
+++ b/rpython/rtyper/lltypesystem/rpbc.py
@@ -181,9 +181,6 @@
funcdesc = self.rtyper.annotator.bookkeeper.getdesc(value)
return self.convert_desc(funcdesc)
-## def convert_to_concrete_llfn(self, v, shape, index, llop):
-## return v
-
def rtype_simple_call(self, hop):
return self.call('simple_call', hop)
@@ -321,15 +318,6 @@
c_table = conversion_table(r_from, r_to)
if c_table:
assert v.concretetype is Char
-## from rpython.rtyper.lltypesystem.rstr import string_repr
-## s =
repr(llops.rtyper.annotator.annotated.get(llops.originalblock))
-## if 'LOAD_GLOBAL' in s:
-## import pdb; pdb.set_trace()
-## print >> myf, 'static small conv', s
-## print 'static small conv', s
-## llops.genop('debug_print',
-## [Constant(string_repr.convert_const("dynamic small
conv" + s),
-## string_repr.lowleveltype)])
v_int = llops.genop('cast_char_to_int', [v],
resulttype=Signed)
return llops.genop('getarrayitem', [c_table, v_int],
diff --git a/rpython/rtyper/lltypesystem/rvirtualizable2.py
b/rpython/rtyper/lltypesystem/rvirtualizable2.py
--- a/rpython/rtyper/lltypesystem/rvirtualizable2.py
+++ b/rpython/rtyper/lltypesystem/rvirtualizable2.py
@@ -11,17 +11,3 @@
if self.top_of_virtualizable_hierarchy:
llfields.append(('vable_token', llmemory.GCREF))
return llfields
-
-## The code below is commented out because vtable_token is always
-## initialized to NULL anyway.
-##
-## def set_vable(self, llops, vinst, force_cast=False):
-## if self.top_of_virtualizable_hierarchy:
-## if force_cast:
-## vinst = llops.genop('cast_pointer', [vinst], resulttype=self)
-## cname = inputconst(lltype.Void, 'vable_token')
-## cvalue = inputconst(llmemory.GCREF,
-## lltype.nullptr(llmemory.GCREF.TO))
-## llops.genop('setfield', [vinst, cname, cvalue])
-## else:
-## self.rbase.set_vable(llops, vinst, force_cast=True)
diff --git a/rpython/rtyper/rlist.py b/rpython/rtyper/rlist.py
--- a/rpython/rtyper/rlist.py
+++ b/rpython/rtyper/rlist.py
@@ -326,15 +326,6 @@
return NotImplemented
return v
-## # TODO: move it to lltypesystem
-## def rtype_is_((r_lst1, r_lst2), hop):
-## if r_lst1.lowleveltype != r_lst2.lowleveltype:
-## # obscure logic, the is can be true only if both are None
-## v_lst1, v_lst2 = hop.inputargs(r_lst1, r_lst2)
-## return hop.gendirectcall(ll_both_none, v_lst1, v_lst2)
-
-## return pairtype(Repr, Repr).rtype_is_(pair(r_lst1, r_lst2), hop)
-
def rtype_eq((r_lst1, r_lst2), hop):
assert r_lst1.item_repr == r_lst2.item_repr
v_lst1, v_lst2 = hop.inputargs(r_lst1, r_lst2)
diff --git a/rpython/rtyper/rpbc.py b/rpython/rtyper/rpbc.py
--- a/rpython/rtyper/rpbc.py
+++ b/rpython/rtyper/rpbc.py
@@ -60,14 +60,6 @@
t = ()
return tuple([self.__class__, self.can_be_None]+lst)+t
-##builtin_descriptor_type = (
-## type(len), # type 'builtin_function_or_method'
-## type(list.append), # type 'method_descriptor'
-## type(type(None).__repr__), # type 'wrapper_descriptor'
-## type(type.__dict__['__dict__']), # type 'getset_descriptor'
-## type(type.__dict__['__flags__']), # type 'member_descriptor'
-## )
-
# ____________________________________________________________
class ConcreteCallTableRow(dict):
@@ -196,16 +188,6 @@
funcdesc = self.s_pbc.any_description()
return funcdesc.get_s_signatures(shape)
-## def function_signatures(self):
-## if self._function_signatures is None:
-## self._function_signatures = {}
-## for func in self.s_pbc.prebuiltinstances:
-## if func is not None:
-## self._function_signatures[func] =
getsignature(self.rtyper,
-## func)
-## assert self._function_signatures
-## return self._function_signatures
-
def convert_desc(self, funcdesc):
# get the whole "column" of the call table corresponding to this desc
try:
@@ -876,16 +858,6 @@
return hop2
# ____________________________________________________________
-##def getsignature(rtyper, func):
-## f = rtyper.getcallable(func)
-## graph = rtyper.type_system_deref(f).graph
-## rinputs = [rtyper.bindingrepr(v) for v in graph.getargs()]
-## if graph.getreturnvar() in rtyper.annotator.bindings:
-## rresult = rtyper.bindingrepr(graph.getreturnvar())
-## else:
-## rresult = Void
-## return f, rinputs, rresult
-
def samesig(funcs):
import inspect
argspec = inspect.getargspec(funcs[0])
diff --git a/rpython/rtyper/rptr.py b/rpython/rtyper/rptr.py
--- a/rpython/rtyper/rptr.py
+++ b/rpython/rtyper/rptr.py
@@ -9,16 +9,12 @@
class __extend__(annmodel.SomePtr):
def rtyper_makerepr(self, rtyper):
-## if self.is_constant() and not self.const: # constant NULL
-## return nullptr_repr
-## else:
return PtrRepr(self.ll_ptrtype)
+
def rtyper_makekey(self):
-## if self.is_constant() and not self.const:
-## return None
-## else:
return self.__class__, self.ll_ptrtype
+
class __extend__(annmodel.SomeInteriorPtr):
def rtyper_makerepr(self, rtyper):
return InteriorPtrRepr(self.ll_ptrtype)
@@ -154,22 +150,6 @@
vlist = hop.inputargs(r_ptr, lltype.Signed, hop.args_r[2])
hop.genop('setarrayitem', vlist)
-# ____________________________________________________________
-#
-# Null Pointers
-
-##class NullPtrRepr(Repr):
-## lowleveltype = lltype.Void
-
-## def rtype_is_true(self, hop):
-## return hop.inputconst(lltype.Bool, False)
-
-##nullptr_repr = NullPtrRepr()
-
-##class __extend__(pairtype(NullPtrRepr, PtrRepr)):
-## def convert_from_to((r_null, r_ptr), v, llops):
-## # nullptr to general pointer
-## return inputconst(r_ptr, _ptr(r_ptr.lowleveltype, None))
# ____________________________________________________________
#
diff --git a/rpython/rtyper/rstr.py b/rpython/rtyper/rstr.py
--- a/rpython/rtyper/rstr.py
+++ b/rpython/rtyper/rstr.py
@@ -676,13 +676,6 @@
get_ll_fasthash_function = get_ll_hash_function
-## def rtype_len(_, hop):
-## return hop.inputconst(Signed, 1)
-##
-## def rtype_is_true(_, hop):
-## assert not hop.args_s[0].can_be_None
-## return hop.inputconst(Bool, True)
-
def rtype_ord(_, hop):
rstr = hop.rtyper.type_system.rstr
vlist = hop.inputargs(rstr.unichar_repr)
@@ -694,10 +687,6 @@
pairtype(AbstractUniCharRepr, AbstractCharRepr)):
def rtype_eq(_, hop): return _rtype_unchr_compare_template(hop, 'eq')
def rtype_ne(_, hop): return _rtype_unchr_compare_template(hop, 'ne')
-## def rtype_lt(_, hop): return _rtype_unchr_compare_template(hop, 'lt')
-## def rtype_le(_, hop): return _rtype_unchr_compare_template(hop, 'le')
-## def rtype_gt(_, hop): return _rtype_unchr_compare_template(hop, 'gt')
-## def rtype_ge(_, hop): return _rtype_unchr_compare_template(hop, 'ge')
#Helper functions for comparisons
diff --git a/rpython/rtyper/rtyper.py b/rpython/rtyper/rtyper.py
--- a/rpython/rtyper/rtyper.py
+++ b/rpython/rtyper/rtyper.py
@@ -77,14 +77,6 @@
except:
self.seed = 0
self.order = None
- # the following code would invoke translator.goal.order, which is
- # not up-to-date any more:
-## RTYPERORDER = os.getenv('RTYPERORDER')
-## if RTYPERORDER:
-## order_module = RTYPERORDER.split(',')[0]
-## self.order = __import__(order_module, {}, {}, ['*']).order
-## s = 'Using %s.%s for order' % (self.order.__module__,
self.order.__name__)
-## self.log.info(s)
def getconfig(self):
return self.annotator.translator.config
diff --git a/rpython/rtyper/rvirtualizable2.py
b/rpython/rtyper/rvirtualizable2.py
--- a/rpython/rtyper/rvirtualizable2.py
+++ b/rpython/rtyper/rvirtualizable2.py
@@ -22,9 +22,6 @@
def _setup_repr_llfields(self):
raise NotImplementedError
-## def set_vable(self, llops, vinst, force_cast=False):
-## raise NotImplementedError
-
def _setup_repr(self):
if self.top_of_virtualizable_hierarchy:
hints = {'virtualizable2_accessor': self.accessor}
@@ -42,11 +39,6 @@
# not need it, but it doesn't hurt to have it anyway
self.my_redirected_fields = self.rbase.my_redirected_fields
-## def new_instance(self, llops, classcallhop=None):
-## vptr = self._super().new_instance(llops, classcallhop)
-## self.set_vable(llops, vptr)
-## return vptr
-
def hook_access_field(self, vinst, cname, llops, flags):
#if not flags.get('access_directly'):
if self.my_redirected_fields.get(cname.value):
diff --git a/rpython/rtyper/test/test_nongc.py
b/rpython/rtyper/test/test_nongc.py
--- a/rpython/rtyper/test/test_nongc.py
+++ b/rpython/rtyper/test/test_nongc.py
@@ -230,6 +230,3 @@
assert isinstance(s, annmodel.SomeAddress)
rtyper = RPythonTyper(a)
rtyper.specialize()
-## from rpython.memory.lladdress import _address
-## res = interpret(malloc_and_free, [_address()])
-## assert res == _address()
diff --git a/rpython/translator/backendopt/test/test_raisingop2direct_call.py
b/rpython/translator/backendopt/test/test_raisingop2direct_call.py
--- a/rpython/translator/backendopt/test/test_raisingop2direct_call.py
+++ b/rpython/translator/backendopt/test/test_raisingop2direct_call.py
@@ -51,18 +51,6 @@
res = fn(-5, 2)
assert res == -3
- # this becomes an int_floordiv_ovf_zer already?
-## def g(x, y):
-## try:
-## return ovfcheck(x//y)
-## except OverflowError:
-## return 123
-## gn = get_runner(g, 'int_floordiv_ovf', [int, int])
-## res = gn(-sys.maxint-1, -1)
-## assert res == 123
-## res = gn(-5, 2)
-## assert res == -3
-
def h(x, y):
try:
return ovfcheck(x//y)
diff --git a/rpython/translator/sandbox/rsandbox.py
b/rpython/translator/sandbox/rsandbox.py
--- a/rpython/translator/sandbox/rsandbox.py
+++ b/rpython/translator/sandbox/rsandbox.py
@@ -65,8 +65,6 @@
self.buf += ''.join([buf[i] for i in range(count)])
self.buflen *= 2
-##CFalse = CDefinedIntSymbolic('0') # hack hack
-
def sandboxed_io(buf):
STDIN = 0
STDOUT = 1
diff --git a/rpython/translator/tool/lltracker.py
b/rpython/translator/tool/lltracker.py
--- a/rpython/translator/tool/lltracker.py
+++ b/rpython/translator/tool/lltracker.py
@@ -106,8 +106,6 @@
yield name + ' @hdr', self.normalize(addrof._obj)
else:
yield name + ' @', self.normalize(o.ptr._obj)
-## if o.offset:
-## yield '... offset', str(o.offset)
else:
yield name, str(o)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit