Index: src/arm64/macro-assembler-arm64.cc |
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc |
index 12ddd8145e38decd00e98c6902a084151f71dfdb..bd7ff3d7210688aa6bc44ea061ccbede8a375e3c 100644 |
--- a/src/arm64/macro-assembler-arm64.cc |
+++ b/src/arm64/macro-assembler-arm64.cc |
@@ -1659,6 +1659,17 @@ void MacroAssembler::AssertBoundFunction(Register object) { |
} |
} |
+void MacroAssembler::AssertGeneratorObject(Register object) { |
+ if (emit_debug_code()) { |
+ AssertNotSmi(object, kOperandIsASmiAndNotAGeneratorObject); |
+ |
+ UseScratchRegisterScope temps(this); |
+ Register temp = temps.AcquireX(); |
+ |
+ CompareObjectType(object, temp, temp, JS_GENERATOR_OBJECT_TYPE); |
+ Check(eq, kOperandIsNotAGeneratorObject); |
+ } |
+} |
void MacroAssembler::AssertReceiver(Register object) { |
if (emit_debug_code()) { |