RESOLVED FIXED183987
[JSC] Remove repeated iteration of ElementNode
https://bugs.webkit.org/show_bug.cgi?id=183987
Summary [JSC] Remove repeated iteration of ElementNode
Yusuke Suzuki
Reported 2018-03-24 14:46:42 PDT
[JSC] Remove repeated iteration of ElementNode
Attachments
Patch (8.55 KB, patch)
2018-03-24 14:52 PDT, Yusuke Suzuki
keith_miller: review+
Yusuke Suzuki
Comment 1 2018-03-24 14:52:59 PDT
Keith Miller
Comment 2 2018-03-26 16:19:14 PDT
Comment on attachment 336486 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336486&action=review r=me with some nits. > Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:398 > + auto newArray = [&generator] (RegisterID* dst, ElementNode* elements, unsigned length, bool hadVariableExpression) { Nit: Why not just capture the args you're using? > Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:418 > + if (!!node->elision()) { Nit: You don't need the !!.
Yusuke Suzuki
Comment 3 2018-03-27 01:46:29 PDT
Comment on attachment 336486 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336486&action=review Thank you! >> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:398 >> + auto newArray = [&generator] (RegisterID* dst, ElementNode* elements, unsigned length, bool hadVariableExpression) { > > Nit: Why not just capture the args you're using? I want to separate the responsibility of ArrayNode::emitBytecode and this newArray function. This newArray does not recognize how `hadVariableExpression` and `length` is computed. Passing it as an argument explicitly makes this separation clear. >> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:418 >> + if (!!node->elision()) { > > Nit: You don't need the !!. Dropped.
Yusuke Suzuki
Comment 4 2018-03-27 01:49:46 PDT
Radar WebKit Bug Importer
Comment 5 2018-03-27 01:50:25 PDT
Note You need to log in before you can comment on or make changes to this bug.