Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index f9fd8d6a4017838c90e5b00f795a25d44edc3be5..2f013c8b55f998ae48bfce1a67ed23abb778efb7 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -1025,6 +1025,16 @@ void MacroAssembler::AssertBoundFunction(Register object) { |
} |
} |
+void MacroAssembler::AssertGeneratorObject(Register object) { |
+ if (emit_debug_code()) { |
+ test(object, Immediate(kSmiTagMask)); |
+ Check(not_equal, kOperandIsASmiAndNotAGeneratorObject); |
+ Push(object); |
+ CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object); |
+ Pop(object); |
+ Check(equal, kOperandIsNotAGeneratorObject); |
+ } |
+} |
void MacroAssembler::AssertReceiver(Register object) { |
if (emit_debug_code()) { |