Index: src/assembler.cc |
diff --git a/src/assembler.cc b/src/assembler.cc |
index 4944202f076d9817b510dc2aafc28cb7f72f054d..07509b5b28e91b4f773f9063eec2de82b7775d8c 100644 |
--- a/src/assembler.cc |
+++ b/src/assembler.cc |
@@ -45,7 +45,6 @@ |
#include "ic.h" |
#include "isolate.h" |
#include "jsregexp.h" |
-#include "lazy-instance.h" |
#include "platform.h" |
#include "regexp-macro-assembler.h" |
#include "regexp-stack.h" |
@@ -85,36 +84,15 @@ |
namespace v8 { |
namespace internal { |
-// ----------------------------------------------------------------------------- |
-// Common double constants. |
- |
-struct DoubleConstant BASE_EMBEDDED { |
- double min_int; |
- double one_half; |
- double minus_zero; |
- double zero; |
- double uint8_max_value; |
- double negative_infinity; |
- double canonical_non_hole_nan; |
- double the_hole_nan; |
-}; |
- |
-struct InitializeDoubleConstants { |
- static void Construct(DoubleConstant* double_constants) { |
- double_constants->min_int = kMinInt; |
- double_constants->one_half = 0.5; |
- double_constants->minus_zero = -0.0; |
- double_constants->uint8_max_value = 255; |
- double_constants->zero = 0.0; |
- double_constants->canonical_non_hole_nan = OS::nan_value(); |
- double_constants->the_hole_nan = BitCast<double>(kHoleNanInt64); |
- double_constants->negative_infinity = -V8_INFINITY; |
- } |
-}; |
- |
-static LazyInstance<DoubleConstant, InitializeDoubleConstants>::type |
- double_constants = LAZY_INSTANCE_INITIALIZER; |
+const double DoubleConstant::min_int = kMinInt; |
+const double DoubleConstant::one_half = 0.5; |
+const double DoubleConstant::minus_zero = -0.0; |
+const double DoubleConstant::uint8_max_value = 255; |
+const double DoubleConstant::zero = 0.0; |
+const double DoubleConstant::canonical_non_hole_nan = OS::nan_value(); |
+const double DoubleConstant::the_hole_nan = BitCast<double>(kHoleNanInt64); |
+const double DoubleConstant::negative_infinity = -V8_INFINITY; |
const char* const RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; |
// ----------------------------------------------------------------------------- |
@@ -959,49 +937,49 @@ ExternalReference ExternalReference::scheduled_exception_address( |
ExternalReference ExternalReference::address_of_min_int() { |
return ExternalReference(reinterpret_cast<void*>( |
- &double_constants.Pointer()->min_int)); |
+ const_cast<double*>(&DoubleConstant::min_int))); |
} |
ExternalReference ExternalReference::address_of_one_half() { |
return ExternalReference(reinterpret_cast<void*>( |
- &double_constants.Pointer()->one_half)); |
+ const_cast<double*>(&DoubleConstant::one_half))); |
} |
ExternalReference ExternalReference::address_of_minus_zero() { |
return ExternalReference(reinterpret_cast<void*>( |
- &double_constants.Pointer()->minus_zero)); |
+ const_cast<double*>(&DoubleConstant::minus_zero))); |
} |
ExternalReference ExternalReference::address_of_zero() { |
return ExternalReference(reinterpret_cast<void*>( |
- &double_constants.Pointer()->zero)); |
+ const_cast<double*>(&DoubleConstant::zero))); |
} |
ExternalReference ExternalReference::address_of_uint8_max_value() { |
return ExternalReference(reinterpret_cast<void*>( |
- &double_constants.Pointer()->uint8_max_value)); |
+ const_cast<double*>(&DoubleConstant::uint8_max_value))); |
} |
ExternalReference ExternalReference::address_of_negative_infinity() { |
return ExternalReference(reinterpret_cast<void*>( |
- &double_constants.Pointer()->negative_infinity)); |
+ const_cast<double*>(&DoubleConstant::negative_infinity))); |
} |
ExternalReference ExternalReference::address_of_canonical_non_hole_nan() { |
return ExternalReference(reinterpret_cast<void*>( |
- &double_constants.Pointer()->canonical_non_hole_nan)); |
+ const_cast<double*>(&DoubleConstant::canonical_non_hole_nan))); |
} |
ExternalReference ExternalReference::address_of_the_hole_nan() { |
return ExternalReference(reinterpret_cast<void*>( |
- &double_constants.Pointer()->the_hole_nan)); |
+ const_cast<double*>(&DoubleConstant::the_hole_nan))); |
} |