RESOLVED FIXED 158802
DFGByteCodeParser should be able to infer the value of unset properties in MultiGetByOffset
https://bugs.webkit.org/show_bug.cgi?id=158802
Summary DFGByteCodeParser should be able to infer the value of unset properties in Mu...
Keith Miller
Reported 2016-06-15 11:48:17 PDT
DFGByteCodeParser should be able to infer the value of unset properties in MultiGetByOffset
Attachments
Patch (6.22 KB, patch)
2016-06-15 11:51 PDT, Keith Miller
no flags
Patch for landing (6.97 KB, patch)
2016-06-15 12:11 PDT, Keith Miller
no flags
Keith Miller
Comment 1 2016-06-15 11:51:57 PDT
Geoffrey Garen
Comment 2 2016-06-15 12:00:51 PDT
Comment on attachment 281376 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=281376&action=review > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2949 > + if (!result) { > + // We have a unset property. > + ASSERT(!conditionSet.numberOfConditionsWithKind(PropertyCondition::Presence)); > + return GetByOffsetMethod::constant(m_constantUndefined); > + } Can this go inside the switch?
Filip Pizlo
Comment 3 2016-06-15 12:02:05 PDT
Comment on attachment 281376 [details] Patch Can you add a comment in DFGMultiGetByoffsetData.h, at GetByOffsetMethod, that constant may be due to unset? I don't think it's likely that phases will differentiate between unset and constant, but if they do, we want to remember this quirk. r=me but cq- because I think you should make that change.
Keith Miller
Comment 4 2016-06-15 12:05:16 PDT
Comment on attachment 281376 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=281376&action=review >> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:2949 >> + } > > Can this go inside the switch? I don't think so since we might have a prototype load which needs a absence in the middle. For example, we are loading foo from a, where a's prototype chain looks like a -> b -> c and c has the property foo. We would need to have an absence condition for foo on b in a set that contains a presence condition on c.
Keith Miller
Comment 5 2016-06-15 12:11:26 PDT
Created attachment 281378 [details] Patch for landing
WebKit Commit Bot
Comment 6 2016-06-15 12:40:42 PDT
Comment on attachment 281378 [details] Patch for landing Clearing flags on attachment: 281378 Committed r202101: <http://trac.webkit.org/changeset/202101>
WebKit Commit Bot
Comment 7 2016-06-15 12:40: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.