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

Side by Side Diff: src/harmony-typedarray.js

Issue 1384443002: [es6] Fix missing bits for full @@toPrimitive support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove useless cctest. 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
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
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 var InnerArrayJoin; 44 var InnerArrayJoin;
45 var InnerArrayLastIndexOf; 45 var InnerArrayLastIndexOf;
46 var InnerArrayMap; 46 var InnerArrayMap;
47 var InnerArraySome; 47 var InnerArraySome;
48 var InnerArraySort; 48 var InnerArraySort;
49 var InnerArrayToLocaleString; 49 var InnerArrayToLocaleString;
50 var IsNaN; 50 var IsNaN;
51 var MathMax; 51 var MathMax;
52 var MathMin; 52 var MathMin;
53 var PackedArrayReverse; 53 var PackedArrayReverse;
54 var ToNumber;
55 54
56 utils.Import(function(from) { 55 utils.Import(function(from) {
57 ArrayFrom = from.ArrayFrom; 56 ArrayFrom = from.ArrayFrom;
58 ArrayToString = from.ArrayToString; 57 ArrayToString = from.ArrayToString;
59 InnerArrayCopyWithin = from.InnerArrayCopyWithin; 58 InnerArrayCopyWithin = from.InnerArrayCopyWithin;
60 InnerArrayEvery = from.InnerArrayEvery; 59 InnerArrayEvery = from.InnerArrayEvery;
61 InnerArrayFill = from.InnerArrayFill; 60 InnerArrayFill = from.InnerArrayFill;
62 InnerArrayFilter = from.InnerArrayFilter; 61 InnerArrayFilter = from.InnerArrayFilter;
63 InnerArrayFind = from.InnerArrayFind; 62 InnerArrayFind = from.InnerArrayFind;
64 InnerArrayFindIndex = from.InnerArrayFindIndex; 63 InnerArrayFindIndex = from.InnerArrayFindIndex;
65 InnerArrayForEach = from.InnerArrayForEach; 64 InnerArrayForEach = from.InnerArrayForEach;
66 InnerArrayIndexOf = from.InnerArrayIndexOf; 65 InnerArrayIndexOf = from.InnerArrayIndexOf;
67 InnerArrayJoin = from.InnerArrayJoin; 66 InnerArrayJoin = from.InnerArrayJoin;
68 InnerArrayLastIndexOf = from.InnerArrayLastIndexOf; 67 InnerArrayLastIndexOf = from.InnerArrayLastIndexOf;
69 InnerArrayMap = from.InnerArrayMap; 68 InnerArrayMap = from.InnerArrayMap;
70 InnerArrayReduce = from.InnerArrayReduce; 69 InnerArrayReduce = from.InnerArrayReduce;
71 InnerArrayReduceRight = from.InnerArrayReduceRight; 70 InnerArrayReduceRight = from.InnerArrayReduceRight;
72 InnerArraySome = from.InnerArraySome; 71 InnerArraySome = from.InnerArraySome;
73 InnerArraySort = from.InnerArraySort; 72 InnerArraySort = from.InnerArraySort;
74 InnerArrayToLocaleString = from.InnerArrayToLocaleString; 73 InnerArrayToLocaleString = from.InnerArrayToLocaleString;
75 IsNaN = from.IsNaN; 74 IsNaN = from.IsNaN;
76 MathMax = from.MathMax; 75 MathMax = from.MathMax;
77 MathMin = from.MathMin; 76 MathMin = from.MathMin;
78 PackedArrayReverse = from.PackedArrayReverse; 77 PackedArrayReverse = from.PackedArrayReverse;
79 ToNumber = from.ToNumber;
80 }); 78 });
81 79
82 // ------------------------------------------------------------------- 80 // -------------------------------------------------------------------
83 81
84 function ConstructTypedArray(constructor, arg) { 82 function ConstructTypedArray(constructor, arg) {
85 // TODO(littledan): This is an approximation of the spec, which requires 83 // TODO(littledan): This is an approximation of the spec, which requires
86 // that only real TypedArray classes should be accepted (22.2.2.1.1) 84 // that only real TypedArray classes should be accepted (22.2.2.1.1)
87 if (!%IsConstructor(constructor) || IS_UNDEFINED(constructor.prototype) || 85 if (!%IsConstructor(constructor) || IS_UNDEFINED(constructor.prototype) ||
88 !%HasOwnProperty(constructor.prototype, "BYTES_PER_ELEMENT")) { 86 !%HasOwnProperty(constructor.prototype, "BYTES_PER_ELEMENT")) {
89 throw MakeTypeError(kNotTypedArray); 87 throw MakeTypeError(kNotTypedArray);
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 "some", TypedArraySome, 403 "some", TypedArraySome,
406 "sort", TypedArraySort, 404 "sort", TypedArraySort,
407 "toString", TypedArrayToString, 405 "toString", TypedArrayToString,
408 "toLocaleString", TypedArrayToLocaleString 406 "toLocaleString", TypedArrayToLocaleString
409 ]); 407 ]);
410 endmacro 408 endmacro
411 409
412 TYPED_ARRAYS(EXTEND_TYPED_ARRAY) 410 TYPED_ARRAYS(EXTEND_TYPED_ARRAY)
413 411
414 }) 412 })
OLDNEW
« no previous file with comments | « src/harmony-simd.js ('k') | src/hydrogen.h » ('j') | test/cctest/compiler/test-run-jscalls.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698