Index: src/mips/assembler-mips.cc |
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc |
index 29df222f40c78f76b72c9f6be79b1ad89adfa7c4..f3a57f94a50d3c071605a00bfa73a4e658fd885f 100644 |
--- a/src/mips/assembler-mips.cc |
+++ b/src/mips/assembler-mips.cc |
@@ -46,6 +46,7 @@ namespace internal { |
#ifdef DEBUG |
bool CpuFeatures::initialized_ = false; |
#endif |
+bool CpuFeatures::hint_creating_snapshot_ = false; |
unsigned CpuFeatures::supported_ = 0; |
unsigned CpuFeatures::found_by_runtime_probing_only_ = 0; |
unsigned CpuFeatures::cross_compile_ = 0; |
@@ -102,7 +103,23 @@ const char* DoubleRegister::AllocationIndexToString(int index) { |
} |
+void CpuFeatures::SetHintCreatingSnapshot() { |
+ hint_creating_snapshot_ = true; |
+} |
+ |
+ |
+void CpuFeatures::ProbeWithoutIsolate() { |
+ Probe(hint_creating_snapshot_); |
+} |
+ |
+ |
void CpuFeatures::Probe() { |
+ // The Serializer can only be queried after isolate initialization. |
+ Probe(Serializer::enabled()); |
+} |
+ |
+ |
+void CpuFeatures::Probe(bool serializer_enabled) { |
unsigned standard_features = (OS::CpuFeaturesImpliedByPlatform() | |
CpuFeaturesImpliedByCompiler()); |
ASSERT(supported_ == 0 || |
@@ -116,7 +133,7 @@ void CpuFeatures::Probe() { |
// snapshot. |
supported_ |= standard_features; |
- if (Serializer::enabled()) { |
+ if (serializer_enabled) { |
// No probing for features if we might serialize (generate snapshot). |
return; |
} |
@@ -2080,11 +2097,6 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
if (!RelocInfo::IsNone(rinfo.rmode())) { |
// Don't record external references unless the heap will be serialized. |
if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
-#ifdef DEBUG |
- if (!Serializer::enabled()) { |
- Serializer::TooLateToEnableNow(); |
- } |
-#endif |
if (!Serializer::enabled() && !emit_debug_code()) { |
return; |
} |