Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index c0a1443b0f07655243f86b204b730f7b8c0e9ff2..54b6150190417def1bdf31632224be4b7d9c29be 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -2872,20 +2872,9 @@ bool HConstant::ImmortalImmovable() const { |
Heap* heap = isolate()->heap(); |
DCHECK(!object_.IsKnownGlobal(heap->minus_zero_value())); |
DCHECK(!object_.IsKnownGlobal(heap->nan_value())); |
- return |
-#define IMMORTAL_IMMOVABLE_ROOT(name) \ |
- object_.IsKnownGlobal(heap->root(Heap::k##name##RootIndex)) || |
- IMMORTAL_IMMOVABLE_ROOT_LIST(IMMORTAL_IMMOVABLE_ROOT) |
-#undef IMMORTAL_IMMOVABLE_ROOT |
-#define INTERNALIZED_STRING(name, value) \ |
- object_.IsKnownGlobal(heap->name()) || |
- INTERNALIZED_STRING_LIST(INTERNALIZED_STRING) |
-#undef INTERNALIZED_STRING |
-#define STRING_TYPE(NAME, size, name, Name) \ |
- object_.IsKnownGlobal(heap->name##_map()) || |
- STRING_TYPE_LIST(STRING_TYPE) |
-#undef STRING_TYPE |
- false; |
+ Heap::RootListIndex index; |
+ return heap->GetRootListIndex(object_.GetRawAddress(), &index) && |
+ Heap::RootIsImmortalImmovable(index); |
} |