Index: src/builtins/builtins-generator.cc |
diff --git a/src/builtins/builtins-generator.cc b/src/builtins/builtins-generator.cc |
index 5c53ec9dd6f71128b5686b4d2b82e45d75e9f494..d22c3cdd643a4e4c73ccc7f06445e5f9dfb919f5 100644 |
--- a/src/builtins/builtins-generator.cc |
+++ b/src/builtins/builtins-generator.cc |
@@ -65,18 +65,20 @@ void Generate_GeneratorPrototypeResume( |
assembler->Bind(&if_receiverisclosed); |
{ |
+ Callable create_iter_result_object = |
+ CodeFactory::CreateIterResultObject(assembler->isolate()); |
+ |
// The {receiver} is closed already. |
Node* result = nullptr; |
switch (resume_mode) { |
case JSGeneratorObject::kNext: |
- result = assembler->CallRuntime(Runtime::kCreateIterResultObject, |
- context, assembler->UndefinedConstant(), |
- assembler->BooleanConstant(true)); |
+ result = assembler->CallStub(create_iter_result_object, context, |
+ assembler->UndefinedConstant(), |
+ assembler->TrueConstant()); |
break; |
case JSGeneratorObject::kReturn: |
- result = |
- assembler->CallRuntime(Runtime::kCreateIterResultObject, context, |
- value, assembler->BooleanConstant(true)); |
+ result = assembler->CallStub(create_iter_result_object, context, value, |
+ assembler->TrueConstant()); |
break; |
case JSGeneratorObject::kThrow: |
result = assembler->CallRuntime(Runtime::kThrow, context, value); |