def get_ir_numeric(cfg_num, cfg_var_list, ir_var_list): assert (isinstance(cfg_num, cfg.Numeric)) if isinstance(cfg_num, cfg.Variable): k = 0 for cv in cfg_var_list: if cv == cfg_num: return ir_var_list[k] k = k + 1 return None else: return ir.Constant(cfg_num.value)
def ldc_i4_s(self, _, value): self.push(ir.Constant('i32', value.value))
def newobj(self, _, ctor): self.push(ir.Constant('i32', 1234))
def ldc_i4_7(self, _): self.push(ir.Constant('i32', 7))
def ldc_i4_8(self, _): self.push(ir.Constant('i32', 8))
def ldc_i4_5(self, _): self.push(ir.Constant('i32', 5))
def ldc_i4_6(self, _): self.push(ir.Constant('i32', 6))
def ldc_i4_4(self, _): self.push(ir.Constant('i32', 4))
def ldc_i4_3(self, _): self.push(ir.Constant('i32', 3))
def ldc_i4_2(self, _): self.push(ir.Constant('i32', 2))
def ldc_i4_1(self, _): self.push(ir.Constant('i32', 1))
def ldc_i4_0(self, _): self.push(ir.Constant('i32', 0))