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

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

Issue 2504913002: Revert of [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: 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( 99 void Builtins::Generate_GeneratorPrototypeNext(CodeStubAssembler* assembler) {
100 compiler::CodeAssemblerState* state) { 100 Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kNext,
101 CodeStubAssembler assembler(state);
102 Generate_GeneratorPrototypeResume(&assembler, JSGeneratorObject::kNext,
103 "[Generator].prototype.next"); 101 "[Generator].prototype.next");
104 } 102 }
105 103
106 // ES6 section 25.3.1.3 Generator.prototype.return ( value ) 104 // ES6 section 25.3.1.3 Generator.prototype.return ( value )
107 void Builtins::Generate_GeneratorPrototypeReturn( 105 void Builtins::Generate_GeneratorPrototypeReturn(CodeStubAssembler* assembler) {
108 compiler::CodeAssemblerState* state) { 106 Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kReturn,
109 CodeStubAssembler assembler(state);
110 Generate_GeneratorPrototypeResume(&assembler, JSGeneratorObject::kReturn,
111 "[Generator].prototype.return"); 107 "[Generator].prototype.return");
112 } 108 }
113 109
114 // ES6 section 25.3.1.4 Generator.prototype.throw ( exception ) 110 // ES6 section 25.3.1.4 Generator.prototype.throw ( exception )
115 void Builtins::Generate_GeneratorPrototypeThrow( 111 void Builtins::Generate_GeneratorPrototypeThrow(CodeStubAssembler* assembler) {
116 compiler::CodeAssemblerState* state) { 112 Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kThrow,
117 CodeStubAssembler assembler(state);
118 Generate_GeneratorPrototypeResume(&assembler, JSGeneratorObject::kThrow,
119 "[Generator].prototype.throw"); 113 "[Generator].prototype.throw");
120 } 114 }
121 115
122 } // namespace internal 116 } // namespace internal
123 } // namespace v8 117 } // 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