hujiajie / pa-blink

0 stars 6 forks source link

[rework] typeinference.js: shall we drop 'lazyJSArrayCheck'? #4

Closed hujiajie closed 10 years ago

hujiajie commented 11 years ago

If this flag is false, then we will check whether the array is homogeneous while generating the type infomation. However, the default value of this flag is true in the current revision. It seems that the check is performed elsewhere, and we can safely skip the check managed by this flag. Then what's the necessity of this flag?

hujiajie commented 10 years ago

It should be noticed that this flag is only valid when JSArray is enabled in Firefox. In that case, the homogeneity check is performed by the generated code in __JS_array_sel_A (actually __JS_array_sel_A is not enabled by default even if JSArray is enabled). Currently, support for JSArray is not maintained, so I just left the related code unchanged. In the rework branch, we check the homogeneity of the array in RiverTrail.Helper.FlatArray.