Home
last modified time | relevance | path

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

12345678910>>...29

/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/runtime_core/runtime/coretypes/
Darray.cpp16 #include "runtime/include/coretypes/array.h"
27 static Array *AllocateArray(panda::BaseClass *array_class, size_t elem_size, array_size_t length, in AllocateArray()
30 size_t size = Array::ComputeSize(elem_size, length); in AllocateArray()
33 …LOG(ERROR, RUNTIME) << "Illegal array size: element size: " << elem_size << " array length: " << l… in AllocateArray()
34 ThrowOutOfMemoryError("OOM when allocating array"); in AllocateArray()
38 return static_cast<coretypes::Array *>( in AllocateArray()
42 return static_cast<coretypes::Array *>(vm->GetHeapManager()->AllocateNonMovableObject( in AllocateArray()
49 Array *Array::Create(panda::Class *array_class, const uint8_t *data, array_size_t length, panda::Sp… in Create()
52 auto *array = AllocateArray(array_class, elem_size, length, space_type); in Create() local
53 if (UNLIKELY(array == nullptr)) { in Create()
[all …]
/arkcompiler/ets_frontend/test262/
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 …]
DCI_tests.txt1143 built-ins/String/raw/return-empty-string-from-empty-array-length.js
1316 built-ins/JSON/parse/reviver-array-get-prop-from-prototype.js
1317 built-ins/JSON/parse/reviver-array-non-configurable-prop-delete.js
1323 built-ins/JSON/stringify/replacer-array-empty.js
1324 built-ins/JSON/stringify/replacer-array-order.js
1325 built-ins/JSON/stringify/replacer-array-string-object.js
1330 built-ins/JSON/stringify/value-array-proxy.js
1360 built-ins/Array/15.4.5.1-5-1.js
1361 built-ins/Array/15.4.5-1.js
1400 built-ins/Array/constructor.js
[all …]
Dts2abc_skip_tests.json5 "language/expressions/async-arrow-function/array-destructuring-param-strict-body.js",
12 "language/expressions/async-function/named-array-destructuring-param-strict-body.js",
19 "language/expressions/async-function/nameless-array-destructuring-param-strict-body.js",
23 "language/statements/async-function/array-destructuring-param-strict-body.js",
199 "built-ins/RegExp/match-indices/indices-array-unicode-property-names.js",
200 "built-ins/RegExp/match-indices/indices-array-non-unicode-match.js",
201 "built-ins/RegExp/match-indices/indices-array-unicode-match.js",
213 "language/expressions/async-generator/named-array-destructuring-param-strict-body.js",
216 "language/expressions/async-generator/array-destructuring-param-strict-body.js",
257 "language/statements/async-generator/array-destructuring-param-strict-body.js",
[all …]
/arkcompiler/ets_runtime/ecmascript/tests/
Dweak_ref_old_gc_test.cpp69 JSHandle<TaggedArray> array = thread->GetEcmaVM()->GetFactory()->NewTaggedArray(2); in ArrayTestCreate() local
70 return *array; in ArrayTestCreate()
76 auto array = vm->GetFactory()->NewTaggedArray(2, JSTaggedValue::Undefined(), true); in HWTEST_F_L0() local
78 array->Set(thread, 0, newObj1.GetTaggedValue()); in HWTEST_F_L0()
83 array->Set(thread, 1, value); in HWTEST_F_L0()
84 EXPECT_EQ(newObj1.GetTaggedValue(), array->Get(0)); in HWTEST_F_L0()
85 EXPECT_EQ(value, array->Get(1)); in HWTEST_F_L0()
87 EXPECT_EQ(newObj1.GetTaggedValue(), array->Get(0)); in HWTEST_F_L0()
88 EXPECT_EQ(JSTaggedValue::Undefined(), array->Get(1)); in HWTEST_F_L0()
94 JSHandle<TaggedArray> array = ecmaVM->GetFactory()->NewTaggedArray(2); in HWTEST_F_L0() local
[all …]
Dweak_ref_semi_gc_test.cpp68 JSHandle<TaggedArray> array = thread->GetEcmaVM()->GetFactory()->NewTaggedArray(2); in ArrayTestCreate() local
69 return *array; in ArrayTestCreate()
75 JSHandle<TaggedArray> array = ecmaVM->GetFactory()->NewTaggedArray(2); in HWTEST_F_L0() local
76 EXPECT_TRUE(*array != nullptr); in HWTEST_F_L0()
78 array->Set(thread, 0, newObj1.GetTaggedValue()); in HWTEST_F_L0()
83 array->Set(thread, 1, value); in HWTEST_F_L0()
84 EXPECT_EQ(newObj1.GetTaggedValue(), array->Get(0)); in HWTEST_F_L0()
85 EXPECT_EQ(value, array->Get(1)); in HWTEST_F_L0()
87 EXPECT_EQ(newObj1.GetTaggedValue(), array->Get(0)); in HWTEST_F_L0()
88 EXPECT_EQ(JSTaggedValue::Undefined(), array->Get(1)); in HWTEST_F_L0()
[all …]
Djs_api_plain_array_test.cpp107 JSHandle<JSAPIPlainArray> array(thread, CreatePlainArray()); in HWTEST_F_L0() local
116 JSAPIPlainArray::Add(thread, array, key, value); in HWTEST_F_L0()
125 JSAPIPlainArray::Add(thread, array, key, value); in HWTEST_F_L0()
127 EXPECT_EQ(array->GetSize(), static_cast<int>(NODE_NUMBERS)); in HWTEST_F_L0()
136 JSTaggedValue gvalue = array->GetKeyAt(i); in HWTEST_F_L0()
139 EXPECT_EQ(array->GetKeyAt(-1), JSTaggedValue::Undefined()); in HWTEST_F_L0()
140 EXPECT_EQ(array->GetKeyAt(NODE_NUMBERS), JSTaggedValue::Undefined()); in HWTEST_F_L0()
142 array->Clear(thread); in HWTEST_F_L0()
143 EXPECT_EQ(array->GetSize(), 0); // 0 means the value in HWTEST_F_L0()
154 JSHandle<JSAPIPlainArray> array(thread, CreatePlainArray()); in HWTEST_F_L0() local
[all …]
/arkcompiler/runtime_core/tests/cts-generator/cts-template/
Dtest-schema.json34 "type": "array",
40 "type": "array",
46 "type": "array",
52 "type": "array",
65 "type": "array",
82 "type": "array",
97 "type": "array",
110 "type": "array",
128 "type": "array",
134 "type": "array",
[all …]
Dlda.const.yaml17 title: Create and initialize new constant array
19 … Create a new single-dimensional constant literal array and put a reference to it into register.
25 diagnostics on constant array definition error.
45 - values: ['.array arr1']
46 - values: ['.array arr1 i32']
47 - values: ['.array arr1 i32 4']
50 - values: ['.array arr1 i32 4 { }']
51 - values: ['.array arr1 i32 4 { 1 }']
52 - values: ['.array arr1 i32 4 { 1 2 3 4 5 }']
53 - values: ['.array arr1 i32 0 { }']
[all …]
Dcheckcast.yaml150 description: Check that null object reference can be cast to any array type
193 description: Check that null object reference can be cast to any array type
485 description: Check that any array can be cast to base type
489 …to T if T is a root type in type hierarchy or T is such array that O array elements are the same o…
490 T array elements.
523 description: Check that any array can be cast to base type
527 …to T if T is a root type in type hierarchy or T is such array that O array elements are the same o…
528 T array elements.
567 description: Check that any array can be cast to its type
571 …to T if T is a root type in type hierarchy or T is such array that O array elements are the same o…
[all …]
/arkcompiler/ets_frontend/ts2panda/src/
Dpandasm.ts41 public r: Array<number> | undefined; // resgs
42 public id: Array<string> | undefined; // ids
43 public im: Array<number> | undefined; // imms
49 regs: Array<number> | undefined = undefined,
50 ids: Array<string> | undefined = undefined,
51 imms: Array<number> | undefined = undefined,
68 public i: Array<Ins>; // ins
69 public l: Array<string> | undefined; // labels
70 public ca_tab: Array<CatchTable> | undefined; // catch tabels
71 public v: Array<VariableDebugInfo> | undefined; // variables
[all …]
/arkcompiler/runtime_core/runtime/include/coretypes/
Darray-inl.h20 #include "runtime/include/coretypes/array.h"
29 inline T Array::GetPrimitive(size_t offset) const in GetPrimitive()
35 inline void Array::SetPrimitive(size_t offset, T value) in SetPrimitive()
41 inline ObjectHeader *Array::GetObject(int offset) const in GetObject()
47 inline void Array::SetObject(size_t offset, ObjectHeader *value) in SetObject()
53 inline T Array::GetPrimitive(size_t offset, std::memory_order memory_order) const in GetPrimitive()
59 inline void Array::SetPrimitive(size_t offset, T value, std::memory_order memory_order) in SetPrimitive()
65 inline ObjectHeader *Array::GetObject(size_t offset, std::memory_order memory_order) const in GetObject()
71 inline void Array::SetObject(size_t offset, ObjectHeader *value, std::memory_order memory_order) in SetObject()
77 inline bool Array::CompareAndSetPrimitive(size_t offset, T old_value, T new_value, std::memory_orde… in CompareAndSetPrimitive()
[all …]
Darray.h48 class Array : public ObjectHeader {
52 static Array *Cast(ObjectHeader *object) in Cast()
55 return reinterpret_cast<Array *>(object); in Cast()
58 static Array *Create(panda::Class *array_class, const uint8_t *data, array_size_t length,
61 static Array *Create(panda::Class *array_class, array_size_t length,
64 static Array *Create(DynClass *dynarrayclass, array_size_t length,
67 … static Array *CreateTagged(const PandaVM *vm, panda::BaseClass *array_class, array_size_t length,
74 size_t size = sizeof(Array) + elem_size * length; in ComputeSize()
76 size_t size_limit = (std::numeric_limits<size_t>::max() - sizeof(Array)) / elem_size; in ComputeSize()
177 return MEMBER_OFFSET(Array, length_); in GetLengthOffset()
[all …]
/arkcompiler/toolchain/tooling/base/
Dpt_returns.cpp33 std::unique_ptr<PtJson> array = PtJson::CreateArray(); in ToJson() local
38 array->Push(location); in ToJson()
40 result->Add("locations", array); in ToJson()
63 std::unique_ptr<PtJson> array = PtJson::CreateArray(); in ToJson() local
68 array->Push(location); in ToJson()
70 result->Add("locations", array); in ToJson()
91 std::unique_ptr<PtJson> array = PtJson::CreateArray(); in ToJson() local
96 array->Push(location); in ToJson()
98 result->Add("callFrames", array); in ToJson()
107 std::unique_ptr<PtJson> array = PtJson::CreateArray(); in ToJson() local
[all …]
/arkcompiler/ets_runtime/ecmascript/ic/
Dproto_change_details.cpp20 …<ChangeListener> ChangeListener::Add(const JSThread *thread, const JSHandle<ChangeListener> &array, in Add() argument
24 if (!array->Full()) { in Add()
26 uint32_t arrayIndex = array->PushBack(thread, weakValue); in Add()
31 return array; in Add()
36 uint32_t holeIndex = CheckHole(array); in Add()
39 array->Set(thread, holeIndex, weakValue); in Add()
43 return array; in Add()
46 …JSHandle<WeakVector> newArray = WeakVector::Grow(thread, JSHandle<WeakVector>(array), array->GetCa… in Add()
56 uint32_t ChangeListener::CheckHole(const JSHandle<ChangeListener> &array) in CheckHole() argument
58 for (uint32_t i = 0; i < array->GetEnd(); i++) { in CheckHole()
[all …]
/arkcompiler/ets_runtime/ecmascript/ic/tests/
Dic_invoke_test.cpp57 JSHandle<TaggedArray> array = factory->NewTaggedArray(10); in HWTEST_F_L0() local
60 …thread, static_cast<ProfileTypeInfo *>(*array), slotId, func.GetTaggedValue(), JSTaggedValue(123)); in HWTEST_F_L0()
62 ASSERT_EQ(array->Get(thread, slotId), func.GetTaggedValue()); in HWTEST_F_L0()
63 ASSERT_EQ(array->Get(thread, slotId + 1), JSTaggedValue(123)); in HWTEST_F_L0()
86 JSHandle<TaggedArray> array = factory->NewTaggedArray(10); in HWTEST_F_L0() local
89 …thread, static_cast<ProfileTypeInfo *>(*array), slotId, 3, array1.GetTaggedValue(), array2.GetTagg… in HWTEST_F_L0()
91 JSTaggedValue slot = array->Get(thread, slotId); in HWTEST_F_L0()
100 ASSERT_EQ(array->Get(thread, slotId + 1), JSTaggedValue::Hole()); in HWTEST_F_L0()
107 JSHandle<TaggedArray> array = factory->NewTaggedArray(6); in HWTEST_F_L0() local
113 array->Set(thread, 0, func0.GetTaggedValue()); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_atomics_test.cpp64 JSTypedArray *CreateTypedArray(JSThread *thread, const JSHandle<TaggedArray> &array) in CreateTypedArray() argument
69 JSHandle<JSTaggedValue> jsarray(JSArray::CreateArrayFromList(thread, array)); in CreateTypedArray()
87 JSTypedArray *CreateTypedArray(JSThread *thread, const JSHandle<TaggedArray> &array, DataViewType t… in CreateTypedArray() argument
91 JSHandle<JSTaggedValue> jsarray(JSArray::CreateArrayFromList(thread, array)); in CreateTypedArray()
246 [[maybe_unused]] JSHandle<TaggedArray> array(factory->NewTaggedArray(3)); in HWTEST_F_L0() local
247 array->Set(thread, 0, JSTaggedValue(7)); in HWTEST_F_L0()
248 array->Set(thread, 1, JSTaggedValue(8)); in HWTEST_F_L0()
249 array->Set(thread, 2, JSTaggedValue(9)); in HWTEST_F_L0()
251 …JSHandle<JSTaggedValue> obj = JSHandle<JSTaggedValue>(thread, CreateTypedArray(thread, array, Data… in HWTEST_F_L0()
269 [[maybe_unused]] JSHandle<TaggedArray> array(factory->NewTaggedArray(10)); in HWTEST_F_L0() local
[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);
/arkcompiler/ets_runtime/ecmascript/ts_types/
Dlib_ark_builtins.d.ts69 declare class RegExpMatchArray extends Array {
484 declare class Array extends Object {
493 copyWithin(target: number, start: number, end?: number): Array;
497 every(predicate: (value: any, index: number, array: any[]) => unknown, thisArg?: any): boolean;
499 fill(value: any, start?: number, end?: number): Array;
501 filter(predicate: (value: any, index: number, array: any[]) => unknown, thisArg?: any): any[];
507 forEach(callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any): void;
517 map(callbackfn: (value: any, index: number, array: any[]) => any, thisArg?: any): any[];
523 …reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => …
525 …reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]…
[all …]
/arkcompiler/runtime_core/compiler/docs/
Davoid-calculating-start-of-array.md1 # Avoid re-calculating the address of array data for consequent array accesses
5 Since accessing an array element is done via an object and an element index,
6 the address of the actual array data has to be infered from the object address.
11 Having multiple access to the same array on a control flow path results in
20 Detect multiple array accesses to an array that belong to one basic block or
24 array acesses instead of object address. Replace the `{Store, Load}Array`
27 Do not process array accesses that are not inside a loop as optimizing
/arkcompiler/ets_runtime/ecmascript/base/tests/
Datomic_helper_test.cpp59 JSHandle<JSTypedArray> array = in HWTEST_F_L0() local
63 array->SetViewedArrayBuffer(thread, bufferVal); in HWTEST_F_L0()
64 JSHandle<JSTaggedValue> arrayVal = JSHandle<JSTaggedValue>::Cast(array); in HWTEST_F_L0()
79 JSHandle<JSTypedArray> array = in HWTEST_F_L0() local
83 array->SetViewedArrayBuffer(thread, bufferVal); in HWTEST_F_L0()
84 array->SetTypedArrayName(thread, globalConst->GetHandledInt8ArrayString()); // test int8 array in HWTEST_F_L0()
85 array->SetByteOffset(byteOffset); in HWTEST_F_L0()
86 array->SetArrayLength(arrayLength); in HWTEST_F_L0()
87 JSHandle<JSTaggedValue> arrayVal = JSHandle<JSTaggedValue>::Cast(array); in HWTEST_F_L0()
109 JSHandle<JSTypedArray> array = in HWTEST_F_L0() local
[all …]
/arkcompiler/ets_runtime/test/aottest/stobjbyindex/
Dstobjbyindex.ts18 // test array
19 var array = [100, "hello"];
20 print(array[0]);
21 print(array[1]);
22 array[0] = "helloworld";
23 array[1] = 200;
24 print(array[0]);
25 print(array[1]);
/arkcompiler/ets_runtime/test/aottest/stobjbyvalue/
Dstobjbyvalue.ts22 // test array
23 var array = [100, "hello"];
24 print(array[first]);
25 print(array[second]);
26 array[first] = "helloworld";
27 array[second] = 200;
28 print(array[first]);
29 print(array[second]);
/arkcompiler/runtime_core/runtime/tests/
Dstatic_analyzer_test.cpp25 #include "runtime/include/coretypes/array.h"
69 coretypes::Array *AllocStringArray(size_t length) in AllocStringArray()
76 return coretypes::Array::Create(klass, length, space_type); in AllocStringArray()
82 coretypes::Array *array = AllocStringArray(2); in TEST_F() local
83 ASSERT_NE(nullptr, array); in TEST_F()
86 array->Set(0U, expected); // SUPPRESS_CSA in TEST_F()
88 array->Set(1U, expected); in TEST_F()
92 …auto handler = [array, &count, expected](ObjectHeader *obj, ObjectHeader *ref, uint32_t offset, bo… in TEST_F()
94 EXPECT_EQ(array, obj); in TEST_F()
100 …GCStaticObjectHelpers::TraverseAllObjectsWithInfo(array, handler); // SUPPRESS_CSA(alpha.core.Was… in TEST_F()

12345678910>>...29