Пример #1
0
 def codegen(context, builder, sig, args):
     [slicetype, lengthtype] = sig.args
     [sliceobj, length] = args
     slice = context.make_helper(builder, slicetype, sliceobj)
     slicing.guard_invalid_slice(context, builder, slicetype, slice)
     slicing.fix_slice(builder, slice, length)
     return slice._getvalue()
Пример #2
0
 def codegen(context, builder, sig, args):
     [slicetype, lengthtype] = sig.args
     [sliceobj, length] = args
     slice = context.make_helper(builder, slicetype, sliceobj)
     slicing.guard_invalid_slice(context, builder, slicetype, slice)
     slicing.fix_slice(builder, slice, length)
     return slice._getvalue()