Index: src/compiler/change-lowering.cc |
diff --git a/src/compiler/change-lowering.cc b/src/compiler/change-lowering.cc |
index c2805bb0a329b463536b0deef8edadc6fa567d47..e9fd7400d03a6933a37d103c376099cb8067abbe 100644 |
--- a/src/compiler/change-lowering.cc |
+++ b/src/compiler/change-lowering.cc |
@@ -50,28 +50,16 @@ Node* ChangeLowering::HeapNumberValueIndexConstant() { |
Node* ChangeLowering::SmiMaxValueConstant() { |
- // 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); |
- const int smi_value_size = machine()->is64() ? 32 : 31; |
+ const int smi_value_size = machine()->is32() ? SmiTagging<4>::SmiValueSize() |
+ : SmiTagging<8>::SmiValueSize(); |
return jsgraph()->Int32Constant( |
-(static_cast<int>(0xffffffffu << (smi_value_size - 1)) + 1)); |
} |
Node* ChangeLowering::SmiShiftBitsConstant() { |
- // 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); |
- const int smi_shift_size = machine()->is64() ? 31 : 0; |
+ const int smi_shift_size = machine()->is32() ? SmiTagging<4>::SmiShiftSize() |
+ : SmiTagging<8>::SmiShiftSize(); |
return jsgraph()->Int32Constant(smi_shift_size + kSmiTagSize); |
} |