fun copy: RangeMap
do
var c = new RangeMap
- c.recover_with(self)
+ c.add_all(self)
return c
end
redef fun accept_range_analysis(v, ins, outs)
do
visit_all(v)
- if ins != null then outs.recover_with(ins)
+ if ins != null then outs.add_all(ins)
end
end
do
visit_all(v)
- if ins != null then outs.recover_with(ins)
+ if ins != null then outs.add_all(ins)
var variable = def_var
#var add = new RangeMap[Var, ValRange](variable,
do
visit_all(v)
- if ins != null then outs.recover_with(ins)
+ if ins != null then outs.add_all(ins)
var src = src_var # reg
var def = def_var # mem
do
visit_all(v)
- if ins != null then outs.recover_with(ins)
+ if ins != null then outs.add_all(ins)
var def = def_var # mem
v.current_range = null
visit_all(v)
- if ins != null then outs.recover_with(ins)
+ if ins != null then outs.add_all(ins)
var reg = reg_var
if r != null then
# this prevents infinite loops
- # we assume that the max for a student program in 999
- if r.max > 999 then r.max = 999
- if r.min < -999 then r.min = -999
+ # we assume that the max for a student program in 50
+ if r.max > 50 then r.max = 50
+ if r.min < -50 then r.min = -50
outs[reg] = r
else
v.current_range = null
visit_all(v)
- if ins != null then outs.recover_with(ins)
+ if ins != null then outs.add_all(ins)
var reg = reg_var
if ins.has_key(reg) then
v.current_range = null
visit_all(v)
- if ins != null then outs.recover_with(ins)
+ if ins != null then outs.add_all(ins)
var reg = new RegisterVar('A')
if outs.has_key(reg) then