Index: src/a64/macro-assembler-a64.cc |
diff --git a/src/a64/macro-assembler-a64.cc b/src/a64/macro-assembler-a64.cc |
index 25edc06161dc533d02e718cc09d9fe4fc4312cda..6eadf60449de872b1d116b025dc4deaa0a488c30 100644 |
--- a/src/a64/macro-assembler-a64.cc |
+++ b/src/a64/macro-assembler-a64.cc |
@@ -1528,6 +1528,20 @@ void MacroAssembler::AssertName(Register object) { |
} |
+void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
+ Register scratch) { |
+ if (emit_debug_code()) { |
+ Label done_checking; |
+ AssertNotSmi(object); |
+ JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking); |
+ Ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
+ CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
+ Assert(eq, kExpectedUndefinedOrCell); |
+ Bind(&done_checking); |
+ } |
+} |
+ |
+ |
void MacroAssembler::AssertString(Register object) { |
if (emit_debug_code()) { |
UseScratchRegisterScope temps(this); |