[JSC] Use GetArrayLength for JSArray.length even when the array type is undecided
Created attachment 288232 [details] Patch
Comment on attachment 288232 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=288232&action=review r=me > Source/JavaScriptCore/dfg/DFGArrayMode.cpp:203 > - if (node->op() == GetByVal > + if ((node->op() == GetByVal || canBecomeGetArrayLength(graph, node)) Looks like the comment above needs an update. ...The code above returns early if index is not int32. How can we get here if we're compiling "array.length"?
(In reply to comment #2) > > Source/JavaScriptCore/dfg/DFGArrayMode.cpp:203 > > - if (node->op() == GetByVal > > + if ((node->op() == GetByVal || canBecomeGetArrayLength(graph, node)) > > Looks like the comment above needs an update. > > ...The code above returns early if index is not int32. How can we get here > if we're compiling "array.length"? For GetArrayLength, the index type is the type returned by GetById("length").
Comment on attachment 288232 [details] Patch Clearing flags on attachment: 288232 Committed r205830: <http://trac.webkit.org/changeset/205830>
All reviewed patches have been landed. Closing bug.