Non-trivial inline cases problem.
I have problems when trying to inline functions that aren't just trivial expressions using getters or simple math function wrappers. I have AIR SDK 3.6 with stable ASC 2.0.
First problem is somewhat related to array access operator. I have:
class A {
private var _field:int;
...
[Inline]
public final function get field():int {
return _field;
}
}
...
var items:Vector.<A>;
...
//FIRST CASE - doesn't work
tmp += items.field;
//SECOND CASE - works!
var item:A = items;
tmp += item.field;
In first case getter won't get inlined, while in second case it will. Why? Vector is typed strongly enough to inferre the type of access operator expression I think.
Second issue:
class B {
private var _field:int;
[Inline]
public final function get field():int {
return _field;
}
}
class A {
public var b:B;
[Inline]
public final function get field():int {
return b.field;
}
}
var a:A;
tmp = a.field;
The field getter from A won't get inlined. Is this issue already known? How to deal with it. It is serious limitation of inlining feature.
