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

Side by Side Diff: src/js/runtime.js

Issue 1411653002: Install iterator meta objects via utils object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 5 years, 2 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/js/regexp.js ('k') | src/js/string-iterator.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 // This files contains runtime support implemented in JavaScript. 5 // This files contains runtime support implemented in JavaScript.
6 6
7 // CAUTION: Some of the functions specified in this file are called 7 // CAUTION: Some of the functions specified in this file are called
8 // directly from compiled code. These are the functions with names in 8 // directly from compiled code. These are the functions with names in
9 // ALL CAPS. The compiled code passes the first argument in 'this'. 9 // ALL CAPS. The compiled code passes the first argument in 'this'.
10 10
11 11
12 // The following declarations are shared with other native JS files. 12 // The following declarations are shared with other native JS files.
13 // They are all declared at this one spot to avoid redeclaration errors. 13 // They are all declared at this one spot to avoid redeclaration errors.
14 var $sameValue;
15 var $sameValueZero;
16
17 var harmony_tolength = false;
18 14
19 (function(global, utils) { 15 (function(global, utils) {
20 16
21 %CheckIsBootstrapping(); 17 %CheckIsBootstrapping();
22 18
23 var GlobalArray = global.Array; 19 var GlobalArray = global.Array;
24 var GlobalBoolean = global.Boolean; 20 var GlobalBoolean = global.Boolean;
25 var GlobalString = global.String; 21 var GlobalString = global.String;
26 var isConcatSpreadableSymbol = 22 var isConcatSpreadableSymbol =
27 utils.ImportNow("is_concat_spreadable_symbol"); 23 utils.ImportNow("is_concat_spreadable_symbol");
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // NOTE: Setting the prototype for Array must take place as early as 221 // NOTE: Setting the prototype for Array must take place as early as
226 // possible due to code generation for array literals. When 222 // possible due to code generation for array literals. When
227 // generating code for a array literal a boilerplate array is created 223 // generating code for a array literal a boilerplate array is created
228 // that is cloned when running the code. It is essential that the 224 // that is cloned when running the code. It is essential that the
229 // boilerplate gets the right prototype. 225 // boilerplate gets the right prototype.
230 %FunctionSetPrototype(GlobalArray, new GlobalArray(0)); 226 %FunctionSetPrototype(GlobalArray, new GlobalArray(0));
231 227
232 // ---------------------------------------------------------------------------- 228 // ----------------------------------------------------------------------------
233 // Exports 229 // Exports
234 230
235 $sameValue = SameValue;
236 $sameValueZero = SameValueZero;
237
238 utils.Export(function(to) { 231 utils.Export(function(to) {
239 to.ToPositiveInteger = ToPositiveInteger; 232 to.ToPositiveInteger = ToPositiveInteger;
233 to.SameValue = SameValue;
234 to.SameValueZero = SameValueZero;
240 }); 235 });
241 236
242 %InstallToContext([ 237 %InstallToContext([
243 "apply_prepare_builtin", APPLY_PREPARE, 238 "apply_prepare_builtin", APPLY_PREPARE,
244 "concat_iterable_to_array_builtin", CONCAT_ITERABLE_TO_ARRAY, 239 "concat_iterable_to_array_builtin", CONCAT_ITERABLE_TO_ARRAY,
245 "reflect_apply_prepare_builtin", REFLECT_APPLY_PREPARE, 240 "reflect_apply_prepare_builtin", REFLECT_APPLY_PREPARE,
246 "reflect_construct_prepare_builtin", REFLECT_CONSTRUCT_PREPARE, 241 "reflect_construct_prepare_builtin", REFLECT_CONSTRUCT_PREPARE,
247 ]); 242 ]);
248 243
249 %InstallToContext([ 244 %InstallToContext([
250 "concat_iterable_to_array", ConcatIterableToArray, 245 "concat_iterable_to_array", ConcatIterableToArray,
251 ]); 246 ]);
252 247
253 }) 248 })
OLDNEW
« no previous file with comments | « src/js/regexp.js ('k') | src/js/string-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698