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

Side by Side Diff: src/js/harmony-array-includes.js

Issue 1413173003: Move error message makers off js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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/harmony-array.js ('k') | src/js/harmony-atomics.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 // -------------------------------------------------------------------
12 // Imports
13
11 var GlobalArray = global.Array; 14 var GlobalArray = global.Array;
15 var MakeTypeError;
12 var SameValueZero; 16 var SameValueZero;
13 17
14 utils.Import(function(from) { 18 utils.Import(function(from) {
19 MakeTypeError = from.MakeTypeError;
15 SameValueZero = from.SameValueZero; 20 SameValueZero = from.SameValueZero;
16 }); 21 });
17 22
18 // ------------------------------------------------------------------- 23 // -------------------------------------------------------------------
19 24
20 // Proposed for ES7 25 // Proposed for ES7
21 // https://github.com/tc39/Array.prototype.includes 26 // https://github.com/tc39/Array.prototype.includes
22 // 46c7532ec8499dea3e51aeb940d09e07547ed3f5 27 // 46c7532ec8499dea3e51aeb940d09e07547ed3f5
23 function InnerArrayIncludes(searchElement, fromIndex, array, length) { 28 function InnerArrayIncludes(searchElement, fromIndex, array, length) {
24 if (length === 0) { 29 if (length === 0) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Set up non-enumerable functions on the prototype object. 109 // Set up non-enumerable functions on the prototype object.
105 utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [ 110 utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [
106 "includes", TypedArrayIncludes 111 "includes", TypedArrayIncludes
107 ]); 112 ]);
108 endmacro 113 endmacro
109 114
110 TYPED_ARRAYS(DECLARE_GLOBALS) 115 TYPED_ARRAYS(DECLARE_GLOBALS)
111 TYPED_ARRAYS(EXTEND_TYPED_ARRAY) 116 TYPED_ARRAYS(EXTEND_TYPED_ARRAY)
112 117
113 }) 118 })
OLDNEW
« no previous file with comments | « src/js/harmony-array.js ('k') | src/js/harmony-atomics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698