Home
last modified time | relevance | path

Searched refs:arrayType (Results 1 – 25 of 52) sorted by relevance

123

/arkcompiler/ets_runtime/ecmascript/base/
Dtyped_array_helper.h33 const DataViewType arrayType);
37 const DataViewType arrayType);
41 const DataViewType arrayType);
55 const DataViewType arrayType);
57 const DataViewType arrayType);
59 JSThread *thread, const JSHandle<JSTypedArray> &obj, const DataViewType arrayType);
61 JSThread *thread, const JSHandle<JSTypedArray> &obj, const DataViewType arrayType);
62 inline static uint32_t GetSizeFromType(const DataViewType arrayType);
80 const DataViewType arrayType);
82 const DataViewType arrayType);
[all …]
Dtyped_array_helper-inl.h159 …SFunction> TypedArrayHelper::GetConstructorFromType(JSThread *thread, const DataViewType arrayType) in GetConstructorFromType() argument
162 switch (arrayType) { in GetConstructorFromType()
189 …Value> TypedArrayHelper::GetConstructorNameFromType(JSThread *thread, const DataViewType arrayType) in GetConstructorNameFromType() argument
192 switch (arrayType) { in GetConstructorNameFromType()
220 JSThread *thread, const JSHandle<JSTypedArray> &obj, const DataViewType arrayType) in GetOnHeapHclassFromType() argument
224 switch (arrayType) { in GetOnHeapHclassFromType()
252 JSThread *thread, const JSHandle<JSTypedArray> &obj, const DataViewType arrayType) in GetNotOnHeapHclassFromType() argument
256 switch (arrayType) { in GetNotOnHeapHclassFromType()
283 uint32_t TypedArrayHelper::GetSizeFromType(const DataViewType arrayType) in GetSizeFromType() argument
285 if (arrayType == DataViewType::INT8 || in GetSizeFromType()
[all …]
Dtyped_array_helper.cpp44 const DataViewType arrayType) in TypedArrayConstructor() argument
68 elementLength, arrayType); in TypedArrayConstructor()
73 …SObject> obj = TypedArrayHelper::AllocateTypedArray(thread, constructorName, newTarget, arrayType); in TypedArrayConstructor()
76 return TypedArrayHelper::CreateFromTypedArray(argv, obj, arrayType); in TypedArrayConstructor()
79 return TypedArrayHelper::CreateFromArrayBuffer(argv, obj, arrayType); in TypedArrayConstructor()
82 return TypedArrayHelper::FastCopyElementFromArray(argv, obj, arrayType); in TypedArrayConstructor()
84 return TypedArrayHelper::CreateFromOrdinaryObject(argv, obj, arrayType); in TypedArrayConstructor()
88 const DataViewType arrayType) in FastCopyElementFromArray() argument
98 TypedArrayHelper::CreateFromOrdinaryObject(argv, obj, arrayType); in FastCopyElementFromArray()
102 TypedArrayHelper::AllocateTypedArrayBuffer(thread, obj, len, arrayType); in FastCopyElementFromArray()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/utils/
Dtest_core_type_array_type.j221 let arrayType : ArrayType;
28 arrayType = Type.of(arrayVar) as ArrayType;
29 testResult = checkTestResult(arrayType.getElementType(), Type.of({{.item.init_value}}));
32 obj = arrayType.make({{.array_size}}) as {{.item.name}}[];
/arkcompiler/ets_frontend/ets2panda/checker/ets/
DtypeCreation.cpp124 auto *arrayType = Allocator()->New<ETSArrayType>(elementType); in CreateETSArrayType() local
125 auto it = arrayTypes_.insert({elementType, arrayType}); in CreateETSArrayType()
127 CreateBuiltinArraySignature(arrayType, arrayType->Rank()); in CreateETSArrayType()
130 return arrayType; in CreateETSArrayType()
530 …::StringView, SignatureInfo *> ETSChecker::CreateBuiltinArraySignatureInfo(ETSArrayType *arrayType, in CreateBuiltinArraySignatureInfo() argument
534 arrayType->ToAssemblerTypeWithRank(ss); in CreateBuiltinArraySignatureInfo()
536 arrayType->ToAssemblerTypeWithRank(ss); in CreateBuiltinArraySignatureInfo()
559 Signature *ETSChecker::CreateBuiltinArraySignature(ETSArrayType *arrayType, size_t dim) in CreateBuiltinArraySignature() argument
561 auto res = globalArraySignatures_.find(arrayType); in CreateBuiltinArraySignature()
566 auto [internalName, info] = CreateBuiltinArraySignatureInfo(arrayType, dim); in CreateBuiltinArraySignature()
[all …]
/arkcompiler/runtime_core/static_core/bytecode_optimizer/
Dconst_array_resolver.cpp161 auto arrayType = pandasm::Type::FromName(irInterface_->GetTypeIdByOffset(inst->GetTypeId())); in IsMultidimensionalArray() local
162 return arrayType.GetRank() > SINGLE_DIM_ARRAY_RANK; in IsMultidimensionalArray()
321 auto arrayType = in FillLiteral() local
323 auto componentType = arrayType.GetComponentType(); in FillLiteral()
324 auto componentTypeName = arrayType.GetComponentName(); in FillLiteral()
/arkcompiler/ets_frontend/ets2panda/ir/ets/
DetsTuple.cpp171 auto *const arrayType = spreadType_->GetType(checker); in GetType() local
172 ASSERT(arrayType->IsETSArrayType()); in GetType()
173 spreadType_->SetTsType(arrayType->AsETSArrayType()->ElementType()); in GetType()
/arkcompiler/ets_frontend/merge_abc/src/
DassemblyProgramProto.cpp88 auto &arrayType = Type::Deserialize(protoArrayType, allocator); in Deserialize() local
89 program.array_types.insert(std::move(arrayType)); in Deserialize()
/arkcompiler/ets_frontend/ets2panda/checker/types/ts/
DtupleType.cpp29 Type *arrayType = checker->CreateUnionType(std::move(unionTypes)); in ConvertToArrayType() local
30 return checker->Allocator()->New<ArrayType>(arrayType); in ConvertToArrayType()
/arkcompiler/ets_frontend/es2panda/typescript/types/
DtupleType.cpp30 Type *arrayType = checker->CreateUnionType(std::move(unionTypes)); in ConvertToArrayType() local
31 return checker->Allocator()->New<ArrayType>(arrayType); in ConvertToArrayType()
/arkcompiler/runtime_core/static_core/compiler/tests/
Dloop_idioms_test.cpp24 … bool CheckFillArrayFull(DataType::Type arrayType, RuntimeInterface::IntrinsicId expectedIntrinsic) in CheckFillArrayFull() argument
31 PARAMETER(1U, 1U).type(arrayType); in CheckFillArrayFull()
47 INST(10U, Opcode::StoreArray).type(arrayType).Inputs(5U, 9U, 1U); in CheckFillArrayFull()
70 PARAMETER(1U, 1U).type(arrayType); in CheckFillArrayFull()
94 INST(10U, Opcode::StoreArray).type(arrayType).Inputs(5U, 9U, 1U); in CheckFillArrayFull()
104 ….Inputs({{DataType::REFERENCE, 5U}, {arrayType, 1U}, {DataType::INT32, 2U}, {DataType::INT32, 6U}}) in CheckFillArrayFull()
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_ir/src/
Dmir_lower.cpp710 … MIRType &arrayType = *GlobalTables::GetTypeTable().GetTypeFromTyIdx(TyIdx(array->GetPrimType())); in LowerFarray() local
724 …MIRIntConst *eleConst = GlobalTables::GetIntConstTable().GetOrCreateIntConst(eleOffset, arrayType); in LowerFarray()
759 MIRArrayType *arrayType = static_cast<MIRArrayType *>(aType); in LowerCArray() local
769 uint64 dim = arrayType->GetDim(); in LowerCArray()
774 innerType = GlobalTables::GetTypeTable().GetTypeFromTyIdx(arrayType->GetElemTyIdx()); in LowerCArray()
779 …elemSize = RoundUp(innerArrayType->GetElemType()->GetSize(), arrayType->GetElemType()->GetAlign()); in LowerCArray()
787 MIRArrayType *curArrayType = arrayType; in LowerCArray()
794 CHECK_FATAL(arrayType->GetSizeArrayItem(0) > 0, "Zero size array dimension"); in LowerCArray()
803 … CHECK_FATAL(arrayType->GetSizeArrayItem(static_cast<uint32>(i)) > 0, "Zero size array dimension"); in LowerCArray()
805 mpyDim *= arrayType->GetSizeArrayItem(static_cast<uint32>(j)); in LowerCArray()
[all …]
Dparser.cpp329 MIRArrayType arrayType(tyIdx, vec); in ParseArrayType() local
330 if (!ParseTypeAttrs(arrayType.GetTypeAttrs())) { in ParseArrayType()
334 arrayTyIdx = GlobalTables::GetTypeTable().GetOrCreateMIRType(&arrayType); in ParseArrayType()
1537 MIRArrayType *arrayType = static_cast<MIRArrayType *>(type); in FixForwardReferencedTypeForOneAgg() local
1538 std::map<TyIdx, TyIdx>::iterator it = typeDefIdxMap.find(arrayType->GetElemTyIdx()); in FixForwardReferencedTypeForOneAgg()
1540 arrayType->SetElemTyIdx(it->second); in FixForwardReferencedTypeForOneAgg()
1543 MIRFarrayType *arrayType = static_cast<MIRFarrayType *>(type); in FixForwardReferencedTypeForOneAgg() local
1544 std::map<TyIdx, TyIdx>::iterator it = typeDefIdxMap.find(arrayType->GetElemTyIdx()); in FixForwardReferencedTypeForOneAgg()
1546 arrayType->SetElemtTyIdx(it->second); in FixForwardReferencedTypeForOneAgg()
2234 auto &arrayType = static_cast<MIRArrayType &>(type); in ParseInitValue() local
[all …]
Dglobal_tables.cpp231 MIRArrayType arrayType(elem.GetTypeIndex(), sizeVector); in GetOrCreateArrayType() local
232 arrayType.SetTypeAttrs(attrs); in GetOrCreateArrayType()
233 TyIdx tyIdx = GetOrCreateMIRType(&arrayType); in GetOrCreateArrayType()
Dmir_builder.cpp824 ArrayNode *MIRBuilder::CreateExprArray(const MIRType &arrayType) in CreateExprArray() argument
826 MIRType *addrType = GlobalTables::GetTypeTable().GetOrCreatePointerType(arrayType); in CreateExprArray()
834 ArrayNode *MIRBuilder::CreateExprArray(const MIRType &arrayType, BaseNode *op) in CreateExprArray() argument
836 ArrayNode *arrayNode = CreateExprArray(arrayType); in CreateExprArray()
842 ArrayNode *MIRBuilder::CreateExprArray(const MIRType &arrayType, BaseNode *op1, BaseNode *op2) in CreateExprArray() argument
844 ArrayNode *arrayNode = CreateExprArray(arrayType, op1); in CreateExprArray()
850 ArrayNode *MIRBuilder::CreateExprArray(const MIRType &arrayType, std::vector<BaseNode *> ops) in CreateExprArray() argument
852 MIRType *addrType = GlobalTables::GetTypeTable().GetOrCreatePointerType(arrayType); in CreateExprArray()
Dmir_type.cpp2538 MIRType *GetElemType(const MIRType &arrayType) in GetElemType() argument
2540 if (arrayType.GetKind() == kTypeArray) { in GetElemType()
2541 return static_cast<const MIRArrayType &>(arrayType).GetElemType(); in GetElemType()
2542 } else if (arrayType.GetKind() == kTypeFArray) { in GetElemType()
2543 return static_cast<const MIRFarrayType &>(arrayType).GetElemType(); in GetElemType()
2544 } else if (arrayType.GetKind() == kTypeJArray) { in GetElemType()
2545 return static_cast<const MIRJarrayType &>(arrayType).GetElemType(); in GetElemType()
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/src/be/
Dbecommon.cpp313 MIRArrayType &arrayType = static_cast<MIRArrayType &>(ty); in ComputeArrayTypeSizesAligns() local
314 MIRType *elemType = GlobalTables::GetTypeTable().GetTypeFromTyIdx(arrayType.GetElemTyIdx()); in ComputeArrayTypeSizesAligns()
324 uint32 arrayAlign = arrayType.GetTypeAttrs().GetAlign(); in ComputeArrayTypeSizesAligns()
329 for (int d = 0; d < arrayType.GetDim(); ++d) { in ComputeArrayTypeSizesAligns()
330 numElems *= arrayType.GetSizeArrayItem(d); in ComputeArrayTypeSizesAligns()
344 MIRFarrayType &arrayType = static_cast<MIRFarrayType &>(ty); in ComputeFArrayOrJArrayTypeSizesAligns() local
345 MIRType *elemType = GlobalTables::GetTypeTable().GetTypeFromTyIdx(arrayType.GetElemTyIdx()); in ComputeFArrayOrJArrayTypeSizesAligns()
Dlower.cpp422 MIRType &arrayType = *GlobalTables::GetTypeTable().GetTypeFromTyIdx(TyIdx(array.GetPrimType())); in LowerFarray() local
440 …MIRIntConst *eleConst = GlobalTables::GetIntConstTable().GetOrCreateIntConst(eleOffset, arrayType); in LowerFarray()
458 …MIRIntConst *eConst = GlobalTables::GetIntConstTable().GetOrCreateIntConst(idx * eSize, arrayType); in LowerFarray()
463 … GlobalTables::GetIntConstTable().GetOrCreateIntConst(static_cast<int64>(eSize), arrayType); in LowerFarray()
477 RTSupport::GetRTSupportInstance().GetArrayContentOffset(), arrayType); in LowerFarray()
500 MIRArrayType *arrayType = static_cast<MIRArrayType *>(aType); in LowerArrayDim() local
509 offsetSize *= arrayType->GetSizeArrayItem(static_cast<uint32>(j)); in LowerArrayDim()
570 MIRArrayType *arrayType = static_cast<MIRArrayType *>(aType); in LowerArray() local
571 int32 dim = arrayType->GetDim(); in LowerArray()
574 size_t eSize = beCommon.GetTypeSize(arrayType->GetElemTyIdx().GetIdx()); in LowerArray()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/mpl2mpl/src/
Dsimplify.cpp1128 auto *arrayType = static_cast<MIRArrayType *>(memType); in ExpandMemset() local
1129 if (arrayType->GetDim() != 1 || (arrayType->GetElemType()->GetKind() != kTypeScalar && in ExpandMemset()
1130 arrayType->GetElemType()->GetKind() != kTypePointer)) { in ExpandMemset()
1134 MIRType *elemType = arrayType->GetElemType(); in ExpandMemset()
1140 uint64 elemCnt = static_cast<uint64>(arrayType->GetSizeArrayItem(0)); in ExpandMemset()
1147 auto *arrayExpr = mirBuilder->CreateExprArray(*arrayType, addrExpr, indexExpr); in ExpandMemset()
1352 auto *arrayType = static_cast<MIRArrayType *>(memType); in ExpandMemcpy() local
1353 if (arrayType->GetDim() != 1 || (arrayType->GetElemType()->GetKind() != kTypeScalar && in ExpandMemcpy()
1354 arrayType->GetElemType()->GetKind() != kTypePointer)) { in ExpandMemcpy()
1358 MIRType *elemType = arrayType->GetElemType(); in ExpandMemcpy()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_ir/include/
Dmir_builder.h244 ArrayNode *CreateExprArray(const MIRType &arrayType);
245 ArrayNode *CreateExprArray(const MIRType &arrayType, BaseNode *op);
246 ArrayNode *CreateExprArray(const MIRType &arrayType, BaseNode *op1, BaseNode *op2);
247 ArrayNode *CreateExprArray(const MIRType &arrayType, std::vector<BaseNode *> ops);
/arkcompiler/ets_frontend/ets2panda/compiler/core/
DETSemitter.h75 void GenGlobalArrayRecord(checker::ETSArrayType *arrayType, checker::Signature *signature);
DETSemitter.cpp377 void ETSEmitter::GenGlobalArrayRecord(checker::ETSArrayType *arrayType, checker::Signature *signatu… in GenGlobalArrayRecord() argument
380 arrayType->ToAssemblerTypeWithRank(ss); in GenGlobalArrayRecord()
393 arrayType->ElementType()->ToAssemblerType(ss2); in GenGlobalArrayRecord()
394 panda::pandasm::Type atypePa(ss2.str(), arrayType->Rank()); in GenGlobalArrayRecord()
/arkcompiler/ets_runtime/ecmascript/ts_types/
Dts_type_parser.cpp244 … JSHandle<TSArrayType> arrayType = ParseArrayType(jsPandaFile, recordName, typeLiteralExtractor); in ParseNonImportType() local
245 return JSHandle<JSTaggedValue>(arrayType); in ParseNonImportType()
414 JSHandle<TSArrayType> arrayType = factory_->NewTSArrayType(); in ParseArrayType() local
420 arrayType->SetElementGT(elemetnGT); in ParseArrayType()
421 return arrayType; in ParseArrayType()
684 JSHandle<TSArrayType> arrayType(genericsType); in InstantiateGenericsType() local
685 arrayType->SetElementGT(paras[0]); in InstantiateGenericsType()
686 return JSHandle<JSTaggedValue>(arrayType); in InstantiateGenericsType()
/arkcompiler/ets_runtime/ecmascript/ts_types/tests/
Dts_type_parser_test.cpp354 JSHandle<TSArrayType> arrayType(type); in HWTEST_F_L0() local
355 EXPECT_EQ(resultGT, arrayType->GetGT()); in HWTEST_F_L0()
356 …EXPECT_EQ(arrayType->GetElementGT(), GlobalTSTypeRef(static_cast<uint32_t>(ModuleTableIdx::PRIMITI… in HWTEST_F_L0()
/arkcompiler/ets_frontend/ts2panda/src/
DtypeChecker.ts240 let arrayType = new ArrayType(typeNode);
241 return arrayType.shiftedTypeIndex;

123