diff --git a/src/bin/jbc2mpl b/src/bin/jbc2mpl index 596797e42164357831497ebfc1b0f5986f239612..c604fc2d7102b6abca60af6e85b59e917d920c7d 100755 Binary files a/src/bin/jbc2mpl and b/src/bin/jbc2mpl differ diff --git a/src/bin/maple b/src/bin/maple index fac7f78d602a237ec545d117e8a640c83773e7f6..f6920f5c88f54a1397ae7362fc1dee90c442a3f5 100755 Binary files a/src/bin/maple and b/src/bin/maple differ diff --git a/src/maple_driver/src/mpl_options.cpp b/src/maple_driver/src/mpl_options.cpp index a1082cac4f6e574e9afdff143795709a86ecbd49..1b9dbe0ba7de761d32a938527e4989319eddc189 100644 --- a/src/maple_driver/src/mpl_options.cpp +++ b/src/maple_driver/src/mpl_options.cpp @@ -27,7 +27,7 @@ namespace { using namespace maple; -const mapleOption::Descriptor USAGES[] = { +const mapleOption::Descriptor usages[] = { // index, type , shortOption , longOption, connector, isCanAppend, delimiter, enableBuildType, checkPolicy, help, // extra { kUnknown, @@ -980,7 +980,7 @@ using namespace mapleOption; const std::string kMapleDriverVersion = "MapleDriver " + std::to_string(Version::kMajorMplVersion) + "." + std::to_string(Version::kMinorCompilerVersion) + " 20190929"; int MplOptions::Parse(int argc, char **argv) { - optionParser.reset(new OptionParser(USAGES)); + optionParser.reset(new OptionParser(usages)); exeFolder = FileUtils::GetFileFolder(*argv); int ret = optionParser->Parse(argc, argv); if (ret != kErrorNoError) { diff --git a/src/maple_ir/include/bin_mpl_import.h b/src/maple_ir/include/bin_mpl_import.h index b9c9e2cae0fec0dc196bf83b8c775653a9290f79..d75acb20c43264cbf8d8086d71a9235a3a632400 100644 --- a/src/maple_ir/include/bin_mpl_import.h +++ b/src/maple_ir/include/bin_mpl_import.h @@ -85,7 +85,7 @@ class BinaryMplImport { MIRType *CreateMirType(MIRTypeKind kind, GStrIdx strIdx, int64 tag) const; MIRGenericInstantType *CreateMirGenericInstantType(GStrIdx strIdx) const; MIRBitFieldType *CreateBitFieldType(uint8 fieldsize, PrimType pt, GStrIdx strIdx) const; - void completeAggInfo(TyIdx tyIdx); + void CompleteAggInfo(TyIdx tyIdx); TyIdx ImportType(bool forPointedType = false); void ImportTypeBase(PrimType &primType, GStrIdx &strIdx, bool &nameIsLocal); void InSymTypeTable(); diff --git a/src/maple_ir/src/bin_mpl_import.cpp b/src/maple_ir/src/bin_mpl_import.cpp index 328530d04c94136ebf82d81077ec022940f9cfdb..f078d6159be74e7e94a58d2bd56f8ad81923bc6f 100644 --- a/src/maple_ir/src/bin_mpl_import.cpp +++ b/src/maple_ir/src/bin_mpl_import.cpp @@ -477,7 +477,7 @@ void BinaryMplImport::ImportTypePairs(MIRInstantVectorType &insVecType) { } } -void BinaryMplImport::completeAggInfo(TyIdx tyIdx) { +void BinaryMplImport::CompleteAggInfo(TyIdx tyIdx) { MIRType *type = GlobalTables::GetTypeTable().GetTypeFromTyIdx(tyIdx); CHECK_FATAL(type != nullptr, "MIRType is null"); if (type->GetKind() == kTypeInterface) { @@ -492,7 +492,7 @@ void BinaryMplImport::completeAggInfo(TyIdx tyIdx) { auto *structType = static_cast(type); ImportStructTypeData(*structType); } else { - ERR(kLncErr, "in BinaryMplImport::completeAggInfo, MIRType error"); + ERR(kLncErr, "in BinaryMplImport::CompleteAggInfo, MIRType error"); } } @@ -528,7 +528,7 @@ TyIdx BinaryMplImport::ImportType(bool forPointedType) { if (typeNeedsComplete != nullptr && ptrLev == 0) { TyIdx tyIdxNeedsComplete = typeNeedsComplete->GetTypeIndex(); typeNeedsComplete = nullptr; - completeAggInfo(tyIdxNeedsComplete); + CompleteAggInfo(tyIdxNeedsComplete); } return origType->GetTypeIndex(); } diff --git a/src/maple_me/src/me_function.cpp b/src/maple_me/src/me_function.cpp index 955ce19a2674b4e63c090011254a38db5d1f1836..acf0204104b81ccdfedffbb102564cbffa5435ee 100644 --- a/src/maple_me/src/me_function.cpp +++ b/src/maple_me/src/me_function.cpp @@ -692,11 +692,11 @@ void MeFunction::BuildSCC() { } void MeFunction::SCCTopologicalSort(std::vector &sccNodes) { - std::set InQueue; + std::set inQueue; for (SCCOfBBs *node : sccNodes) { if (!node->HasPred()) { sccTopologicalVec.push_back(node); - InQueue.insert(node); + inQueue.insert(node); } } @@ -704,19 +704,19 @@ void MeFunction::SCCTopologicalSort(std::vector &sccNodes) { for (size_t i = 0; i < sccTopologicalVec.size(); ++i) { SCCOfBBs *sccBB = sccTopologicalVec[i]; for (SCCOfBBs *succ : sccBB->GetSucc()) { - if (InQueue.find(succ) == InQueue.end()) { + if (inQueue.find(succ) == inQueue.end()) { // successor has not been visited bool predAllVisited = true; // check whether all predecessors of the current successor have been visited for (SCCOfBBs *pred : succ->GetPred()) { - if (InQueue.find(pred) == InQueue.end()) { + if (inQueue.find(pred) == inQueue.end()) { predAllVisited = false; break; } } if (predAllVisited) { sccTopologicalVec.push_back(succ); - InQueue.insert(succ); + inQueue.insert(succ); } } } @@ -724,14 +724,14 @@ void MeFunction::SCCTopologicalSort(std::vector &sccNodes) { } void MeFunction::BBTopologicalSort(SCCOfBBs &scc) { - std::set InQueue; + std::set inQueue; std::vector bbs; for (BB *bb : scc.GetBBs()) { bbs.push_back(bb); } scc.Clear(); scc.AddBBNode(scc.GetEntry()); - InQueue.insert(scc.GetEntry()); + inQueue.insert(scc.GetEntry()); for (size_t i = 0; i < scc.GetBBs().size(); ++i) { BB *bb = scc.GetBBs()[i]; @@ -739,7 +739,7 @@ void MeFunction::BBTopologicalSort(SCCOfBBs &scc) { if (succ == nullptr) { continue; } - if (InQueue.find(succ) != InQueue.end() || + if (inQueue.find(succ) != inQueue.end() || std::find(bbs.begin(), bbs.end(), succ) == bbs.end()) { continue; } @@ -754,14 +754,14 @@ void MeFunction::BBTopologicalSort(SCCOfBBs &scc) { if (backEdges.find(std::pair(pred->UintID(), succ->UintID())) != backEdges.end()) { continue; } - if (InQueue.find(pred) == InQueue.end()) { + if (inQueue.find(pred) == inQueue.end()) { predAllVisited = false; break; } } if (predAllVisited) { scc.AddBBNode(succ); - InQueue.insert(succ); + inQueue.insert(succ); } } } diff --git a/src/mpl2mpl/src/vtable_impl.cpp b/src/mpl2mpl/src/vtable_impl.cpp index b4ce70be27bfe289e8457cb0cb91a98ab1c42b53..b8629c5b7a81393397d9801368a611633b443ebc 100644 --- a/src/mpl2mpl/src/vtable_impl.cpp +++ b/src/mpl2mpl/src/vtable_impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) [2019] Huawei Technologies Co.,Ltd.All rights reserved. + * Copyright (c) [2019-2020] Huawei Technologies Co.,Ltd.All rights reserved. * * OpenArkCompiler is licensed under the Mulan PSL v1. * You can use this software according to the terms and conditions of the Mulan PSL v1. @@ -133,9 +133,9 @@ void VtableImpl::ReplaceResolveInterface(StmtNode &stmt, const ResolveFuncNode & opnds.push_back(builder->CreateExprRegread(PTY_ptr, pregItabAddress)); opnds.push_back(builder->CreateIntConst(secondHashCode, PTY_u64)); UStrIdx strIdx = GlobalTables::GetUStrTable().GetOrCreateStrIdxFromName(signature); - MemPool *CurrentFunMp = builder->GetCurrentFuncCodeMp(); - CHECK_FATAL(CurrentFunMp != nullptr, "null ptr check"); - ConststrNode *signatureNode = CurrentFunMp->New(strIdx); + MemPool *currentFunMp = builder->GetCurrentFuncCodeMp(); + CHECK_FATAL(currentFunMp != nullptr, "null ptr check"); + ConststrNode *signatureNode = currentFunMp->New(strIdx); signatureNode->SetPrimType(PTY_ptr); opnds.push_back(signatureNode); StmtNode *mccCallStmt =