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

Side by Side Diff: src/generator.js

Issue 544953005: Support stepping into generator function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: test case Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/runtime.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 "use strict"; 5 "use strict";
6 6
7 // This file relies on the fact that the following declarations have been made 7 // This file relies on the fact that the following declarations have been made
8 // in runtime.js: 8 // in runtime.js:
9 // var $Function = global.Function; 9 // var $Function = global.Function;
10 10
11 // ---------------------------------------------------------------------------- 11 // ----------------------------------------------------------------------------
12 12
13 13
14 // Generator functions and objects are specified by ES6, sections 15.19.3 and 14 // Generator functions and objects are specified by ES6, sections 15.19.3 and
15 // 15.19.4. 15 // 15.19.4.
16 16
17 function GeneratorObjectNext(value) { 17 function GeneratorObjectNext(value) {
18 if (!IS_GENERATOR(this)) { 18 if (!IS_GENERATOR(this)) {
19 throw MakeTypeError('incompatible_method_receiver', 19 throw MakeTypeError('incompatible_method_receiver',
20 ['[Generator].prototype.next', this]); 20 ['[Generator].prototype.next', this]);
21 } 21 }
22 22
23 if (DEBUG_IS_ACTIVE) %DebugPrepareStepInIfStepping(this);
23 return %_GeneratorNext(this, value); 24 return %_GeneratorNext(this, value);
24 } 25 }
25 26
26 function GeneratorObjectThrow(exn) { 27 function GeneratorObjectThrow(exn) {
27 if (!IS_GENERATOR(this)) { 28 if (!IS_GENERATOR(this)) {
28 throw MakeTypeError('incompatible_method_receiver', 29 throw MakeTypeError('incompatible_method_receiver',
29 ['[Generator].prototype.throw', this]); 30 ['[Generator].prototype.throw', this]);
30 } 31 }
31 32
32 return %_GeneratorThrow(this, exn); 33 return %_GeneratorThrow(this, exn);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY); 78 GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY);
78 %InternalSetPrototype(GeneratorFunctionPrototype, $Function.prototype); 79 %InternalSetPrototype(GeneratorFunctionPrototype, $Function.prototype);
79 %SetCode(GeneratorFunctionPrototype, GeneratorFunctionPrototypeConstructor); 80 %SetCode(GeneratorFunctionPrototype, GeneratorFunctionPrototypeConstructor);
80 %AddNamedProperty(GeneratorFunctionPrototype, "constructor", 81 %AddNamedProperty(GeneratorFunctionPrototype, "constructor",
81 GeneratorFunction, DONT_ENUM | DONT_DELETE | READ_ONLY); 82 GeneratorFunction, DONT_ENUM | DONT_DELETE | READ_ONLY);
82 %InternalSetPrototype(GeneratorFunction, $Function); 83 %InternalSetPrototype(GeneratorFunction, $Function);
83 %SetCode(GeneratorFunction, GeneratorFunctionConstructor); 84 %SetCode(GeneratorFunction, GeneratorFunctionConstructor);
84 } 85 }
85 86
86 SetUpGenerators(); 87 SetUpGenerators();
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698