/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_runtime/ecmascript/compiler/ |
D | dead_code_elimination.cpp | 102 for (auto it = uses.begin(); it != uses.end(); it++) { in EliminateBranch() local 103 if (acc_.IsIfOrSwitchRelated(*it)) { in EliminateBranch() 104 ReplaceGate(*it, acc_.GetState(gate)); in EliminateBranch() 116 for (auto it = uses.begin(); it != uses.end(); it++) { in DecreaseAllSelectors() local 117 if (acc_.IsSelector(*it)) { in DecreaseAllSelectors() 118 acc_.DecreaseIn(*it, count + 1); in DecreaseAllSelectors() 145 for (auto it = uses.begin(); it != uses.end(); it++) { in EliminateMergeAndLoopBegin() local 146 if (acc_.IsSelector(*it)) { in EliminateMergeAndLoopBegin() 147 TryFindAndDeleteLoopExit(*it); in EliminateMergeAndLoopBegin() 148 auto selectorInput = acc_.GetIn(*it, 1); in EliminateMergeAndLoopBegin() [all …]
|
/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() 136 for (auto *it : bases_) { in Instantiate() local 138 it->Instantiate(allocator, relation, globalTypes)->AsObjectType()); in Instantiate() 147 for (auto *it : desc_->callSignatures) { in CollectSignatures() local 148 collectedSignatures->push_back(it); in CollectSignatures() 151 for (auto *it : desc_->constructSignatures) { in CollectSignatures() local 152 collectedSignatures->push_back(it); in CollectSignatures() 156 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 …]
|
/arkcompiler/ets_frontend/ets2panda/checker/types/ts/ |
D | unionType.cpp | 24 for (auto it = constituentTypes_.begin(); it != constituentTypes_.end(); it++) { in ToString() local 25 (*it)->ToString(ss); in ToString() 26 if (std::next(it) != constituentTypes_.end()) { in ToString() 59 for (auto *it : constituentTypes_) { in AssignmentSource() local 60 if (!relation->IsAssignableTo(it, target)) { in AssignmentSource() 71 for (auto *it : constituentTypes_) { in AssignmentTarget() local 72 if (relation->IsAssignableTo(source, it)) { in AssignmentTarget() 82 for (auto *it : constituentTypes_) { in GetTypeFacts() local 83 facts |= it->GetTypeFacts(); in GetTypeFacts() 94 auto it = compare + 1; in RemoveDuplicatedTypes() local [all …]
|
D | interfaceType.cpp | 33 for (auto it = typeParamTypes_.begin(); it != typeParamTypes_.end(); it++) { in ToString() local 34 (*it)->ToString(ss); in ToString() 36 if (std::next(it) != typeParamTypes_.end()) { in ToString() 136 for (auto *it : bases_) { in Instantiate() local 138 it->Instantiate(allocator, relation, globalTypes)->AsObjectType()); in Instantiate() 147 for (auto *it : desc_->callSignatures) { in CollectSignatures() local 148 collectedSignatures->push_back(it); in CollectSignatures() 151 for (auto *it : desc_->constructSignatures) { in CollectSignatures() local 152 collectedSignatures->push_back(it); in CollectSignatures() 156 for (auto *it : bases_) { in CollectSignatures() local [all …]
|
D | objectDescriptor.cpp | 25 for (auto *it : properties) { in FindProperty() local 26 if (it->Name() == name) { in FindProperty() 27 return it; in FindProperty() 38 for (auto *it : properties) { in Copy() local 39 auto *copiedProp = it->Copy(allocator, it->Declaration()); in Copy() 40 copiedProp->SetTsType(it->TsType()->Instantiate(allocator, relation, globalTypes)); in Copy() 44 for (auto *it : callSignatures) { in Copy() local 45 copiedDesc->callSignatures.push_back(it->Copy(allocator, relation, globalTypes)); in Copy() 48 for (auto *it : constructSignatures) { in Copy() local 49 copiedDesc->constructSignatures.push_back(it->Copy(allocator, relation, globalTypes)); in Copy()
|
D | objectLiteralType.cpp | 39 for (auto *it : desc_->callSignatures) { in ToString() local 40 it->ToString(ss, nullptr, true); in ToString() 44 for (auto *it : desc_->constructSignatures) { in ToString() local 46 it->ToString(ss, nullptr, true); in ToString() 50 for (auto *it : desc_->properties) { in ToString() local 51 if (it->HasFlag(varbinder::VariableFlags::READONLY)) { in ToString() 54 ss << it->Name(); in ToString() 56 if (it->HasFlag(varbinder::VariableFlags::OPTIONAL)) { in ToString() 59 if (it->HasFlag(varbinder::VariableFlags::PROPERTY)) { in ToString() 63 if (it->TsType() != nullptr) { in ToString() [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/debugger/ |
D | notification_manager.h | 61 for (auto it = listeners_.begin(); it != listeners_.end(); ++it) { in RemoveListener() local 62 if (*it == listener) { in RemoveListener() 63 listeners_.erase(it); in RemoveListener() 71 for (auto it: listeners_) { in LoadModuleEvent() local 72 it->LoadModule(name, entryPoint); in LoadModuleEvent() 80 for (auto it: listeners_) { in BytecodePcChangedEvent() local 81 it->BytecodePcChanged(thread, methodHandle, bcOffset); in BytecodePcChangedEvent() 88 for (auto it: listeners_) { in DebuggerStmtEvent() local 89 it->HandleDebuggerStmt(methodHandle, bcOffset); in DebuggerStmtEvent() 95 for (auto it: listeners_) { in NativeCallingEvent() local [all …]
|
/arkcompiler/ets_frontend/ets2panda/checker/ts/ |
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 …]
|
/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 …]
|
/arkcompiler/runtime_core/static_core/runtime/tooling/inspector/ |
D | inspector.cpp | 103 auto it = threads_.find(thread); in ConsoleCall() local 104 ASSERT(it != threads_.end()); in ConsoleCall() 106 …inspectorServer_.CallRuntimeConsoleApiCalled(thread, type, timestamp, it->second.OnConsoleCall(arg… in ConsoleCall() 114 auto it = threads_.find(thread); in Exception() local 115 ASSERT(it != threads_.end()); in Exception() 116 it->second.OnException(catchLocation.GetBytecodeOffset() == panda_file::INVALID_OFFSET); in Exception() 123 auto it = threads_.find(thread); in FramePop() local 124 ASSERT(it != threads_.end()); in FramePop() 125 it->second.OnFramePop(); in FramePop() 132 auto it = threads_.find(thread); in MethodEntry() local [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/toolchain/tooling/client/manager/ |
D | source_manager.cpp | 92 for (auto it = fileSource_.begin(); it != fileSource_.end(); it++) { in GetFileName() local 93 std::cout << "scriptID : " << it->first; in GetFileName() 94 std::cout << " fileName : " << it->second.first <<std::endl; in GetFileName() 108 auto it = fileSource_.find(scriptId); in SetFileSource() local 109 if (it != fileSource_.end() && it->second.second.empty()) { in SetFileSource() 114 it->second.second.push_back(line); in SetFileSource() 118 it->second.second.push_back(fileSource.substr(startPos)); in SetFileSource() 126 auto it = fileSource_.find(scriptId); in GetFileSource() local 127 if (it != fileSource_.end()) { in GetFileSource() 129 for (const std::string& value : it->second.second) { in GetFileSource() [all …]
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_phase/src/ |
D | maple_phase_manager.cpp | 49 auto it = analysisPhaseMemPool.find(AnalysisMemKey(phaseKey, pid)); in EraseAnalysisPhase() local 51 if (it != analysisPhaseMemPool.end() && itanother != availableAnalysisPhases.end()) { in EraseAnalysisPhase() 54 delete it->second; in EraseAnalysisPhase() 55 it->second = nullptr; in EraseAnalysisPhase() 64 for (auto it = availableAnalysisPhases.begin(); it != availableAnalysisPhases.end();) { in EraseAllAnalysisPhase() local 65 EraseAnalysisPhase(it); in EraseAllAnalysisPhase() 72 auto it = analysisPhaseMemPool.find(anaPhaseMapIt->first); in EraseAnalysisPhase() local 73 if (it != analysisPhaseMemPool.end()) { in EraseAnalysisPhase() 75 delete it->second; in EraseAnalysisPhase() 76 it->second = nullptr; in EraseAnalysisPhase() [all …]
|
/arkcompiler/runtime_core/static_core/libpandabase/tests/ |
D | bit_vector_test.cpp | 154 for (auto it = vector.end() - 1U;; --it) { in TestIteration() local 155 ASSERT_EQ(*it, index-- % 2U); in TestIteration() 156 if (it == vector.begin()) { in TestIteration() 171 auto it = vector.begin(); in TestIteration() local 172 ASSERT_EQ(*it, false); in TestIteration() 173 ++it; in TestIteration() 174 ASSERT_EQ(*it, true); in TestIteration() 175 auto it1 = it++; in TestIteration() 176 ASSERT_EQ(*it, false); in TestIteration() 178 ASSERT_TRUE(it1 < it); in TestIteration() [all …]
|
/arkcompiler/ets_frontend/ets2panda/ir/expressions/ |
D | objectExpression.cpp | 93 for (auto *it : properties_) { in ValidateExpression() local 94 switch (it->Type()) { in ValidateExpression() 97 return {"Unexpected token.", it->Start()}; in ValidateExpression() 100 info = it->AsSpreadElement()->ValidateExpression(); in ValidateExpression() 104 auto *prop = it->AsProperty(); in ValidateExpression() 136 for (auto *it : properties_) { in ConvertibleToObjectPattern() local 137 switch (it->Type()) { in ConvertibleToObjectPattern() 139 convResult = it->AsArrayExpression()->ConvertibleToArrayPattern(); in ConvertibleToObjectPattern() 143 if (!restFound && it == properties_.back() && !trailingComma_) { in ConvertibleToObjectPattern() 144 convResult = it->AsSpreadElement()->ConvertibleToRest(isDeclaration_, false); in ConvertibleToObjectPattern() [all …]
|
/arkcompiler/ets_runtime/ecmascript/ |
D | js_for_in_iterator.cpp | 77 JSTaggedValue JSForInIterator::NextInternal(JSThread *thread, const JSHandle<JSForInIterator> &it) in NextInternal() argument 79 uint32_t length = it->GetLength(); in NextInternal() 80 uint32_t index = it->GetIndex(); in NextInternal() 84 JSTaggedValue taggedKeys = it->GetKeys(); in NextInternal() 85 JSTaggedValue receiver = it->GetObject(); in NextInternal() 88 if (IsEnumCacheValid(receiver, it->GetCachedHclass(), kind)) { in NextInternal() 91 it->SetIndex(index); in NextInternal() 98 it->SetIndex(index); in NextInternal() 102 return NextInternalSlowpath(thread, it); in NextInternal() 105 …dValue JSForInIterator::NextInternalSlowpath(JSThread *thread, const JSHandle<JSForInIterator> &it) in NextInternalSlowpath() argument [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/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_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 …]
|