end
class RFIMAContext
-special ReachableFromInitMethodAnalysis
+ super ReachableFromInitMethodAnalysis
readable var _reachable_from_init_iroutines: HashSet[IRoutine] = new HashSet[IRoutine]
redef fun is_iroutine_reachable_from_init(ir: nullable IRoutine): Bool do
end
class RFIMAVisitor
-special ICodeVisitor
+ super ICodeVisitor
readable var _context: RFIMAContext
readable var _program: Program
else if ic isa INew then
# FIXME: take only the last property on the redef. hierarchie
var t = ic.stype
- var cls = t.for_module(program.module).local_class
+ var cls = t.for_module(program.main_module).local_class
var m = cls[ic.property.global].as(MMMethod)
var r = cls.new_instance_iroutine[m]
process_call(r)
end
else if ic isa ICheckInstance then
var t = ic.stype
- var cls = t.for_module(program.module).local_class
+ var cls = t.for_module(program.main_module).local_class
var ir = cls.checknew_iroutine
if ir != null then process_call(ir)
else if ic isa IInitAttributes then
var t = ic.stype
- var cls = t.for_module(program.module).local_class
+ var cls = t.for_module(program.main_module).local_class
var ir = cls.init_var_iroutine
if ir != null then process_call(ir)
end