Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 61f963fb1a745b1d5fceaa9eee3458033e81062e..30ba6c2085c5d3bf950685238dd9eee6ff835e6e 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -3032,6 +3032,20 @@ void MacroAssembler::AssertName(Register object) { |
} |
+void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
+ Register scratch) { |
+ if (emit_debug_code()) { |
+ Label done_checking; |
+ AssertNotSmi(object); |
+ CompareRoot(object, Heap::kUndefinedValueRootIndex); |
+ b(eq, &done_checking); |
+ ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
+ Assert(eq, kExpectedUndefinedOrCell); |
+ bind(&done_checking); |
+ } |
+} |
+ |
void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) { |
if (emit_debug_code()) { |