On 9/22/16, 11:56 PM, "lizhi" <s...@qq.com> wrote:
>the float32array also has this issue. >and the Number() are slow in loop I could be wrong, but I'm pretty sure the compiler should try to insert a coercion there, because otherwise the JS code would behave differently than the AS code if there were strings in the array. The FalconJX compiler allows certain "directives" like @flexjsignorecoercion to control coercions since they can be wasteful. The following: /** * @flexjsignorecoercion Number */ public function numberarr():void { var arr:Array; var n:Number; n = arr[0] as Number; } was cross-compiled to: /** * @flexjsignorecoercion Number * @export */ VectorObject.prototype.numberarr = function() { var /** @type {Array} */ arr; var /** @type {number} */ n; n = arr[0]; }; Isn't that what you want? -Alex