RESOLVED FIXED 162111
[JSC] Do not need to use defineProperty to define methods for object literals
https://bugs.webkit.org/show_bug.cgi?id=162111
Summary [JSC] Do not need to use defineProperty to define methods for object literals
Yusuke Suzuki
Reported 2016-09-16 20:18:13 PDT
[JSC] Do not need to use defineProperty to define methods for object literals
Attachments
Patch (7.71 KB, patch)
2016-09-16 21:10 PDT, Yusuke Suzuki
no flags
Patch (7.67 KB, patch)
2016-09-17 22:39 PDT, Yusuke Suzuki
no flags
Yusuke Suzuki
Comment 1 2016-09-16 21:10:29 PDT
Saam Barati
Comment 2 2016-09-17 16:50:37 PDT
Comment on attachment 289159 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=289159&action=review > Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:593 > + if (node.isClassProperty() && node.needsSuperBinding()) { Why && and not ||? When is isClassProperty true but needsSuperBinding false?
Yusuke Suzuki
Comment 3 2016-09-17 22:36:44 PDT
Comment on attachment 289159 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=289159&action=review >> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:593 >> + if (node.isClassProperty() && node.needsSuperBinding()) { > > Why && and not ||? When is isClassProperty true but needsSuperBinding false? || includes non-class cases we would like to avoid in this patch (isClassProperty = false, needsSuperBinding = true). BTW, currently, if isClassProperty = true, needsSuperBinding is always true. It may be changed (or not since we need to use defineProperty to perform conflict check) in the future when introducing class fields (static prop = ...;), but, anyway, I changed this condition to `if (node.isClassProperty())` and insert `ASSERT(node.needsSuperBinding())` for now.
Yusuke Suzuki
Comment 4 2016-09-17 22:39:27 PDT
Saam Barati
Comment 5 2016-09-18 10:20:32 PDT
Comment on attachment 289192 [details] Patch r=me
Yusuke Suzuki
Comment 6 2016-09-18 10:38:55 PDT
Comment on attachment 289192 [details] Patch Thanks!
WebKit Commit Bot
Comment 7 2016-09-18 10:42:23 PDT
Comment on attachment 289192 [details] Patch Clearing flags on attachment: 289192 Committed r206082: <http://trac.webkit.org/changeset/206082>
WebKit Commit Bot
Comment 8 2016-09-18 10:42:27 PDT
All reviewed patches have been landed. Closing bug.
Yusuke Suzuki
Comment 9 2016-09-18 23:24:19 PDT
According to arewefastyet, it causes some perf regression on kraken-parse-financial. I'll investigate it.
Yusuke Suzuki
Comment 10 2016-09-18 23:43:26 PDT
Hmmmmmmmmmmmmmmmmmmmmm, I cannot reproduce this regression on my Linux machine. And I think this patch is not related to this regression (maybe, this regression? can be gone later, I hope), since this code path is not used in kraken-parse-financial.
Yusuke Suzuki
Comment 11 2016-09-19 14:54:29 PDT
The regression is gone.
Note You need to log in before you can comment on or make changes to this bug.