Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 566091df4e2d48c65dc4c91b0e67f118f7ac7afc..5de65989fec5197f6e52b275695f6faf65a2bf70 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -3970,6 +3970,16 @@ void MacroAssembler::AssertBoundFunction(Register object) { |
} |
} |
+void MacroAssembler::AssertGeneratorObject(Register object) { |
+ if (emit_debug_code()) { |
+ testb(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()) { |