/arkcompiler/ets_frontend/es2panda/typescript/types/ |
D | unionType.cpp | 25 for (auto it = constituentTypes_.begin(); it != constituentTypes_.end(); it++) { in ToString() local 26 (*it)->ToString(ss); in ToString() 27 if (std::next(it) != constituentTypes_.end()) { in ToString() 60 for (auto *it : constituentTypes_) { in AssignmentSource() local 61 if (!relation->IsAssignableTo(it, target)) { in AssignmentSource() 72 for (auto *it : constituentTypes_) { in AssignmentTarget() local 73 if (relation->IsAssignableTo(source, it)) { in AssignmentTarget() 83 for (auto *it : constituentTypes_) { in GetTypeFacts() local 84 facts |= it->GetTypeFacts(); in GetTypeFacts() 95 auto it = compare + 1; in RemoveDuplicatedTypes() local [all …]
|
D | interfaceType.cpp | 34 for (auto it = typeParamTypes_.begin(); it != typeParamTypes_.end(); it++) { in ToString() local 35 (*it)->ToString(ss); in ToString() 37 if (std::next(it) != typeParamTypes_.end()) { in ToString() 137 for (auto *it : bases_) { in Instantiate() local 139 it->Instantiate(allocator, relation, globalTypes)->AsObjectType()); in Instantiate() 148 for (auto *it : desc_->callSignatures) { in CollectSignatures() local 149 collectedSignatures->push_back(it); in CollectSignatures() 152 for (auto *it : desc_->constructSignatures) { in CollectSignatures() local 153 collectedSignatures->push_back(it); in CollectSignatures() 157 for (auto *it : bases_) { in CollectSignatures() local [all …]
|
D | objectDescriptor.cpp | 26 for (auto *it : properties) { in FindProperty() local 27 if (it->Name() == name) { in FindProperty() 28 return it; in FindProperty() 39 for (auto *it : properties) { in Copy() local 40 auto *copiedProp = it->Copy(allocator, it->Declaration()); in Copy() 41 copiedProp->SetTsType(it->TsType()->Instantiate(allocator, relation, globalTypes)); in Copy() 45 for (auto *it : callSignatures) { in Copy() local 46 copiedDesc->callSignatures.push_back(it->Copy(allocator, relation, globalTypes)); in Copy() 49 for (auto *it : constructSignatures) { in Copy() local 50 copiedDesc->constructSignatures.push_back(it->Copy(allocator, relation, globalTypes)); in Copy()
|
D | objectLiteralType.cpp | 40 for (auto *it : desc_->callSignatures) { in ToString() local 41 it->ToString(ss, nullptr, true); in ToString() 45 for (auto *it : desc_->constructSignatures) { in ToString() local 47 it->ToString(ss, nullptr, true); in ToString() 51 for (auto *it : desc_->properties) { in ToString() local 52 if (it->HasFlag(binder::VariableFlags::READONLY)) { in ToString() 55 ss << it->Name(); in ToString() 57 if (it->HasFlag(binder::VariableFlags::OPTIONAL)) { in ToString() 60 if (it->HasFlag(binder::VariableFlags::PROPERTY)) { in ToString() 64 if (it->TsType()) { in ToString() [all …]
|
D | tupleType.cpp | 26 for (const auto *it : desc_->properties) { in ConvertToArrayType() local 27 unionTypes.push_back(it->TsType()); in ConvertToArrayType() 42 for (auto it = desc_->properties.begin(); it != desc_->properties.end(); it++) { in ToString() local 43 (*it)->TsType()->ToString(ss); in ToString() 44 if ((*it)->HasFlag(binder::VariableFlags::OPTIONAL)) { in ToString() 48 if (std::next(it) != desc_->properties.end()) { in ToString() 53 for (auto it = desc_->properties.begin(); it != desc_->properties.end(); it++) { in ToString() local 54 const util::StringView &memberName = FindNamedMemberName(*it); in ToString() 57 if ((*it)->HasFlag(binder::VariableFlags::OPTIONAL)) { in ToString() 62 (*it)->TsType()->ToString(ss); in ToString() [all …]
|
D | objectType.cpp | 39 for (auto it = targetSignatures->begin(); it != targetSignatures->end();) { in SignatureRelatedToSomeSignature() local 40 if (relation->IsIdenticalTo(sourceSignature, *it)) { in SignatureRelatedToSomeSignature() 41 targetSignatures->erase(it); in SignatureRelatedToSomeSignature() 45 it++; in SignatureRelatedToSomeSignature() 70 for (auto *it : desc_->properties) { in Identical() local 71 binder::LocalVariable *found = otherObj->Desc()->FindProperty(it->Name()); in Identical() 77 relation->IsIdenticalTo(it->TsType(), found->TsType()); in Identical() 83 if (it->Flags() != found->Flags()) { in Identical() 120 for (auto *it : targetProperties) { in AssignProperties() local 121 binder::LocalVariable *found = source->GetProperty(it->Name(), true); in AssignProperties() [all …]
|
/arkcompiler/ets_frontend/arkguard/test/ut/utils/ |
D | FileUtils.spec.ts | 16 import {describe, it} from 'mocha'; 22 it('Tester: <file not found> case for FileUtils#readFile', function () { 27 it('Tester: <read file content.> case for FileUtils#readFile', function () { 33 it('Tester: <read file as json.> case for FileUtils#readFileAsJson', function () { 39 it('Tester: <file not found.> case for FileUtils#readFileAsJson', function () { 45 it('Tester: <error json format.> case for FileUtils#readFileAsJson', function () { 52 it('Tester: <get file name with undefined input.> case for FileUtils#getFileName', function () { 60 it('Tester: <get relative file fullname.> case for FileUtils#getFileName', function () { 65 it('Tester: <get windows file fullname.> case for FileUtils#getFileName', function () { 70 it('Tester: <get single file fullname.> case for FileUtils#getFileName', function () { [all …]
|
D | ListUtil.spec.ts | 17 import {describe, it} from 'mocha'; 22 it('check init list input value bad', function () { 27 it('check init list input value zero', function () { 32 it('check init list input value NaN', function () { 37 it('check init list input value MAX_INIT_LEN', function () { 42 it('check init list input value bigger than MAX_INIT_LEN', function () { 47 it('check init list input normal value', function () { 57 it('check shuffle invalid list', function () { 64 it('check shuffle list', function () { 80 it('check unique merge two undefined list', function () { [all …]
|
/arkcompiler/ets_runtime/ecmascript/interpreter/ |
D | frame_handler.cpp | 43 FrameIterator it(sp_, thread_); in AdvanceToJSFrame() local 44 for (; !it.Done(); it.Advance()) { in AdvanceToJSFrame() 45 FrameType t = it.GetFrameType(); in AdvanceToJSFrame() 50 sp_ = it.GetSp(); in AdvanceToJSFrame() 56 FrameIterator it(sp_, thread_); in PrevJSFrame() local 57 it.Advance(); in PrevJSFrame() 58 sp_ = it.GetSp(); in PrevJSFrame() 62 FrameIterator it(sp_, thread_); in PrevJSFrame() local 63 FrameType t = it.GetFrameType(); in PrevJSFrame() 65 auto frame = it.GetFrame<AsmInterpretedFrame>(); in PrevJSFrame() [all …]
|
/arkcompiler/ets_frontend/es2panda/typescript/core/ |
D | typeElaborationContext.cpp | 34 for (auto it = potentialTypes_.begin(); it != potentialTypes_.end();) { in GetBestMatchingType() local 35 Type *currentType = checker_->GetPropertyTypeForIndexType(*it, indexType); in GetBestMatchingType() 38 it = potentialTypes_.erase(it); in GetBestMatchingType() 43 it = potentialTypes_.erase(it); in GetBestMatchingType() 45 it++; in GetBestMatchingType() 59 for (auto *it : sourceNode_->AsArrayExpression()->Elements()) { in Start() local 60 if (it->IsOmittedExpression()) { in Start() 70 … targetElementType = GetBestMatchingType(checker_->CreateStringLiteralType(memberIndex), it); in Start() 80 checker_->ElaborateElementwise(targetElementType, it, it->Start()); in Start() 91 for (auto *it : targetType_->AsUnionType()->ConstituentTypes()) { in RemoveUnnecessaryTypes() local [all …]
|
D | destructuringContext.cpp | 201 for (auto *it : inferedType_->AsUnionType()->ConstituentTypes()) { in ValidateInferedType() local 202 if (!it->IsArrayType() && (!it->IsObjectType() || !it->AsObjectType()->IsTupleType())) { in ValidateInferedType() 284 for (auto *it : inferedType->ConstituentTypes()) { in CreateArrayTypeForRest() local 285 if (it->IsArrayType()) { in CreateArrayTypeForRest() 286 unionTypes.push_back(it->AsArrayType()->ElementType()); in CreateArrayTypeForRest() 290 ASSERT(it->IsObjectType() && it->AsObjectType()->IsTupleType()); in CreateArrayTypeForRest() 291 Type *tupleElementType = GetTypeFromTupleByIndex(it->AsObjectType()->AsTupleType()); in CreateArrayTypeForRest() 296 tupleElementType = GetTypeFromTupleByIndex(it->AsObjectType()->AsTupleType()); in CreateArrayTypeForRest() 348 for (auto *it : inferedType_->AsUnionType()->ConstituentTypes()) { in GetRestType() local 349 if (it->IsArrayType()) { in GetRestType() [all …]
|
/arkcompiler/runtime_core/libpandabase/tests/ |
D | bit_vector_test.cpp | 147 for (auto it = vector.end() - 1;; --it) { in TestIteration() local 148 ASSERT_EQ(*it, index-- % 2); in TestIteration() 149 if (it == vector.begin()) { in TestIteration() 164 auto it = vector.begin(); in TestIteration() local 165 ASSERT_EQ(*it, false); in TestIteration() 166 ++it; in TestIteration() 167 ASSERT_EQ(*it, true); in TestIteration() 168 auto it1 = it++; in TestIteration() 169 ASSERT_EQ(*it, false); in TestIteration() 171 ASSERT_TRUE(it1 < it); in TestIteration() [all …]
|
/arkcompiler/runtime_core/bytecode_optimizer/ |
D | ir_interface.h | 38 auto it = maps_->methods.find(offset); in GetMethodIdByOffset() local 39 ASSERT(it != maps_->methods.cend()); in GetMethodIdByOffset() 41 return std::string(it->second); in GetMethodIdByOffset() 46 auto it = maps_->strings.find(offset); in GetStringIdByOffset() local 47 ASSERT(it != maps_->strings.cend()); in GetStringIdByOffset() 49 return std::string(it->second); in GetStringIdByOffset() 54 auto it = maps_->literalarrays.find(offset); in GetLiteralArrayByOffset() local 55 ASSERT(it != maps_->strings.cend()); in GetLiteralArrayByOffset() 57 return std::string(it->second); in GetLiteralArrayByOffset() 67 auto it = prog_->literalarray_table.find(id); in GetLiteralArrayIdByOffset() local [all …]
|
/arkcompiler/ets_frontend/es2panda/typescript/ |
D | checker.cpp | 55 for (const auto &it : list) { in ThrowTypeError() local 56 if (std::holds_alternative<char *>(it)) { in ThrowTypeError() 57 ss << std::get<char *>(it); in ThrowTypeError() 58 } else if (std::holds_alternative<util::StringView>(it)) { in ThrowTypeError() 59 ss << std::get<util::StringView>(it); in ThrowTypeError() 60 } else if (std::holds_alternative<lexer::TokenType>(it)) { in ThrowTypeError() 61 ss << TokenToString(std::get<lexer::TokenType>(it)); in ThrowTypeError() 62 } else if (std::holds_alternative<const Type *>(it)) { in ThrowTypeError() 63 std::get<const Type *>(it)->ToString(ss); in ThrowTypeError() 64 } else if (std::holds_alternative<AsSrc>(it)) { in ThrowTypeError() [all …]
|
/arkcompiler/ets_frontend/es2panda/ir/expressions/ |
D | arrayExpression.cpp | 35 for (auto *it : elements_) { in ConvertibleToArrayPattern() local 36 switch (it->Type()) { in ConvertibleToArrayPattern() 38 convResult = it->AsArrayExpression()->ConvertibleToArrayPattern(); in ConvertibleToArrayPattern() 42 if (!restFound && it == elements_.back() && !trailingComma_) { in ConvertibleToArrayPattern() 43 convResult = it->AsSpreadElement()->ConvertibleToRest(isDeclaration_); in ConvertibleToArrayPattern() 51 convResult = it->AsObjectExpression()->ConvertibleToObjectPattern(); in ConvertibleToArrayPattern() 55 convResult = it->AsAssignmentExpression()->ConvertibleToAssignmentPattern(); in ConvertibleToArrayPattern() 82 for (auto *it : elements_) { in ValidateExpression() local 83 switch (it->Type()) { in ValidateExpression() 85 info = it->AsObjectExpression()->ValidateExpression(); in ValidateExpression() [all …]
|
/arkcompiler/ets_runtime/ecmascript/compiler/ |
D | graph_visitor.cpp | 43 for (auto it = uses.begin(); it != uses.end();) { in ReplaceGate() local 44 if (acc_.GetMark(*it) == MarkCode::FINISHED) { in ReplaceGate() 45 PushChangedGate(*it); in ReplaceGate() 47 if (acc_.IsStateIn(it)) { in ReplaceGate() 49 it = acc_.ReplaceIn(it, state); in ReplaceGate() 50 } else if (acc_.IsDependIn(it)) { in ReplaceGate() 52 it = acc_.ReplaceIn(it, depend); in ReplaceGate() 54 it = acc_.ReplaceIn(it, replacement); in ReplaceGate() 141 for (auto it = uses.begin(); it != uses.end(); it++) { in VisitTopGate() local 142 if (acc_.GetMark(*it) == MarkCode::FINISHED) { in VisitTopGate() [all …]
|
D | loop_peeling.cpp | 55 for (auto it = use.begin(); it != use.end(); ++it) { in Peel() local 56 if (acc_.IsSelector(*it)) { in Peel() 57 GateRef backward = acc_.GetIn(*it, 2); // 2: index of depend or value back in Peel() 58 acc_.ReplaceIn(*it, 1, GetCopy(backward)); // 1: index of depend or value forward in Peel() 68 for (auto it = exitUse.begin(); it != exitUse.end();) { in Peel() local 69 if (acc_.GetOpCode(*it) == OpCode::LOOP_EXIT_DEPEND) { in Peel() 70 GateRef depend = *it; in Peel() 75 ++it; in Peel() 76 } else if (acc_.GetOpCode(*it) == OpCode::LOOP_EXIT_VALUE) { in Peel() 77 GateRef value = *it; in Peel() [all …]
|
/arkcompiler/ets_runtime/ecmascript/ |
D | js_for_in_iterator.cpp | 32 bool JSForInIterator::CheckObjProto(const JSThread *thread, const JSHandle<JSForInIterator> &it) in CheckObjProto() argument 35 JSHandle<JSTaggedValue> object(thread, it->GetObject()); in CheckObjProto() 52 void JSForInIterator::GetAllEnumKeys(JSThread *thread, const JSHandle<JSForInIterator> &it, in GetAllEnumKeys() argument 83 if (it->GetHasVisitObjs()) { in GetAllEnumKeys() 85 JSMutableHandle<TaggedQueue> visited(thread, it->GetVisitedObjs()); in GetAllEnumKeys() 104 it->SetRemainingKeys(thread, remained); in GetAllEnumKeys() 106 it->SetRemainingKeys(thread, remaining); in GetAllEnumKeys() 108 it->SetWasVisited(true); in GetAllEnumKeys() 112 …edValue, bool> JSForInIterator::NextInternal(JSThread *thread, const JSHandle<JSForInIterator> &it) in NextInternal() argument 115 JSHandle<JSTaggedValue> object(thread, it->GetObject()); in NextInternal() [all …]
|
/arkcompiler/ets_runtime/ecmascript/dfx/vmstat/ |
D | opt_code_profiler.cpp | 27 for (auto it = profMap_.begin(); it != profMap_.end(); it++) { in PrintAndReset() local 28 profVec.emplace_back(std::make_pair(it->first, it->second)); in PrintAndReset() 29 it->second.ResetStat(); in PrintAndReset() 52 for (auto it = profVec.begin(); it != profVec.end(); it++) { in PrintAndReset() local 53 Value val = it->second; in PrintAndReset() 58 …G_ECMA(INFO) << std::right << std::setw(nameRightAdjustment) << kungfu::GetEcmaOpcodeStr(it->first) in PrintAndReset()
|
/arkcompiler/runtime_core/compiler/optimizer/analysis/ |
D | rpo.h | 51 auto it = std::find(rpo_vector_.begin(), rpo_vector_.end(), rm_block); in RemoveBasicBlock() local 52 if (it != rpo_vector_.end()) { in RemoveBasicBlock() 53 rpo_vector_.erase(it); in RemoveBasicBlock() 60 auto it = std::find(rpo_vector_.begin(), rpo_vector_.end(), cur_block); in AddBasicBlockAfter() local 61 rpo_vector_.insert(it + 1, new_block); in AddBasicBlockAfter() 67 auto it = std::find(rpo_vector_.begin(), rpo_vector_.end(), cur_block); in AddBasicBlockBefore() local 68 rpo_vector_.insert(it, new_block); in AddBasicBlockBefore() 74 auto it = std::find(rpo_vector_.begin(), rpo_vector_.end(), cur_block); in AddVectorAfter() local 75 rpo_vector_.insert(it + 1, new_vector.begin(), new_vector.end()); in AddVectorAfter()
|
/arkcompiler/ets_frontend/es2panda/ir/statements/ |
D | blockStatement.cpp | 28 for (auto *it : statements_) { in Iterate() local 29 cb(it); in Iterate() 43 for (const auto *it : statements_) { in Compile() local 44 it->Compile(pg); in Compile() 47 for (const auto *it : statements_) { in Compile() local 48 it->Compile(pg); in Compile() 57 for (const auto *it : statements_) { in Check() local 58 it->Check(checker); in Check()
|
/arkcompiler/ets_runtime/ecmascript/compiler/aot_file/ |
D | aot_file_info.cpp | 58 auto it = std::upper_bound(s, t, target, cmp); in CalCallSiteInfo() local 59 --it; in CalCallSiteInfo() 60 ASSERT(it != t); in CalCallSiteInfo() 61 … ASSERT((it->codeAddr_ <= target.codeAddr_) && (target.codeAddr_ < it->codeAddr_ + it->funcSize_)); in CalCallSiteInfo() 62 delta = it->fpDeltaPrevFrameSp_; in CalCallSiteInfo() 64 for (uint32_t j = 0; j < it->calleeRegisterNum_; j++) { in CalCallSiteInfo() 65 DwarfRegType reg = static_cast<DwarfRegType>(it->CalleeReg2Offset_[2 * j]); in CalCallSiteInfo() 66 OffsetType offset = static_cast<OffsetType>(it->CalleeReg2Offset_[2 * j + 1]); in CalCallSiteInfo()
|
/arkcompiler/ets_runtime/ecmascript/dfx/hprof/ |
D | string_hashmap.cpp | 24 auto it = hashmap_.find(key); in FindOrInsertString() local 25 if (it != hashmap_.end()) { in FindOrInsertString() 26 return it->second; in FindOrInsertString() 40 auto it = indexMap_.find(GenerateStringKey(cstr)); in GetStringId() local 41 return it != indexMap_.end() ? it->second : 1; // "" in GetStringId() 46 auto it = hashmap_.find(key); in GetStringByKey() local 47 if (it != hashmap_.end()) { in GetStringByKey() 48 return FormatString(it->second); in GetStringByKey()
|
/arkcompiler/ets_runtime/ecmascript/platform/unix/ |
D | map.cpp | 48 void PageUnmap(MemMap it) in PageUnmap() argument 50 munmap(it.GetMem(), it.GetSize()); in PageUnmap() 60 void MachineCodePageUnmap(MemMap it) in MachineCodePageUnmap() argument 62 PageClearTag(it.GetMem(), it.GetSize()); in MachineCodePageUnmap() 63 PageProtect(it.GetMem(), it.GetSize(), PAGE_PROT_NONE); in MachineCodePageUnmap() 64 PageUnmap(it); in MachineCodePageUnmap()
|
/arkcompiler/runtime_core/assembler/ |
D | ide_helpers.h | 72 auto it = item_table.begin(); in JsonSerializeProgramItems() local 73 if (it != item_table.end()) { in JsonSerializeProgramItems() 74 ss << JsonSerializeItemBody(it->second); in JsonSerializeProgramItems() 75 ++it; in JsonSerializeProgramItems() 77 while (it != item_table.end()) { in JsonSerializeProgramItems() 78 ss << ", " << JsonSerializeItemBody(it->second); in JsonSerializeProgramItems() 79 ++it; in JsonSerializeProgramItems()
|