Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: src/builtins/builtins-generator.cc

Issue 2619163004: [stubs] Add CreateIterResultObject stub (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698