# See the License for the specific language governing permissions and
# limitations under the License.
-# This package implements Class Hierarchy Analysis (CHA)
+# This module implements Class Hierarchy Analysis (CHA)
package cha_analysis
import reachable_method_analysis
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(builder.program.module).local_class
+ var cls = t.for_module(builder.program.main_module).local_class
var m = cls[ic.property.global].as(MMMethod)
var r = cls.new_instance_iroutine[m]
builder.add_search(ic.property, r, false, false)
builder.add_search(ic.property, ic.property.iroutine, false, false)
else if ic isa ICheckInstance then
var t = ic.stype
- var cls = t.for_module(builder.program.module).local_class
+ var cls = t.for_module(builder.program.main_module).local_class
var ir = cls.checknew_iroutine
builder.add_search(null, ir, true, false)
else if ic isa IInitAttributes then
var t = ic.stype
- var cls = t.for_module(builder.program.module).local_class
+ var cls = t.for_module(builder.program.main_module).local_class
var ir = cls.init_var_iroutine
builder.add_search(null, ir, true, false)
end