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

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed)

Created:
5 years, 6 months ago by Jim Stichnoth
Modified:
5 years, 6 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

Subzero: Reduce the amount of #ifdef'd code. Try to make most #ifdef'd code be compiled under all configurations, to catch code rot earlier. When #ifdef code is required, try to use it only to guard trivial code like "return;". BUG= none R=jpp@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=20b71f5890ee8651983b126c5978594a01e0af96

Patch Set 1 #

Patch Set 2 : Reformat #

Patch Set 3 : Cleanup #

Total comments: 7

Patch Set 4 : Use constexpr inline functions instead of macros #

Total comments: 15

Patch Set 5 : Code review changes #

Patch Set 6 : Cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+430 lines, -382 lines) Patch
M src/IceAssembler.h View 1 2 3 4 5 2 chunks +22 lines, -29 lines 0 comments Download
M src/IceAssembler.cpp View 1 2 3 3 chunks +2 lines, -8 lines 0 comments Download
M src/IceAssemblerX8632.h View 1 2 3 4 5 2 chunks +5 lines, -5 lines 0 comments Download
M src/IceAssemblerX8632.cpp View 1 2 3 4 1 chunk +7 lines, -7 lines 0 comments Download
A src/IceBuildDefs.h View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
M src/IceCfg.cpp View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M src/IceCfgNode.cpp View 1 2 3 4 8 chunks +8 lines, -8 lines 0 comments Download
M src/IceClFlags.h View 1 2 3 4 4 chunks +7 lines, -5 lines 0 comments Download
M src/IceClFlags.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/IceCompileServer.cpp View 1 2 3 4 4 chunks +8 lines, -8 lines 0 comments Download
M src/IceCompiler.cpp View 1 2 3 4 4 chunks +11 lines, -10 lines 0 comments Download
M src/IceConverter.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/IceDefs.h View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M src/IceELFObjectWriter.cpp View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M src/IceFixups.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/IceGlobalContext.h View 1 2 3 4 5 chunks +8 lines, -8 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 3 4 8 chunks +9 lines, -9 lines 0 comments Download
M src/IceGlobalInits.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/IceGlobalInits.cpp View 1 2 3 4 7 chunks +11 lines, -11 lines 0 comments Download
M src/IceInst.cpp View 1 2 3 4 29 chunks +33 lines, -33 lines 0 comments Download
M src/IceInstARM32.h View 1 2 3 4 8 chunks +8 lines, -8 lines 0 comments Download
M src/IceInstARM32.cpp View 1 2 3 4 34 chunks +34 lines, -34 lines 0 comments Download
M src/IceInstX8632.h View 1 2 3 4 22 chunks +22 lines, -22 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 3 4 89 chunks +94 lines, -94 lines 0 comments Download
M src/IceOperand.h View 1 2 3 4 5 chunks +6 lines, -6 lines 0 comments Download
M src/IceOperand.cpp View 1 2 3 4 6 chunks +18 lines, -14 lines 0 comments Download
M src/IceRegAlloc.cpp View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 2 3 4 4 chunks +6 lines, -5 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 2 3 4 5 chunks +5 lines, -5 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringX8664.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 3 4 10 chunks +16 lines, -14 lines 0 comments Download
M src/IceTimerTree.cpp View 1 2 3 4 10 chunks +10 lines, -10 lines 0 comments Download
M src/IceTypes.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/PNaClTranslator.cpp View 1 2 3 4 5 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 11 (1 generated)
Jim Stichnoth
Cleanup
5 years, 6 months ago (2015-06-20 01:06:45 UTC) #1
Jim Stichnoth
5 years, 6 months ago (2015-06-20 03:37:00 UTC) #3
Karl
https://codereview.chromium.org/1197863003/diff/40001/src/IceAssembler.h File src/IceAssembler.h (right): https://codereview.chromium.org/1197863003/diff/40001/src/IceAssembler.h#newcode82 src/IceAssembler.h:82: #ifdef NDEBUG Why not create a boolean (inline) function ...
5 years, 6 months ago (2015-06-22 15:41:07 UTC) #4
John
Hi, I am John Paul and I have a problem: (Hi John Paul) I don't ...
5 years, 6 months ago (2015-06-22 17:13:46 UTC) #5
Jim Stichnoth
Use constexpr inline functions instead of macros
5 years, 6 months ago (2015-06-23 21:39:00 UTC) #6
Jim Stichnoth
I changed almost all uses of macros to uses of constexpr inline functions, defined in ...
5 years, 6 months ago (2015-06-23 21:42:08 UTC) #7
John
lgtm Just make sure the #ifdef stuff is right. lgtm otherwise. https://codereview.chromium.org/1197863003/diff/60001/src/IceAssembler.cpp File src/IceAssembler.cpp (right): ...
5 years, 6 months ago (2015-06-23 22:28:30 UTC) #8
Jim Stichnoth
PTAL https://codereview.chromium.org/1197863003/diff/60001/src/IceAssembler.cpp File src/IceAssembler.cpp (right): https://codereview.chromium.org/1197863003/diff/60001/src/IceAssembler.cpp#newcode48 src/IceAssembler.cpp:48: void AssemblerBuffer::EnsureCapacity::validate(AssemblerBuffer *buffer) { On 2015/06/23 22:28:30, John ...
5 years, 6 months ago (2015-06-24 21:27:27 UTC) #9
John
lgtm
5 years, 6 months ago (2015-06-24 22:44:33 UTC) #10
Jim Stichnoth
5 years, 6 months ago (2015-06-24 22:52:31 UTC) #11
Message was sent while issue was closed.
Committed patchset #6 (id:100001) manually as
20b71f5890ee8651983b126c5978594a01e0af96 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698