RESOLVED FIXED 161671
[JSC] Use GetArrayLength for JSArray.length even when the array type is undecided
https://bugs.webkit.org/show_bug.cgi?id=161671
Summary [JSC] Use GetArrayLength for JSArray.length even when the array type is undec...
Benjamin Poulain
Reported 2016-09-06 20:34:00 PDT
[JSC] Use GetArrayLength for JSArray.length even when the array type is undecided
Attachments
Patch (9.31 KB, patch)
2016-09-07 20:12 PDT, Benjamin Poulain
no flags
Benjamin Poulain
Comment 1 2016-09-07 20:12:57 PDT
Geoffrey Garen
Comment 2 2016-09-08 09:24:46 PDT
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"?
Benjamin Poulain
Comment 3 2016-09-12 14:51:36 PDT
(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").
WebKit Commit Bot
Comment 4 2016-09-12 15:15:43 PDT
Comment on attachment 288232 [details] Patch Clearing flags on attachment: 288232 Committed r205830: <http://trac.webkit.org/changeset/205830>
WebKit Commit Bot
Comment 5 2016-09-12 15:15:46 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.