| /ark/ts2abc/test262/ |
| D | es2015_tests.txt | 1 built-ins/Array/S15.4.2.1_A1.1_T2.js 2 built-ins/Array/proto.js 3 built-ins/Array/proto-from-ctor-realm-zero.js 4 built-ins/Array/proto-from-ctor-realm-two.js 5 built-ins/Array/S15.4_A1.1_T9.js 6 built-ins/Array/length.js 7 built-ins/Array/S15.4.5.2_A3_T2.js 8 built-ins/Array/S15.4.5.1_A2.1_T1.js 9 built-ins/Array/S15.4.2.1_A2.1_T1.js 10 built-ins/Array/prop-desc.js [all …]
|
| D | CI_tests.txt | 1143 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 …]
|
| /ark/runtime_core/runtime/coretypes/ |
| D | array.cpp | 16 #include "runtime/include/coretypes/array.h" 28 static Array *AllocateArray(panda::BaseClass *array_class, size_t elem_size, array_size_t length, in AllocateArray() 31 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 …]
|
| /ark/js_runtime/ecmascript/tests/ |
| D | weak_ref_old_gc_test.cpp | 69 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 …]
|
| D | weak_ref_semi_gc_test.cpp | 68 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 …]
|
| D | js_iterator_test.cpp | 67 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0() local 68 EXPECT_TRUE(array->IsArray(thread)); in HWTEST_F_L0() 69 JSHandle<JSArrayIterator> iter(JSIterator::GetIterator(thread, array)); in HWTEST_F_L0() 81 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0() local 82 JSHandle<JSTaggedValue> iter(JSIterator::GetIterator(thread, array)); in HWTEST_F_L0() 94 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0() local 95 JSHandle<JSTaggedValue> iter(JSIterator::GetIterator(thread, array)); in HWTEST_F_L0() 112 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0() local 113 JSHandle<JSTaggedValue> iter(JSIterator::GetIterator(thread, array)); in HWTEST_F_L0() 125 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0() local [all …]
|
| /ark/runtime_core/tests/cts-generator/cts-template/ |
| D | test-schema.json | 34 "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 …]
|
| D | checkcast.yaml | 97 description: Check that null object reference can be cast to any array type 217 description: Check that any array can be cast to base type 221 …to T if T is a root type in type hierarchy or T is such array that O array elements are the same o… 222 T array elements. 251 description: Check that any array can be cast to its type 255 …to T if T is a root type in type hierarchy or T is such array that O array elements are the same o… 256 T array elements. 289 description: Check that any array can be cast to base type array 293 …to T if T is a root type in type hierarchy or T is such array that O array elements are the same o… 294 T array elements. [all …]
|
| /ark/ts2abc/ts2panda/src/ |
| D | pandasm.ts | 41 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 …]
|
| D | lexenv.ts | 65 abstract expand(pandaGen: PandaGen, compiler: Compiler): Array<IRNode>; 73 expand(pandaGen: PandaGen): Array<IRNode> { 81 private loadLocalVar(pandaGen: PandaGen): Array<IRNode> { 82 let insns: Array<IRNode> = new Array<IRNode>(); 103 private loadLexEnvVar(pandaGen: PandaGen): Array<IRNode> { 104 let insns: Array<IRNode> = new Array<IRNode>(); 133 expand(pandaGen: PandaGen): Array<IRNode> { 141 private storeLocalVar(pandaGen: PandaGen): Array<IRNode> { 142 let insns: Array<IRNode> = new Array<IRNode>(); 176 private storeLexEnvVar(pandaGen: PandaGen): Array<IRNode> { [all …]
|
| /ark/js_runtime/ecmascript/tooling/base/ |
| D | pt_returns.cpp | 33 std::unique_ptr<PtJson> array = PtJson::CreateArray(); in ToJson() local 37 array->Push(location); in ToJson() 39 result->Add("locations", array); in ToJson() 62 std::unique_ptr<PtJson> array = PtJson::CreateArray(); in ToJson() local 66 array->Push(location); in ToJson() 68 result->Add("locations", array); in ToJson() 89 std::unique_ptr<PtJson> array = PtJson::CreateArray(); in ToJson() local 93 array->Push(location); in ToJson() 95 result->Add("callFrames", array); in ToJson() 104 std::unique_ptr<PtJson> array = PtJson::CreateArray(); in ToJson() local [all …]
|
| /ark/runtime_core/isa/ |
| D | schema.json | 8 "type": "array", 23 "type": "array", 38 "type": "array", 53 "type": "array", 68 "type": "array", 83 "type": "array", 95 "type": "array", 101 "type": "array", 107 "type": "array", 122 "type": "array", [all …]
|
| /ark/js_runtime/ecmascript/ic/ |
| D | proto_change_details.cpp | 20 …<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 …]
|
| /ark/runtime_core/runtime/include/coretypes/ |
| D | array-inl.h | 21 #include "runtime/include/coretypes/array.h" 30 inline T Array::GetPrimitive(size_t offset) const in GetPrimitive() 37 inline void Array::SetPrimitive(size_t offset, T value) in SetPrimitive() 44 inline ObjectHeader *Array::GetObject(int offset) const in GetObject() 51 inline void Array::SetObject(size_t offset, ObjectHeader *value) in SetObject() 57 inline T Array::GetPrimitive(size_t offset, std::memory_order memory_order) const in GetPrimitive() 63 inline void Array::SetPrimitive(size_t offset, T value, std::memory_order memory_order) in SetPrimitive() 70 inline ObjectHeader *Array::GetObject(size_t offset, std::memory_order memory_order) const in GetObject() 77 inline void Array::SetObject(size_t offset, ObjectHeader *value, std::memory_order memory_order) in SetObject() 83 inline bool Array::CompareAndSetPrimitive(size_t offset, T old_value, T new_value, std::memory_orde… in CompareAndSetPrimitive() [all …]
|
| D | array.h | 49 class Array : public ObjectHeader { 53 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() 175 return MEMBER_OFFSET(Array, length_); in GetLengthOffset() [all …]
|
| /ark/ts2abc/ts2panda/src/base/ |
| D | typeSystem.ts | 46 ARRAY, enumerator 120 anonymousRedirect: Array<string> = new Array<string>(); 126 public setInfo(userDefinedClassNum: number, anonymousRedirect: Array<string>) { 134 let summaryLiterals: Array<Literal> = new Array<Literal>(); 149 implementsHeritages: Array<number> = new Array<number>(); 150 // fileds Array: [typeIndex] [public -> 0, private -> 1, protected -> 2] [readonly -> 1] 151 staticFields: Map<string, Array<number>> = new Map<string, Array<number>>(); 153 fields: Map<string, Array<number>> = new Map<string, Array<number>>(); 206 … let fieldInfo = Array<number>(PrimitiveType.ANY, AccessFlag.PUBLIC, ModifierReadonly.NONREADONLY); 256 // Then, get the typeIndex and fill in the methods array [all …]
|
| /ark/js_runtime/ecmascript/compiler/ |
| D | stub_descriptor.cpp | 37 std::array<StubMachineType, 2> params = { in CALL_STUB_INIT_DESCRIPTOR() 50 std::array<StubMachineType, 2> params = { in CALL_STUB_INIT_DESCRIPTOR() 63 std::array<StubMachineType, 2> params = { in CALL_STUB_INIT_DESCRIPTOR() 77 std::array<StubMachineType, 3> params = { in CALL_STUB_INIT_DESCRIPTOR() 94 std::array<StubMachineType, 2> params = { in CALL_STUB_INIT_DESCRIPTOR() 108 std::array<StubMachineType, 3> params = { in CALL_STUB_INIT_DESCRIPTOR() 122 std::array<StubMachineType, 2> params = { in CALL_STUB_INIT_DESCRIPTOR() 135 std::array<StubMachineType, 2> params = { in CALL_STUB_INIT_DESCRIPTOR() 149 std::array<StubMachineType, 4> params = { // 4 : 4 input parameters in CALL_STUB_INIT_DESCRIPTOR() 163 std::array<StubMachineType, 4> params = { // 4 : 4 input parameters in CALL_STUB_INIT_DESCRIPTOR() [all …]
|
| /ark/runtime_core/runtime/tests/ |
| D | frame_allocator_test.cpp | 16 #include <array> 99 std::array<void *, ITERATIONS + 1> array {nullptr}; in TEST_F() local 101 array[i] = alloc.Alloc(FRAME_SIZE); in TEST_F() 102 ASSERT_NE(array[i], nullptr); in TEST_F() 103 *(static_cast<uint64_t *>(array[i])) = i; in TEST_F() 106 ASSERT_EQ(*(static_cast<uint64_t *>(array[i])), i); in TEST_F() 107 alloc.Free(array[i]); in TEST_F() 115 std::array<void *, MAX_SIZE + 1> array {nullptr}; in AlignmentTest() local 117 array[i] = alloc.Alloc(i * GetAlignmentInBytes(alignment)); in AlignmentTest() 118 if (array[i] == nullptr) { in AlignmentTest() [all …]
|
| D | array_test.cpp | 20 #include "runtime/include/coretypes/array.h" 50 return sizeof(Array) + klass->GetComponentSize() * n; in GetArrayObjectSize() 61 Array *array = Array::Create(klass, n); in TestArrayObjectSize() local 62 ASSERT_NE(array, nullptr) << msg; in TestArrayObjectSize() 64 ASSERT_EQ(array->ObjectSize(), GetArrayObjectSize(klass, n)) << msg; in TestArrayObjectSize()
|
| /ark/js_runtime/ecmascript/ |
| D | js_array.cpp | 70 THROW_RANGE_ERROR_AND_RETURN(thread, "array length must less than 2^32 - 1", exception); in ArrayCreate() 129 // If SameValue(C, realmC.[[intrinsics]].[[%Array%]]) is true, let C be undefined. in ArraySpeciesCreate() 164 // NOTEIf originalArray was created using the standard built-in Array constructor for in ArraySpeciesCreate() 165 // a Realm that is not the Realm of the running execution context, then a new Array is in ArraySpeciesCreate() 167 // with Web browsers that have historically had that behaviour for the Array.prototype methods in ArraySpeciesCreate() 172 void JSArray::SetCapacity(JSThread *thread, const JSHandle<JSObject> &array, uint32_t oldLen, uint3… in SetCapacity() argument 174 TaggedArray *element = TaggedArray::Cast(array->GetElements().GetTaggedObject()); in SetCapacity() 178 int32_t numOfElements = array->GetNumberOfElements(); in SetCapacity() 183 GetAllElementKeys(thread, array, 0, newArr); in SetCapacity() 194 array->SetElements(thread, newDict); in SetCapacity() [all …]
|
| D | runtime_call_id.h | 232 V(Array, Constructor) \ 233 V(Array, From) \ 234 V(Array, Of) \ 235 V(Array, IsArray) \ 236 V(Array, Entries) \ 237 V(Array, Species) \ 238 V(Array, Concat) \ 239 V(Array, CopyWithin) \ 240 V(Array, Fill) \ 241 V(Array, Filter) \ [all …]
|
| /ark/runtime_core/tests/cts-assembly/ |
| D | arrays-02.pa | 17 # - title: Store to array 19 # Store accumulator content into array slot pointed by index. 26 # - title: Load from array 28 # Load an element from array using accumulator as an index and puts it into accumulator. 36 #assert that operations with array of i32 works fine 38 #for(i=0; i<5; i++) array[i]=i; 39 #for(i=4; i>=0; i--) assert_eq(i, array[i]);
|
| D | arrays-04.pa | 17 # - title: Load from array 19 # Load an element from array using accumulator as an index and puts it into accumulator. 27 # - title: Store to array 29 # Store accumulator content into array slot pointed by index. 38 #assert that operations with array of f32 works fine 40 #for(i=0; i<7; i++) array[i]=(float)i; 41 #for(i=6; i>=0; i--) assert_eq((float)i, array[i]);
|
| D | arrays-03.pa | 17 # - title: Load from array 19 # Load an element from array using accumulator as an index and puts it into accumulator. 27 # - title: Store to array 29 # Store accumulator content into array slot pointed by index. 38 #assert that operations with array of f64 works fine 40 #for(i=0; i<7; i++) array[i]=(double)i; 41 #for(i=6; i>=0; i--) assert_eq((double)i, array[i]);
|
| /ark/ts2abc/ts2panda/tests/types/ |
| D | array.test.ts | 29 describe("array tests in array.test.ts", function() { 30 it("test array with primitives", function() { 31 let fileNames = 'tests/types/array/array_primitives.ts'; 75 it("test array with class", function() { 76 let fileNames = 'tests/types/array/array_class.ts'; 108 it("test array with multi same primitive", function() { 109 let fileNames = 'tests/types/array/array_multi_same_primi.ts'; 159 it("test array with multi same class", function() { 160 let fileNames = 'tests/types/array/array_multi_same_class.ts'; 193 it("test array with union", function() { [all …]
|