Example #1
0
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)
Example #2
0
 def ldc_i4_s(self, _, value):
     self.push(ir.Constant('i32', value.value))
Example #3
0
 def newobj(self, _, ctor):
     self.push(ir.Constant('i32', 1234))
Example #4
0
 def ldc_i4_7(self, _):
     self.push(ir.Constant('i32', 7))
Example #5
0
 def ldc_i4_8(self, _):
     self.push(ir.Constant('i32', 8))
Example #6
0
 def ldc_i4_5(self, _):
     self.push(ir.Constant('i32', 5))
Example #7
0
 def ldc_i4_6(self, _):
     self.push(ir.Constant('i32', 6))
Example #8
0
 def ldc_i4_4(self, _):
     self.push(ir.Constant('i32', 4))
Example #9
0
 def ldc_i4_3(self, _):
     self.push(ir.Constant('i32', 3))
Example #10
0
 def ldc_i4_2(self, _):
     self.push(ir.Constant('i32', 2))
Example #11
0
 def ldc_i4_1(self, _):
     self.push(ir.Constant('i32', 1))
Example #12
0
 def ldc_i4_0(self, _):
     self.push(ir.Constant('i32', 0))