Index: src/arm64/macro-assembler-arm64.cc |
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc |
index 2229747de2dc81a2c5ce17418884e107c55a122f..953c3fd7f2bf245e24fbe1ed9e0850d726bf9d07 100644 |
--- a/src/arm64/macro-assembler-arm64.cc |
+++ b/src/arm64/macro-assembler-arm64.cc |
@@ -1638,6 +1638,20 @@ void MacroAssembler::AssertBoundFunction(Register object) { |
} |
+void MacroAssembler::AssertReceiver(Register object) { |
+ if (emit_debug_code()) { |
+ AssertNotSmi(object, kOperandIsASmiAndNotAReceiver); |
+ |
+ UseScratchRegisterScope temps(this); |
+ Register temp = temps.AcquireX(); |
+ |
+ STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
+ CompareObjectType(object, temp, temp, FIRST_JS_RECEIVER_TYPE); |
+ Check(hs, kOperandIsNotAReceiver); |
+ } |
+} |
+ |
+ |
void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
Register scratch) { |
if (emit_debug_code()) { |