Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Issue 1848303003: Simplify references to command line flags. (Closed)

Created:
4 years, 8 months ago by Karl
Modified:
4 years, 8 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Simplify references to command line flags. This CL removes all indirect pointer chasing to get the values of command line flags. Since we are only using 1 copy of ClFlags, this CL introduces a static field Flags to hold the defined command line flags (it was previously a static field of GlobalContext). For those few contexts where one must change CL flags due to context (such as testsing and running in the browser), use ClFlags::Flags. In the remainder of the cases, the code uses getFlags() which returns a constant reference to ClFlags::Flags, allowing access to the get accessors. BUG=None R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=d46999474d2b4a388e1d8a7c71f06cd4cec51bfc

Patch Set 1 #

Patch Set 2 : Ready for review. #

Patch Set 3 : Remove fixed TODO #

Total comments: 4

Patch Set 4 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -287 lines) Patch
M src/IceAssemblerARM32.h View 1 chunk +2 lines, -4 lines 0 comments Download
M src/IceAssemblerARM32.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M src/IceBrowserCompileServer.h View 1 2 chunks +1 line, -2 lines 0 comments Download
M src/IceBrowserCompileServer.cpp View 1 2 3 2 chunks +7 lines, -8 lines 0 comments Download
M src/IceCfg.cpp View 1 2 3 13 chunks +22 lines, -25 lines 0 comments Download
M src/IceCfgNode.cpp View 3 chunks +3 lines, -4 lines 0 comments Download
M src/IceClFlags.h View 2 chunks +5 lines, -0 lines 0 comments Download
M src/IceClFlags.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M src/IceCompileServer.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M src/IceCompiler.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M src/IceConverter.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M src/IceELFObjectWriter.cpp View 8 chunks +12 lines, -13 lines 0 comments Download
M src/IceFixups.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/IceFixups.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M src/IceGlobalContext.h View 3 chunks +0 lines, -5 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 3 8 chunks +17 lines, -20 lines 0 comments Download
M src/IceGlobalInits.h View 3 chunks +5 lines, -5 lines 0 comments Download
M src/IceInstARM32.cpp View 5 chunks +8 lines, -8 lines 0 comments Download
M src/IceInstX8632.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/IceInstX8664.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/IceInstX86BaseImpl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceMangling.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceOperand.h View 1 chunk +1 line, -1 line 0 comments Download
M src/IceOperand.cpp View 1 chunk +2 lines, -4 lines 0 comments Download
M src/IceRegAlloc.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLowering.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/IceTargetLowering.cpp View 14 chunks +19 lines, -22 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 19 chunks +25 lines, -24 lines 0 comments Download
M src/IceTargetLoweringMIPS32.cpp View 19 chunks +28 lines, -31 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX8632Traits.h View 1 2 chunks +4 lines, -6 lines 0 comments Download
M src/IceTargetLoweringX8664Traits.h View 1 2 chunks +4 lines, -6 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 29 chunks +37 lines, -40 lines 0 comments Download
M src/IceTranslator.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/PNaClTranslator.cpp View 9 chunks +8 lines, -16 lines 0 comments Download
M unittest/BitcodeMunge.h View 1 2 2 chunks +1 line, -5 lines 0 comments Download
M unittest/BitcodeMunge.cpp View 1 2 chunks +9 lines, -8 lines 0 comments Download
M unittest/IceParseInstsTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (5 generated)
Karl
4 years, 8 months ago (2016-04-01 18:01:29 UTC) #3
Jim Stichnoth
lgtm https://codereview.chromium.org/1848303003/diff/40001/src/IceBrowserCompileServer.cpp File src/IceBrowserCompileServer.cpp (right): https://codereview.chromium.org/1848303003/diff/40001/src/IceBrowserCompileServer.cpp#newcode174 src/IceBrowserCompileServer.cpp:174: ClFlags::Flags.setBuildOnRead(true); I think you can and should remove ...
4 years, 8 months ago (2016-04-01 23:36:59 UTC) #5
Jim Stichnoth
-seh +sehr
4 years, 8 months ago (2016-04-01 23:54:38 UTC) #7
Karl
Committed patchset #4 (id:60001) manually as d46999474d2b4a388e1d8a7c71f06cd4cec51bfc (presubmit successful).
4 years, 8 months ago (2016-04-02 16:55:37 UTC) #9
Karl
4 years, 8 months ago (2016-04-02 16:55:56 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/1848303003/diff/40001/src/IceBrowserCompileSe...
File src/IceBrowserCompileServer.cpp (right):

https://codereview.chromium.org/1848303003/diff/40001/src/IceBrowserCompileSe...
src/IceBrowserCompileServer.cpp:174: ClFlags::Flags.setBuildOnRead(true);
On 2016/04/01 23:36:58, stichnot wrote:
> I think you can and should remove this because the default is already true.
> 
> Maybe for another CL, the InputFileFormat default should be changed to
> PNaClFormat, and the following line can also be removed.

Removed BuildOnRead, left InputFileFormat for another CL.

https://codereview.chromium.org/1848303003/diff/40001/src/IceFixups.h
File src/IceFixups.h (right):

https://codereview.chromium.org/1848303003/diff/40001/src/IceFixups.h#newcode19
src/IceFixups.h:19: #include "IceClFlags.h"
On 2016/04/01 23:36:58, stichnot wrote:
> alphabetize this if possible

Done.

Powered by Google App Engine
This is Rietveld 408576698