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

Side by Side Diff: src/generator.js

Issue 1318043002: Native context: do not put public symbols and flags on the js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix and rebase Created 5 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
« no previous file with comments | « src/factory.h ('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(global, utils) { 5 (function(global, utils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
11 // ------------------------------------------------------------------- 11 // -------------------------------------------------------------------
12 // Imports 12 // Imports
13 13
14 var GlobalFunction = global.Function; 14 var GlobalFunction = global.Function;
15
16 var NewFunctionString; 15 var NewFunctionString;
16 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
17 17
18 utils.Import(function(from) { 18 utils.Import(function(from) {
19 NewFunctionString = from.NewFunctionString; 19 NewFunctionString = from.NewFunctionString;
20 }); 20 });
21 21
22 // ---------------------------------------------------------------------------- 22 // ----------------------------------------------------------------------------
23 23
24 // Generator functions and objects are specified by ES6, sections 15.19.3 and 24 // Generator functions and objects are specified by ES6, sections 15.19.3 and
25 // 15.19.4. 25 // 15.19.4.
26 26
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Set up non-enumerable functions on the generator prototype object. 95 // Set up non-enumerable functions on the generator prototype object.
96 var GeneratorObjectPrototype = GeneratorFunctionPrototype.prototype; 96 var GeneratorObjectPrototype = GeneratorFunctionPrototype.prototype;
97 utils.InstallFunctions(GeneratorObjectPrototype, 97 utils.InstallFunctions(GeneratorObjectPrototype,
98 DONT_ENUM, 98 DONT_ENUM,
99 ["next", GeneratorObjectNext, 99 ["next", GeneratorObjectNext,
100 "throw", GeneratorObjectThrow]); 100 "throw", GeneratorObjectThrow]);
101 101
102 %AddNamedProperty(GeneratorObjectPrototype, "constructor", 102 %AddNamedProperty(GeneratorObjectPrototype, "constructor",
103 GeneratorFunctionPrototype, DONT_ENUM | READ_ONLY); 103 GeneratorFunctionPrototype, DONT_ENUM | READ_ONLY);
104 %AddNamedProperty(GeneratorObjectPrototype, 104 %AddNamedProperty(GeneratorObjectPrototype,
105 symbolToStringTag, "Generator", DONT_ENUM | READ_ONLY); 105 toStringTagSymbol, "Generator", DONT_ENUM | READ_ONLY);
106 %InternalSetPrototype(GeneratorFunctionPrototype, GlobalFunction.prototype); 106 %InternalSetPrototype(GeneratorFunctionPrototype, GlobalFunction.prototype);
107 %AddNamedProperty(GeneratorFunctionPrototype, 107 %AddNamedProperty(GeneratorFunctionPrototype,
108 symbolToStringTag, "GeneratorFunction", DONT_ENUM | READ_ONLY); 108 toStringTagSymbol, "GeneratorFunction", DONT_ENUM | READ_ONLY);
109 %AddNamedProperty(GeneratorFunctionPrototype, "constructor", 109 %AddNamedProperty(GeneratorFunctionPrototype, "constructor",
110 GeneratorFunction, DONT_ENUM | READ_ONLY); 110 GeneratorFunction, DONT_ENUM | READ_ONLY);
111 %InternalSetPrototype(GeneratorFunction, GlobalFunction); 111 %InternalSetPrototype(GeneratorFunction, GlobalFunction);
112 %SetCode(GeneratorFunction, GeneratorFunctionConstructor); 112 %SetCode(GeneratorFunction, GeneratorFunctionConstructor);
113 113
114 }) 114 })
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/harmony-array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698