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

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

Issue 1620253003: Implement the function.sent proposal. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO Created 4 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/harmony/function-sent.js » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // Returns receiver of generator activation. 170 // Returns receiver of generator activation.
171 RUNTIME_FUNCTION(Runtime_GeneratorGetReceiver) { 171 RUNTIME_FUNCTION(Runtime_GeneratorGetReceiver) {
172 HandleScope scope(isolate); 172 HandleScope scope(isolate);
173 DCHECK(args.length() == 1); 173 DCHECK(args.length() == 1);
174 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); 174 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
175 175
176 return generator->receiver(); 176 return generator->receiver();
177 } 177 }
178 178
179 179
180 // Returns input of generator activation.
181 RUNTIME_FUNCTION(Runtime_GeneratorGetInput) {
182 HandleScope scope(isolate);
183 DCHECK(args.length() == 1);
184 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
185
186 return generator->input();
187 }
188
189
180 // Returns generator continuation as a PC offset, or the magic -1 or 0 values. 190 // Returns generator continuation as a PC offset, or the magic -1 or 0 values.
181 RUNTIME_FUNCTION(Runtime_GeneratorGetContinuation) { 191 RUNTIME_FUNCTION(Runtime_GeneratorGetContinuation) {
182 HandleScope scope(isolate); 192 HandleScope scope(isolate);
183 DCHECK(args.length() == 1); 193 DCHECK(args.length() == 1);
184 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); 194 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
185 195
186 return Smi::FromInt(generator->continuation()); 196 return Smi::FromInt(generator->continuation());
187 } 197 }
188 198
189 199
(...skipping 21 matching lines...) Expand all
211 return NULL; 221 return NULL;
212 } 222 }
213 223
214 224
215 RUNTIME_FUNCTION(Runtime_GeneratorThrow) { 225 RUNTIME_FUNCTION(Runtime_GeneratorThrow) {
216 UNREACHABLE(); // Optimization disabled in SetUpGenerators(). 226 UNREACHABLE(); // Optimization disabled in SetUpGenerators().
217 return NULL; 227 return NULL;
218 } 228 }
219 } // namespace internal 229 } // namespace internal
220 } // namespace v8 230 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/harmony/function-sent.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698