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

Side by Side Diff: src/generator.js

Issue 1132513003: Call builtin code wrapped in functions from the bootstrapper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix extra natives Created 5 years, 7 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/date.js ('k') | src/harmony-array.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 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 (function() { 5 (function(global, shared, exports) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
11 var GlobalFunction = global.Function; 11 var GlobalFunction = global.Function;
12 12
13 // ---------------------------------------------------------------------------- 13 // ----------------------------------------------------------------------------
14 14
15 // Generator functions and objects are specified by ES6, sections 15.19.3 and 15 // Generator functions and objects are specified by ES6, sections 15.19.3 and
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 68
69 function GeneratorObjectIterator() { 69 function GeneratorObjectIterator() {
70 return this; 70 return this;
71 } 71 }
72 72
73 73
74 function GeneratorFunctionConstructor(arg1) { // length == 1 74 function GeneratorFunctionConstructor(arg1) { // length == 1
75 var source = $newFunctionString(arguments, 'function*'); 75 var source = $newFunctionString(arguments, 'function*');
76 var global_proxy = %GlobalProxy(global); 76 var global_proxy = %GlobalProxy(GeneratorFunctionConstructor);
77 // Compile the string in the constructor and not a helper so that errors 77 // Compile the string in the constructor and not a helper so that errors
78 // appear to come from here. 78 // appear to come from here.
79 var f = %_CallFunction(global_proxy, %CompileString(source, true)); 79 var f = %_CallFunction(global_proxy, %CompileString(source, true));
80 %FunctionMarkNameShouldPrintAsAnonymous(f); 80 %FunctionMarkNameShouldPrintAsAnonymous(f);
81 return f; 81 return f;
82 } 82 }
83 83
84 // ---------------------------------------------------------------------------- 84 // ----------------------------------------------------------------------------
85 85
86 // Both Runtime_GeneratorNext and Runtime_GeneratorThrow are supported by 86 // Both Runtime_GeneratorNext and Runtime_GeneratorThrow are supported by
(...skipping 16 matching lines...) Expand all
103 %AddNamedProperty(GeneratorObjectPrototype, 103 %AddNamedProperty(GeneratorObjectPrototype,
104 symbolToStringTag, "Generator", DONT_ENUM | READ_ONLY); 104 symbolToStringTag, "Generator", DONT_ENUM | READ_ONLY);
105 %InternalSetPrototype(GeneratorFunctionPrototype, GlobalFunction.prototype); 105 %InternalSetPrototype(GeneratorFunctionPrototype, GlobalFunction.prototype);
106 %AddNamedProperty(GeneratorFunctionPrototype, 106 %AddNamedProperty(GeneratorFunctionPrototype,
107 symbolToStringTag, "GeneratorFunction", DONT_ENUM | READ_ONLY); 107 symbolToStringTag, "GeneratorFunction", DONT_ENUM | READ_ONLY);
108 %AddNamedProperty(GeneratorFunctionPrototype, "constructor", 108 %AddNamedProperty(GeneratorFunctionPrototype, "constructor",
109 GeneratorFunction, DONT_ENUM | READ_ONLY); 109 GeneratorFunction, DONT_ENUM | READ_ONLY);
110 %InternalSetPrototype(GeneratorFunction, GlobalFunction); 110 %InternalSetPrototype(GeneratorFunction, GlobalFunction);
111 %SetCode(GeneratorFunction, GeneratorFunctionConstructor); 111 %SetCode(GeneratorFunction, GeneratorFunctionConstructor);
112 112
113 })(); 113 })
OLDNEW
« no previous file with comments | « src/date.js ('k') | src/harmony-array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698