Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 2a5c696913f8b9afe95a4be4d0488c9e56b22054..12daec8285c79fea84149f25660fb1f593978118 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -954,6 +954,19 @@ 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()) { |
Label done_checking; |