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

Unified Diff: test/compiler-unittests/change-lowering-unittest.cc

Issue 527603002: Use the "enum hack" to fix the SmiTagging constants. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Addressed comment Created 6 years, 4 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/compiler/change-lowering.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/compiler-unittests/change-lowering-unittest.cc
diff --git a/test/compiler-unittests/change-lowering-unittest.cc b/test/compiler-unittests/change-lowering-unittest.cc
index 4ea125a5f4cd20b51b01f1d30443f4dc64ca1bfb..2e705d2009a862791c1857f23446f23762caf91f 100644
--- a/test/compiler-unittests/change-lowering-unittest.cc
+++ b/test/compiler-unittests/change-lowering-unittest.cc
@@ -59,24 +59,12 @@ class ChangeLoweringTest : public GraphTest {
}
int SmiShiftAmount() const { return kSmiTagSize + SmiShiftSize(); }
int SmiShiftSize() const {
- // TODO(turbofan): Work-around for weird GCC 4.6 linker issue:
- // src/compiler/change-lowering.cc:46: undefined reference to
- // `v8::internal::SmiTagging<4u>::kSmiShiftSize'
- // src/compiler/change-lowering.cc:46: undefined reference to
- // `v8::internal::SmiTagging<8u>::kSmiShiftSize'
- STATIC_ASSERT(SmiTagging<4>::kSmiShiftSize == 0);
- STATIC_ASSERT(SmiTagging<8>::kSmiShiftSize == 31);
- return Is32() ? 0 : 31;
+ return Is32() ? SmiTagging<4>::SmiShiftSize()
+ : SmiTagging<8>::SmiShiftSize();
}
int SmiValueSize() const {
- // TODO(turbofan): Work-around for weird GCC 4.6 linker issue:
- // src/compiler/change-lowering.cc:46: undefined reference to
- // `v8::internal::SmiTagging<4u>::kSmiValueSize'
- // src/compiler/change-lowering.cc:46: undefined reference to
- // `v8::internal::SmiTagging<8u>::kSmiValueSize'
- STATIC_ASSERT(SmiTagging<4>::kSmiValueSize == 31);
- STATIC_ASSERT(SmiTagging<8>::kSmiValueSize == 32);
- return Is32() ? 31 : 32;
+ return Is32() ? SmiTagging<4>::SmiValueSize()
+ : SmiTagging<8>::SmiValueSize();
}
Node* Parameter(int32_t index = 0) {
« no previous file with comments | « src/compiler/change-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698