Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 3191199271613443a6dfe3ebdff826e22c28da5c..6b84b0bc1aad2a8377890cc09140d7e0eec7fca9 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -3352,6 +3352,19 @@ void MacroAssembler::AssertName(Register object) { |
} |
+void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
+ if (emit_debug_code()) { |
+ Label done_checking; |
+ AssertNotSmi(object); |
+ Cmp(object, isolate()->factory()->undefined_value()); |
+ j(equal, &done_checking); |
+ Cmp(FieldOperand(object, 0), isolate()->factory()->allocation_site_map()); |
+ Assert(equal, kExpectedUndefinedOrCell); |
+ bind(&done_checking); |
+ } |
+} |
+ |
+ |
void MacroAssembler::AssertRootValue(Register src, |
Heap::RootListIndex root_value_index, |
BailoutReason reason) { |