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