def load(self, meth): holdertype = self.holder.GetType() funcfield = holdertype.GetField('func') Const.load(self, meth) meth.il.Emit(OpCodes.Castclass, holdertype) meth.il.Emit(OpCodes.Ldfld, funcfield) meth.il.Emit(OpCodes.Castclass, dotnet.typeof(LoopDelegate))
def setinteriorfield(self, index, ofs, value): raise NotImplementedError class ConstantValue(OptValue): def __init__(self, box): self.make_constant(box) def __repr__(self): return 'Constant(%r)' % (self.box,) CONST_0 = ConstInt(0) CONST_1 = ConstInt(1) CVAL_ZERO = ConstantValue(CONST_0) CVAL_ZERO_FLOAT = ConstantValue(Const._new(0.0)) llhelper.CVAL_NULLREF = ConstantValue(llhelper.CONST_NULL) oohelper.CVAL_NULLREF = ConstantValue(oohelper.CONST_NULL) REMOVED = AbstractResOp(None) class Optimization(object): next_optimization = None def __init__(self): pass # make rpython happy def propagate_forward(self, op): raise NotImplementedError def emit_operation(self, op):
def setinteriorfield(self, index, ofs, value): raise NotImplementedError class ConstantValue(OptValue): def __init__(self, box): self.make_constant(box) def __repr__(self): return 'Constant(%r)' % (self.box, ) CONST_0 = ConstInt(0) CONST_1 = ConstInt(1) CVAL_ZERO = ConstantValue(CONST_0) CVAL_ZERO_FLOAT = ConstantValue(Const._new(0.0)) llhelper.CVAL_NULLREF = ConstantValue(llhelper.CONST_NULL) oohelper.CVAL_NULLREF = ConstantValue(oohelper.CONST_NULL) REMOVED = AbstractResOp(None) class Optimization(object): next_optimization = None def __init__(self): pass # make rpython happy def propagate_forward(self, op): raise NotImplementedError def emit_operation(self, op):