Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 542ad031bd4182ce0d40c45ac71adefb51f1d920..80aef0c4ffefa253069de6ac66473a4ac116b2a4 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -2876,6 +2876,20 @@ void MacroAssembler::AssertBoundFunction(Register object) { |
} |
+void MacroAssembler::AssertReceiver(Register object) { |
+ if (emit_debug_code()) { |
+ STATIC_ASSERT(kSmiTag == 0); |
+ tst(object, Operand(kSmiTagMask)); |
+ Check(ne, kOperandIsASmiAndNotAReceiver); |
+ push(object); |
+ STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
+ CompareObjectType(object, object, object, FIRST_JS_RECEIVER_TYPE); |
+ pop(object); |
+ Check(hs, kOperandIsNotAReceiver); |
+ } |
+} |
+ |
+ |
void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
Register scratch) { |
if (emit_debug_code()) { |