Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index d93552b2a9d50eabd5a4760ea6109c91bcc7f9e5..4ec20991501cc3a6701be576dc3ddeb6ba3d65cb 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -951,12 +951,19 @@ void MacroAssembler::AssertBoundFunction(Register object) { |
void MacroAssembler::AssertGeneratorObject(Register object) { |
if (emit_debug_code()) { |
+ Label ok; |
test(object, Immediate(kSmiTagMask)); |
Check(not_equal, kOperandIsASmiAndNotAGeneratorObject); |
Push(object); |
CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object); |
Pop(object); |
+ j(equal, &ok); |
+ |
+ Push(object); |
+ CmpObjectType(object, JS_ASYNC_GENERATOR_OBJECT_TYPE, object); |
+ Pop(object); |
Check(equal, kOperandIsNotAGeneratorObject); |
+ bind(&ok); |
} |
} |