RESOLVED FIXED Bug 122081
FTL: refactor compileAdd and compileArithSub into one function.
https://bugs.webkit.org/show_bug.cgi?id=122081
Summary FTL: refactor compileAdd and compileArithSub into one function.
Nadav Rotem
Reported 2013-09-29 18:45:00 PDT
FTL: refactor compileAdd and compileArithSub into one function.
Attachments
Patch (5.48 KB, patch)
2013-09-29 18:45 PDT, Nadav Rotem
no flags
Patch (5.39 KB, patch)
2013-09-29 20:58 PDT, Nadav Rotem
no flags
Patch (5.39 KB, patch)
2013-09-29 22:09 PDT, Nadav Rotem
no flags
Nadav Rotem
Comment 1 2013-09-29 18:45:14 PDT
Geoffrey Garen
Comment 2 2013-09-29 19:02:06 PDT
Comment on attachment 212941 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=212941&action=review > Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:285 > case ValueAdd: > - compileAdd(); > + compileAddSub(false /* this is an add */); > break; > case ArithSub: > - compileArithSub(); > + compileAddSub(true /* this is a sub */); WebKit style for booleans that are "true" or "false" constants at the call site is to use named enum values. Something like: enum AddOrSub { Add, Sub }; compileAddOrSub(Add); compileAddOrSub(Sub); > Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:696 > + LValue C1 =lowDouble(m_node->child1()); > + LValue C2 =lowDouble(m_node->child2()); Need spaces after the "="s. > Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:707 > - > + Please revert this accidental whitespace change.
Nadav Rotem
Comment 3 2013-09-29 20:58:03 PDT
Geoffrey Garen
Comment 4 2013-09-29 21:49:41 PDT
Comment on attachment 212947 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=212947&action=review > Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:660 > + void compileAddSub(AddOrSubKind OpKind) > { > + bool isSub = OpKind == Sub; Sorry to keep going with the style nits, but the "O" in "OpKind" should be lower case. I'm going to r+ this patch. Can you post a follow-up to fix the "O"?
Nadav Rotem
Comment 5 2013-09-29 22:07:48 PDT
Okay. I will fix the 'O'
Nadav Rotem
Comment 6 2013-09-29 22:09:44 PDT
Geoffrey Garen
Comment 7 2013-09-29 23:04:12 PDT
Comment on attachment 212949 [details] Patch r=me
WebKit Commit Bot
Comment 8 2013-09-29 23:31:40 PDT
Comment on attachment 212949 [details] Patch Clearing flags on attachment: 212949 Committed r156634: <http://trac.webkit.org/changeset/156634>
WebKit Commit Bot
Comment 9 2013-09-29 23:31:42 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.