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

Side by Side Diff: src/builtins/builtins-generator.cc

Issue 2502293002: Reland of [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: fix Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/builtins/builtins-function.cc ('k') | src/builtins/builtins-global.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 7
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 { 89 {
90 Node* result = 90 Node* result =
91 assembler->CallRuntime(Runtime::kThrowGeneratorRunning, context); 91 assembler->CallRuntime(Runtime::kThrowGeneratorRunning, context);
92 assembler->Return(result); // Never reached. 92 assembler->Return(result); // Never reached.
93 } 93 }
94 } 94 }
95 95
96 } // anonymous namespace 96 } // anonymous namespace
97 97
98 // ES6 section 25.3.1.2 Generator.prototype.next ( value ) 98 // ES6 section 25.3.1.2 Generator.prototype.next ( value )
99 void Builtins::Generate_GeneratorPrototypeNext(CodeStubAssembler* assembler) { 99 void Builtins::Generate_GeneratorPrototypeNext(
100 Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kNext, 100 compiler::CodeAssemblerState* state) {
101 CodeStubAssembler assembler(state);
102 Generate_GeneratorPrototypeResume(&assembler, JSGeneratorObject::kNext,
101 "[Generator].prototype.next"); 103 "[Generator].prototype.next");
102 } 104 }
103 105
104 // ES6 section 25.3.1.3 Generator.prototype.return ( value ) 106 // ES6 section 25.3.1.3 Generator.prototype.return ( value )
105 void Builtins::Generate_GeneratorPrototypeReturn(CodeStubAssembler* assembler) { 107 void Builtins::Generate_GeneratorPrototypeReturn(
106 Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kReturn, 108 compiler::CodeAssemblerState* state) {
109 CodeStubAssembler assembler(state);
110 Generate_GeneratorPrototypeResume(&assembler, JSGeneratorObject::kReturn,
107 "[Generator].prototype.return"); 111 "[Generator].prototype.return");
108 } 112 }
109 113
110 // ES6 section 25.3.1.4 Generator.prototype.throw ( exception ) 114 // ES6 section 25.3.1.4 Generator.prototype.throw ( exception )
111 void Builtins::Generate_GeneratorPrototypeThrow(CodeStubAssembler* assembler) { 115 void Builtins::Generate_GeneratorPrototypeThrow(
112 Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kThrow, 116 compiler::CodeAssemblerState* state) {
117 CodeStubAssembler assembler(state);
118 Generate_GeneratorPrototypeResume(&assembler, JSGeneratorObject::kThrow,
113 "[Generator].prototype.throw"); 119 "[Generator].prototype.throw");
114 } 120 }
115 121
116 } // namespace internal 122 } // namespace internal
117 } // namespace v8 123 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-function.cc ('k') | src/builtins/builtins-global.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698