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

Unified Diff: src/IceAssemblerX8632.h

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceAssembler.cpp ('k') | src/IceAssemblerX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceAssemblerX8632.h
diff --git a/src/IceAssemblerX8632.h b/src/IceAssemblerX8632.h
index 48a5f0a2f6e8c7f56e158ebe33df30c7efec2eb0..132e72d610267b374ceb894350e20a7e43713ac7 100644
--- a/src/IceAssemblerX8632.h
+++ b/src/IceAssemblerX8632.h
@@ -252,11 +252,11 @@ class Label {
public:
Label() {
-#ifndef NDEBUG
- for (int i = 0; i < kMaxUnresolvedBranches; i++) {
- unresolved_near_positions_[i] = -1;
+ if (BuildDefs::asserts()) {
+ for (int i = 0; i < kMaxUnresolvedBranches; i++) {
+ unresolved_near_positions_[i] = -1;
+ }
}
-#endif // !NDEBUG
}
~Label() = default;
@@ -321,7 +321,7 @@ private:
unresolved_near_positions_[num_unresolved_++] = position;
}
- static const int kMaxUnresolvedBranches = 20;
+ static constexpr int kMaxUnresolvedBranches = 20;
intptr_t position_ = 0;
intptr_t num_unresolved_ = 0;
« no previous file with comments | « src/IceAssembler.cpp ('k') | src/IceAssemblerX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698