Bug 183987

Summary: [JSC] Remove repeated iteration of ElementNode
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch keith_miller: review+

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.