Home
last modified time | relevance | path

Searched full:array (Results 1 – 25 of 2331) sorted by relevance

12345678910>>...94

/arkcompiler/ets_frontend/es2panda/test/
Dtest262skiplist-compiler-arm64.txt2 built-ins/Array/prototype/reduce/15.4.4.21-1-11.js
3 built-ins/Array/prototype/reduce/15.4.4.21-1-12.js
4 built-ins/Array/prototype/reduce/15.4.4.21-1-14.js
5 built-ins/Array/prototype/reduce/15.4.4.21-1-3.js
6 built-ins/Array/prototype/reduce/15.4.4.21-1-4.js
7 built-ins/Array/prototype/reduce/15.4.4.21-1-5.js
8 built-ins/Array/prototype/reduce/15.4.4.21-1-6.js
9 built-ins/Array/prototype/reduce/15.4.4.21-1-7.js
10 built-ins/Array/prototype/reduce/15.4.4.21-1-8.js
11 built-ins/Array/prototype/reduce/15.4.4.21-1-9.js
[all …]
/arkcompiler/ets_frontend/test262/
Dsendable_tests.txt54 #sendable/builtins/Array/S15.4.1_A1.1_T1.js
55 #sendable/builtins/Array/S15.4.1_A1.1_T2.js
56 #sendable/builtins/Array/S15.4.1_A1.1_T3.js
57 #sendable/builtins/Array/S15.4.1_A1.2_T1.js
58 #sendable/builtins/Array/S15.4.1_A1.3_T1.js
59 #sendable/builtins/Array/S15.4.1_A2.2_T1.js
60 #sendable/builtins/Array/S15.4.1_A2.1_T1.js
61 #sendable/builtins/Array/S15.4.2.1_A1.1_T1.js
62 #sendable/builtins/Array/S15.4.1_A3.1_T1.js
63 #sendable/builtins/Array/S15.4.2.1_A1.1_T2.js
[all …]
Des2023_tests.txt1 built-ins/Array/prototype/findLast/predicate-call-parameters.js
2 built-ins/Array/prototype/findLast/return-abrupt-from-predicate-call.js
3 built-ins/Array/prototype/findLast/call-with-boolean.js
4 built-ins/Array/prototype/findLast/not-a-constructor.js
5 built-ins/Array/prototype/findLast/return-undefined-if-predicate-returns-false-value.js
6 built-ins/Array/prototype/findLast/length.js
7 built-ins/Array/prototype/findLast/return-abrupt-from-property.js
8 built-ins/Array/prototype/findLast/return-abrupt-from-this.js
9 built-ins/Array/prototype/findLast/return-abrupt-from-this-length-as-symbol.js
10 built-ins/Array/prototype/findLast/predicate-call-this-strict.js
[all …]
Des2015_tests.txt1 built-ins/Array/15.4.5.1-5-1.js
2 built-ins/Array/15.4.5.1-5-2.js
3 built-ins/Array/15.4.5-1.js
4 built-ins/Array/constructor.js
5 built-ins/Array/from/Array.from_arity.js
6 built-ins/Array/from/Array.from_forwards-length-for-array-likes.js
7 built-ins/Array/from/Array.from-descriptor.js
8 built-ins/Array/from/Array.from-name.js
9 built-ins/Array/from/calling-from-valid-1-noStrict.js
10 built-ins/Array/from/calling-from-valid-1-onlyStrict.js
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/04.array_literal/
Darray_literal.params.yaml14 --- # List of valid array composites
16 # empty array
17 - { array: '[]', type: number, len: 0 }
19 # array of primitives
20 - { array: '[1, 2, 3]', type: int, len: 3 }
22 # array of boxed
23 - { array: '[new Double(3.1415926)]', type: Double, len: 1 }
25 # array of strings
26 - { array: '["aaa", "bbb"]', type: string, len: 2 }
28 # array of Objects
[all …]
/arkcompiler/runtime_core/static_core/runtime/coretypes/
Darray.cpp16 #include "runtime/include/coretypes/array.h"
28 static Array *AllocateArray(ark::BaseClass *arrayClass, size_t elemSize, ArraySizeT length, ark::Sp… in AllocateArray()
31 size_t size = Array::ComputeSize(elemSize, length); in AllocateArray()
33 …LOG(ERROR, RUNTIME) << "Illegal array size: element size: " << elemSize << " array length: " << le… in AllocateArray()
34 ThrowOutOfMemoryError("OOM when allocating array"); in AllocateArray()
38 return static_cast<coretypes::Array *>( in AllocateArray()
43 return static_cast<coretypes::Array *>(vm->GetHeapManager()->AllocateNonMovableObject( in AllocateArray()
50 Array *Array::Create(ark::Class *arrayClass, const uint8_t *data, ArraySizeT length, ark::SpaceType… in Create()
54 auto *array = AllocateArray(arrayClass, elemSize, length, spaceType, pinned); in Create() local
55 if (UNLIKELY(array == nullptr)) { in Create()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/escompat/
Descompat_Array_methods.sts25 …ures += check((): int => { return testCreateFrom()}, "Test Create Array<Object> object from array")
26 …= check((): int => { return testCreateFrom2()}, "Test Create Array<Object> object from array with …
27 failures += check((): int => { return testEvery()}, "Test Array<Object> every() method")
28 failures += check((): int => { return testSome()}, "Test Array<Object> some() method")
29 failures += check((): int => { return testSomeNegative()}, "Test Array<Object> some() method")
30 …failures += check((): int => { return testMap0()}, "Test create new Array<Object> object apply giv…
31 failures += check((): int => { return testReverse()}, "Test Array<Object> reverse function")
33 failures += check((): int => { return testFill0()}, "Test Array<Object> fill(0) method")
34 failures += check((): int => { return testFill3()}, "Test Array<Object> fill(3) method")
35 failures += check((): int => { return testConcat()}, "Test Array<Object> concatenate method")
[all …]
Descompat_Array_modifications.sts25 …failures += check((): int => { return testPushEmpty()}, "Test push() method with empty Array<Objec…
31 …failures += check((): int => { return testShiftEmpty()}, "Test shift() method with empty Array<Obj…
46 const array = Array.from<object>(source)
47 let length = array.length
49 let shifted = array.shift()
52 if (array.length != length) {
53 console.println("Target array length mismatch: " + array.length + " but expected" + length)
62 for (let i: int = 0; i < array.length; i++) {
64 if (array.at(i) == source[j]) continue
73 let array: Array<Object> = new Array<Object>()
[all …]
Descompat_Array_misc.sts31 …lures += check((): int => { return testJoinEmpty()}, "Test join(0) method with empty source array")
44 …lures += check((): int => { return testIndexOfFromEmpty()}, "Test indexOf method with empty array")
47 failures += check((): int => { return array{{.ci.name}}()}, "Test262: {{.ci.name}}")
61 const array = Array.from<object>(source)
63 if (array.length != source.length) {
68 for (let i: int = 0; i < array.length; i++) {
69 if (array.includes(source[i])) continue
80 let src = new Array<Object>(empty)
91 const src = Array.from<object>(source2)
102 const src = Array.from<object>(source2)
[all …]
/arkcompiler/ets_runtime/test/moduletest/arrayEvery/
Dexpect_output.txt15 …:1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"index":2,"arra…
18 Log: [{"value":1,"index":0,"array":[1,2,-3,4]},{"value":2,"index":1,"array":[1,2,-3,4]},{"value":-3…
24 Log: [{"value":10,"index":0,"array":[10]}] Result: true
27 Log: [{"value":3,"index":2,"array":[null,null,3,null,5]},{"value":5,"index":4,"array":[null,null,3,…
30 Log: [{"value":1,"index":0,"array":[1,null,3]},{"index":1,"array":[1,null,3]}] Result: false
33 Log: [{"value":null,"index":0,"array":[null,1,2]}] Result: false
36 Log: [{"value":null,"index":0,"array":[null,1,2]}] Result: false
39 Log: [{"value":1,"index":0,"array":[1,2]},{"value":2,"index":1,"array":[1,2]}] Result: true
42 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]}] Result: true
45 …g: [{"value":false,"index":0,"array":[false,0,""]},{"value":0,"index":1,"array":[false,0,""]},{"va…
[all …]
/arkcompiler/ets_runtime/test/moduletest/arrayfindindex/
Dexpect_output.txt18 Log: [{"value":1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"i…
21 …:1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"index":2,"arra…
27 Log: [{"value":false,"index":0,"array":[false,0,""]}] Result: 0
30 Log: [{"value":1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"i…
33 Log: [{"value":null,"index":0,"array":[null,1,2]},{"value":1,"index":1,"array":[null,1,2]}] Result:…
36 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index…
39 Log: [{"value":null,"index":0,"array":[null,1,2]},{"value":1,"index":1,"array":[null,1,2]}] Result:…
42 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index…
45 Log: [{"value":1,"index":0,"array":[1,2,3]}] Result: 0
48 Log: [{"value":1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"i…
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/templates/stdlib/
DtypedArray.sts.j240 constructor(parent: {{N}}Array) {
57 private parent: {{N}}Array
60 constructor(parent: {{N}}Array) {
79 private parent: {{N}}Array
82 constructor(parent: {{N}}Array) {
102 * JS {{N}}Array API-compatible class
104 export final class {{N}}Array implements Iterable<{{subsetTypeValues}}>, ArrayLike<{{subsetTypeValu…
109 * Creates an empty {{N}}Array.
116 * Creates an {{N}}Array with respect to data accessed via Iterable<Number> interface
122 this.byteLength = arr.length as int * {{N}}Array.BYTES_PER_ELEMENT as int
[all …]
DtypedUArray.sts.j242 constructor(parent: {{element['name']}}Array) {
59 private parent: {{element['name']}}Array
62 constructor(parent: {{element['name']}}Array) {
81 private parent: {{element['name']}}Array
84 constructor(parent: {{element['name']}}Array) {
104 * JS {{element['name']}}Array API-compatible class
106 export class {{element['name']}}Array implements Iterable<{{element['subsetTypeValues']}}>, ArrayLi…
117 * Creates an empty {{element['name']}}Array.
124 … * Creates an {{element['name']}}Array with respect to data accessed via Iterable<Number> interface
130 … this.byteLengthInt = arr.length as int * {{element['name']}}Array.BYTES_PER_ELEMENT as int
[all …]
/arkcompiler/ets_runtime/test/aottest/builtins_array/
Dbuiltins_array.ts17 // test new builtin array
18 let array1 = new Array();
19 let array2 = new Array(1);
25 print(Array().length); // c++ path
26 print(Array(1).length); // c++ path
29 let array3 = new Array(-1);
36 let array3 = new Array(2.1);
43 let array3 = new Array(4294967296);
58 let array = [];
59 for (let i = 0; i < 10; i++) array.push(i);
[all …]
/arkcompiler/ets_runtime/test/moduletest/arraySome/
Dexpect_output.txt15 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index…
18 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index…
24 …g: [{"value":false,"index":0,"array":[false,0,""]},{"value":0,"index":1,"array":[false,0,""]},{"va…
27 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]}] Result: true
30 Log: [{"value":null,"index":0,"array":[null,2,3]}] Result: true
33 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index…
36 Log: [{"value":{"id":1},"index":0,"array":[{"id":1},{"id":2}]},{"value":{"id":2},"index":1,"array":…
39 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]}] Result: true
42 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index…
45 Log: [{"value":1,"index":0,"array":[1,2,3]}] Result: true
[all …]
/arkcompiler/ets_runtime/test/moduletest/arrayfind/
Dexpect_output.txt23 array[5]5
37 Log: [{"value":1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"i…
40 …:1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"index":2,"arra…
46 Log: [{"value":false,"index":0,"array":[false,0,""]}] Result: false
49 Log: [{"value":1,"index":0,"array":[1,2,3,4]},{"value":2,"index":1,"array":[1,2,3,4]},{"value":3,"i…
52 Log: [{"value":null,"index":0,"array":[null,1,2]},{"value":1,"index":1,"array":[null,1,2]}] Result:…
55 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index…
58 Log: [{"value":null,"index":0,"array":[null,1,2]},{"value":1,"index":1,"array":[null,1,2]}] Result:…
61 Log: [{"value":1,"index":0,"array":[1,2,3]},{"value":2,"index":1,"array":[1,2,3]},{"value":3,"index…
64 Log: [{"value":1,"index":0,"array":[1,2,3]}] Result: 1
[all …]
/arkcompiler/ets_runtime/test/moduletest/arrayspeciescreate/
Darrayspeciescreate.js16 class CustomArray extends Array {}
18 // define Symbol.species, then the ArraySpeciesCreate for Array will use CustomArray
19 Object.defineProperty(Array, Symbol.species, {value: CustomArray})
22 // test unstable array, fastpath in ir will be fixed later.
23 let custom = new Array(2000);
27 // Array.prototype.concat
31 // Array.prototype.map
35 // Array.prototype.filter
39 // Array.prototype.slice
43 // Array.prototype.flatMap
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_es_checked/
Darray.yaml14 category: Array
17 … - Array.of<number>(0, -0.0, 4, 1, 2, -1, Infinity, 11, -Infinity, 1, 21, 111, NaN, -NaN, 0, -0.0)
18 - Array.of<number>(0, -0.0, 4, 1, 2, -1, 1, 21, 111, 0, -0.0)
19 - Array.of<number>()
20 self_type: Array<number>
35 (x: number, y: number, i: number, array: Array<number>): number => y - x + i + array[i]
46 (x: string, y: number, i: number, array: Array<number>): string => y + x + i + array[i]
50 …- combinationRest "Array.of<number>(1)", "Array.of<number>()", "Array.of<number>(NaN, 10, Infinity…
76Array.of<number>(0, -0.0, 4, 1, 2, -1, Infinity, 11, -Infinity, 1, 21, 111, NaN, -NaN, 0, -0.0)
85 ret_type: Array<number>
[all …]
/arkcompiler/ets_runtime/test/moduletest/arrayconcat/
Darrayconcat.js60 * @tc.name:Array concat1
61 * @tc.desc:test long Array Concat long Array and change proto
65 let arr1 = new Array(2000);
68 let arr2 = new Array(2000);
74 let arr3 = new Array(2000);
80 * @tc.name:Array concat2
81 * @tc.desc:test long Array Concat short Array and change proto
85 let arr1 = new Array(10);
88 let arr2 = new Array(10);
94 let arr3 = new Array(2000);
[all …]
/arkcompiler/ets_frontend/ets2panda/test/runtime/ets/
DRecursiveTypeAlias9.sts16 type A<T> = T | Array<T> | Array<A<T>>;
21 …a = new Array<A<string>>(a, new Array<string>("test1", "test2"), new Array<A<string>>(a, new Array
23 assert((a as Array<A<string>>)[0] == "test");
24 assert(((a as Array<A<string>>)[1] as Array<A<string>>)[0] == "test1");
25 assert(((a as Array<A<string>>)[1] as Array<A<string>>)[1] == "test2");
26 assert(((a as Array<A<string>>)[2] as Array<A<string>>)[0] == "test");
27 assert((((a as Array<A<string>>)[2] as Array<A<string>>)[1] as Array<A<string>>)[0] == "test");
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/03.readonly_parameters/
Dreadonly.params.yaml18 function foo(array: readonly number[]) {
19 return array;
31 function foo(array: readonly tarr): tarr {
32 return array;
42 type tarr = Array<number>;
43 function foo(array: readonly tarr): tarr {
44 return array;
47 let arr: tarr = new Array<number>(2);
55 function foo(array: readonly tarr): tarr {
56 return array;
[all …]
Dreadonly_custom_neg.params.yaml44 function foo(array?: readonly number[], i: int) { }
47 function foo(array?: readonly Array<number>, i: int) { }
51 function foo(array?: readonly TPL, i: int) { }
55 function foo(array?: readonly number[] = [1.1, 2.2], i: int) { }
58 function foo(array?: readonly Array<number> = null, i: int) { }
62 function foo(array?: readonly TPL = ["str", 1], i: int) { }
66 function foo(array?: readonly number[] = [1.1, 2.2]) {
67 array[0] = array[1];
71 function foo(array?: readonly Array<number> = new Array<number>(2)) {
72 array[0] = array[1];
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/
DArray.sts41 private parent: Array<T>
44 constructor(parent: Array<T>) {
64 * Represents JS API-compatible Array
66 export class Array<T> implements ReadonlyArray<T>, Iterable<T> {
113 * Creates a new instance of Array
135 * Creates a new instance of Array based on Object[]
137 * @param d Array initializer
151 * Creates a new instance of an Array with the specified length
153 * @param arrayLength The length of the array to be created (optional).
155 * @returns A new Array instance with the specified length
[all …]
/arkcompiler/ets_runtime/test/moduletest/arraysplice/
Darraysplice.js29 arr = new Array(100)
33 var array = new Array(10);
34 var spliced = array.splice(1, 1);
35 for (let i = 0; i < array.length; ++i) {
36 print(i in array)
38 var array1 = new Array(10);
44 array = [];
47 let bad_start = { valueOf: function () { array.push(2 * i); return -1; } };
48 let bad_count = { valueOf: function () { array.push(2 * i + 1); return 1; } };
49 spliced = array.splice(bad_start, bad_count);
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/
DBuiltinArray.sts43 // startIndex <= endIndex is used to cover empty array case
80 * from the last item in the array.
82 * @param index Zero-based index of the array element to be returned.
83 …* Negative index counts back from the end of the array — if `index` < 0, index + `array.length()` …
85 * @returns The element in the array matching the given index.
93 * Creates a new `Array` from this `Array` instance and given `Array` instance.
95 * @param other to concatenate into a new array.
97 …* @returns New `Array` instance, constructed from `this` and given `other` instances of `Array` cl…
130 * from the last item in the array.
132 * @param index Zero-based index of the array element to be returned.
[all …]

12345678910>>...94