Index: src/x87/macro-assembler-x87.cc |
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc |
index 4f6f01d5d76a26bf52b219391026285d5e0926e7..0c459ebfd420f5208d8b4b7c05ef6a26d831a4c3 100644 |
--- a/src/x87/macro-assembler-x87.cc |
+++ b/src/x87/macro-assembler-x87.cc |
@@ -900,6 +900,17 @@ void MacroAssembler::AssertBoundFunction(Register object) { |
} |
} |
+void MacroAssembler::AssertReceiver(Register object) { |
+ if (emit_debug_code()) { |
+ test(object, Immediate(kSmiTagMask)); |
+ Check(not_equal, kOperandIsASmiAndNotAReceiver); |
+ Push(object); |
+ STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
+ CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); |
+ Pop(object); |
+ Check(above_equal, kOperandIsNotAReceiver); |
+ } |
+} |
void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
if (emit_debug_code()) { |