Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index ba9ff65be0c4883b97685076fdeef82e9f528671..87383c7257784d276c1d0d34599f7fe9383b6931 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -596,10 +596,11 @@ void JSBuiltinsObject::JSBuiltinsObjectVerify() { |
void Oddball::OddballVerify() { |
CHECK(IsOddball()); |
+ Heap* heap = GetHeap(); |
VerifyHeapPointer(to_string()); |
Object* number = to_number(); |
if (number->IsHeapObject()) { |
- CHECK(number == HeapObject::cast(number)->GetHeap()->nan_value()); |
+ CHECK(number == heap->nan_value()); |
} else { |
CHECK(number->IsSmi()); |
int value = Smi::cast(number)->value(); |
@@ -608,6 +609,26 @@ void Oddball::OddballVerify() { |
CHECK_LE(value, 1); |
CHECK(value >= kLeastHiddenOddballNumber); |
} |
+ if (map() == heap->undefined_map()) { |
+ CHECK(this == heap->undefined_value()); |
+ } else if (map() == heap->the_hole_map()) { |
+ CHECK(this == heap->the_hole_value()); |
+ } else if (map() == heap->null_map()) { |
+ CHECK(this == heap->null_value()); |
+ } else if (map() == heap->boolean_map()) { |
+ CHECK(this == heap->true_value() || |
+ this == heap->false_value()); |
+ } else if (map() == heap->uninitialized_map()) { |
+ CHECK(this == heap->uninitialized_value()); |
+ } else if (map() == heap->no_interceptor_result_sentinel_map()) { |
+ CHECK(this == heap->no_interceptor_result_sentinel()); |
+ } else if (map() == heap->arguments_marker_map()) { |
+ CHECK(this == heap->arguments_marker()); |
+ } else if (map() == heap->termination_exception_map()) { |
+ CHECK(this == heap->termination_exception()); |
+ } else { |
+ UNREACHABLE(); |
+ } |
} |