| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index 26a3dae1c646632481657f937a30e867672ecbc6..6d2f151d17e93d7a1ff36e230a557fbf10ba71f0 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -3942,12 +3942,32 @@ void MacroAssembler::AssertBoundFunction(Register object) {
|
|
|
| void MacroAssembler::AssertGeneratorObject(Register object) {
|
| if (emit_debug_code()) {
|
| + Label ok;
|
| testb(object, Immediate(kSmiTagMask));
|
| Check(not_equal, kOperandIsASmiAndNotAGeneratorObject);
|
| +
|
| Push(object);
|
| CmpObjectType(object, JS_GENERATOR_OBJECT_TYPE, object);
|
| Pop(object);
|
| + j(equal, &ok, Label::kNear);
|
| +
|
| + Push(object);
|
| + CmpObjectType(object, JS_ASYNC_GENERATOR_OBJECT_TYPE, object);
|
| + Pop(object);
|
| Check(equal, kOperandIsNotAGeneratorObject);
|
| +
|
| + bind(&ok);
|
| + }
|
| +}
|
| +
|
| +void MacroAssembler::AssertAsyncGeneratorObject(Register object) {
|
| + if (emit_debug_code()) {
|
| + testb(object, Immediate(kSmiTagMask));
|
| + Check(not_equal, kOperandIsASmiAndNotAnAsyncGeneratorObject);
|
| + Push(object);
|
| + CmpObjectType(object, JS_ASYNC_GENERATOR_OBJECT_TYPE, object);
|
| + Pop(object);
|
| + Check(equal, kOperandIsNotAnAsyncGeneratorObject);
|
| }
|
| }
|
|
|
|
|