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

Side by Side Diff: src/js/array.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/heap/heap.h ('k') | src/js/array-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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, extrasUtils) { 5 (function(global, utils, extrasUtils) {
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 Delete; 14 var Delete;
15 var FLAG_harmony_tolength;
15 var GlobalArray = global.Array; 16 var GlobalArray = global.Array;
16 var InternalArray = utils.InternalArray; 17 var InternalArray = utils.InternalArray;
17 var InternalPackedArray = utils.InternalPackedArray; 18 var InternalPackedArray = utils.InternalPackedArray;
18 var MathMin; 19 var MathMin;
19 var ObjectHasOwnProperty; 20 var ObjectHasOwnProperty;
20 var ObjectIsFrozen; 21 var ObjectIsFrozen;
21 var ObjectIsSealed; 22 var ObjectIsSealed;
22 var ObjectToString; 23 var ObjectToString;
23 var ObserveBeginPerformSplice; 24 var ObserveBeginPerformSplice;
24 var ObserveEndPerformSplice; 25 var ObserveEndPerformSplice;
25 var ObserveEnqueueSpliceRecord; 26 var ObserveEnqueueSpliceRecord;
26 var unscopablesSymbol = utils.ImportNow("unscopables_symbol"); 27 var unscopablesSymbol = utils.ImportNow("unscopables_symbol");
27 28
28 utils.Import(function(from) { 29 utils.Import(function(from) {
29 Delete = from.Delete; 30 Delete = from.Delete;
30 MathMin = from.MathMin; 31 MathMin = from.MathMin;
31 ObjectHasOwnProperty = from.ObjectHasOwnProperty; 32 ObjectHasOwnProperty = from.ObjectHasOwnProperty;
32 ObjectIsFrozen = from.ObjectIsFrozen; 33 ObjectIsFrozen = from.ObjectIsFrozen;
33 ObjectIsSealed = from.ObjectIsSealed; 34 ObjectIsSealed = from.ObjectIsSealed;
34 ObjectToString = from.ObjectToString; 35 ObjectToString = from.ObjectToString;
35 ObserveBeginPerformSplice = from.ObserveBeginPerformSplice; 36 ObserveBeginPerformSplice = from.ObserveBeginPerformSplice;
36 ObserveEndPerformSplice = from.ObserveEndPerformSplice; 37 ObserveEndPerformSplice = from.ObserveEndPerformSplice;
37 ObserveEnqueueSpliceRecord = from.ObserveEnqueueSpliceRecord; 38 ObserveEnqueueSpliceRecord = from.ObserveEnqueueSpliceRecord;
38 }); 39 });
39 40
41 utils.ImportFromExperimental(function(from) {
42 FLAG_harmony_tolength = from.FLAG_harmony_tolength;
43 });
44
40 // ------------------------------------------------------------------- 45 // -------------------------------------------------------------------
41 46
42 // Global list of arrays visited during toString, toLocaleString and 47 // Global list of arrays visited during toString, toLocaleString and
43 // join invocations. 48 // join invocations.
44 var visited_arrays = new InternalArray(); 49 var visited_arrays = new InternalArray();
45 50
46 51
47 // Gets a sorted array of array keys. Useful for operations on sparse 52 // Gets a sorted array of array keys. Useful for operations on sparse
48 // arrays. Dupes have not been removed. 53 // arrays. Dupes have not been removed.
49 function GetSortedArrayKeys(array, indices) { 54 function GetSortedArrayKeys(array, indices) {
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 %InstallToContext([ 1672 %InstallToContext([
1668 "array_pop", ArrayPop, 1673 "array_pop", ArrayPop,
1669 "array_push", ArrayPush, 1674 "array_push", ArrayPush,
1670 "array_shift", ArrayShift, 1675 "array_shift", ArrayShift,
1671 "array_splice", ArraySplice, 1676 "array_splice", ArraySplice,
1672 "array_slice", ArraySlice, 1677 "array_slice", ArraySlice,
1673 "array_unshift", ArrayUnshift, 1678 "array_unshift", ArrayUnshift,
1674 ]); 1679 ]);
1675 1680
1676 }); 1681 });
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/js/array-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698