| /arkcompiler/ets_runtime/ecmascript/extractortool/src/ |
| D | file_path_utils.h | 25 bool StringStartWith(const std::string& str, const char* startStr, size_t startStrLen); 26 bool StringEndWith(const std::string& str, const char* endStr, size_t endStrLen); 27 …void SplitString(const std::string& str, std::vector<std::string>& out, size_t pos = 0, const char… 28 std::string JoinString(const std::vector<std::string>& strs, char sep, size_t startIndex = 0); 29 std::string StripString(const std::string& str, const char* charSet = " \t\n\r"); 31 void FixExtName(std::string& path); 32 std::string GetInstallPath(const std::string& curJsModulePath, bool module = true); 33 …std::string MakeNewJsModulePath(const std::string& curJsModulePath, const std::string& newJsModule… 34 std::string FindNpmPackageInPath(const std::string& npmPath); 35 std::string FindNpmPackageInTopLevel( [all …]
|
| D | file_path_utils.cpp | 64 bool StringStartWith(const std::string& str, const char* startStr, size_t startStrLen) in StringStartWith() 69 bool StringEndWith(const std::string& str, const char* endStr, size_t endStrLen) in StringEndWith() 75 void SplitString(const std::string& str, std::vector<std::string>& out, size_t pos, const char* sep… in SplitString() 83 while ((endPos = str.find_first_of(seps, startPos)) != std::string::npos) { in SplitString() 95 std::string JoinString(const std::vector<std::string>& strs, char sep, size_t startIndex) in JoinString() 97 std::string out; in JoinString() 109 std::string StripString(const std::string& str, const char* charSet) in StripString() 112 if (startPos == std::string::npos) { in StripString() 113 return std::string(); in StripString() 119 void FixExtName(std::string& path) in FixExtName() [all …]
|
| D | extractor.h | 33 std::string fileName; 42 explicit Extractor(const std::string &source); 57 bool ExtractByName(const std::string &fileName, std::ostream &dest) const; 64 bool ExtractFile(const std::string &fileName, const std::string &targetPath) const; 70 bool HasEntry(const std::string &fileName) const; 71 bool IsDirExist(const std::string &dir) const; 72 bool GetFileBuffer(const std::string& srcPath, std::ostringstream& dest); 73 bool GetFileList(const std::string& srcPath, std::vector<std::string>& assetList); 74 bool GetFileList(const std::string &srcPath, std::set<std::string> &fileSet); 75 bool IsSameHap(const std::string& hapPath) const; [all …]
|
| D | source_map.h | 45 std::string sources; 54 std::vector<std::string> files_; 55 std::vector<std::string> sources_; 56 std::vector<std::string> names_; 57 std::vector<std::string> mappings_; 71 void Init(const std::string& url, const std::string& hapPath); 72 bool TranslateUrlPositionBySourceMap(std::string& url, int& line, int& column); 73 static void ExtractStackInfo(const std::string& stackStr, std::vector<std::string>& res); 76 void SplitSourceMap(const std::string& url, const std::string& sourceMapData); 77 …void ExtractSourceMapData(const std::string& sourceMapData, std::shared_ptr<SourceMapData>& curMap… [all …]
|
| /arkcompiler/ets_frontend/es2panda/util/ |
| D | symbolTable.h | 26 static const std::string FIRST_LEVEL_SEPERATOR; 27 static const std::string SECOND_LEVEL_SEPERATOR; 30 std::string recordName; 31 std::string funcInternalName; 32 std::string funcHash; 33 ArenaMap<uint32_t, std::pair<std::string, int>> lexenv; // lexenv: <slot, <name, type>> 34 ArenaMap<std::string, std::string> classHash; 40 SymbolTable(const std::string &inputSymbolTable, const std::string &dumpSymbolTable) in SymbolTable() 48 void WriteSymbolTable(const std::string &content); 49 ArenaUnorderedMap<std::string, OriginFunctionInfo> *GetOriginFunctionInfo() in GetOriginFunctionInfo() [all …]
|
| D | patchFix.h | 45 …l generateSymbolFile, bool generatePatch, PatchFixKind patchFixKind, const std::string &recordName, in PatchFix() 68 uint32_t GetSlotIdFromSymbolTable(const std::string &variableName); 70 void AllocSlotfromPatchEnv(const std::string &variableName); 71 uint32_t GetPatchLexicalIdx(const std::string &variableName); 74 …void ProcessModule(const std::string &recordName, std::vector<panda::pandasm::LiteralArray::Litera… 75 … void ProcessJsonContentRecord(const std::string &recordName, const std::string &jsonFileContent); 76 … void CheckAndRestoreSpecialFunctionName(uint32_t globalIndexForSpecialFunc, std::string &funcName, 77 std::string recordName); 86 void CollectFunctionsWithDefinedClasses(std::string funcName, std::string className); 87 …std::vector<std::pair<std::string, std::string>> GenerateFunctionAndClassHash(panda::pandasm::Func… [all …]
|
| /arkcompiler/ets_frontend/ets2panda/util/ |
| D | arktsconfig.h | 44 Pattern(std::string value, std::string base); 50 std::string GetSearchRoot() const; 53 bool Match(const std::string &path) const; 56 std::string value_ {}; 57 std::string base_ {}; 80 explicit ArkTsConfig(std::string configPath) : configPath_(std::move(configPath)) {} in ArkTsConfig() 83 std::string ResolvePath(const std::string &path); 85 std::string ConfigPath() const in ConfigPath() 90 std::string BaseUrl() const in BaseUrl() 94 std::string RootDir() const in RootDir() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/pgo_profiler/ |
| D | pgo_utils.h | 31 static const std::string ELEMENT_SEPARATOR; 32 static const std::string BLOCK_SEPARATOR; 33 static const std::string TYPE_SEPARATOR; 34 static const std::string BLOCK_START; 35 static const std::string ARRAY_START; 36 static const std::string ARRAY_END; 37 static const std::string NEW_LINE; 38 static const std::string SPACE; 39 static const std::string BLOCK_AND_ARRAY_START; 40 static const std::string VERSION_HEADER; [all …]
|
| D | pgo_utils.cpp | 21 const std::string DumpUtils::ELEMENT_SEPARATOR = "/"; 22 const std::string DumpUtils::BLOCK_SEPARATOR = ","; 23 const std::string DumpUtils::TYPE_SEPARATOR = "|"; 24 const std::string DumpUtils::BLOCK_START = ":"; 25 const std::string DumpUtils::ARRAY_START = "["; 26 const std::string DumpUtils::ARRAY_END = "]"; 27 const std::string DumpUtils::NEW_LINE = "\n"; 28 const std::string DumpUtils::SPACE = " "; 29 const std::string DumpUtils::BLOCK_AND_ARRAY_START = BLOCK_START + SPACE + ARRAY_START + SPACE; 30 const std::string DumpUtils::VERSION_HEADER = "Profiler Version" + BLOCK_START + SPACE; [all …]
|
| /arkcompiler/runtime_core/disassembler/tests/ |
| D | instructions_test.cpp.in | 17 #include <string> 31 d.Disassemble(std::string(DISASM_BIN_DIR) + "empty_record.bc"); 34 EXPECT_TRUE(ss.str().find(".language PandaAssembly") != std::string::npos); 42 d.Disassemble(std::string(DISASM_BIN_DIR) + "instructions.bc"); 48 ASSERT_TRUE(beg_g != std::string::npos && end_g != std::string::npos) << "function g not found"; 50 … std::string body_g = ss.str().substr(beg_g + strlen("g() {"), end_g - (beg_g + strlen("g() {"))); 52 EXPECT_TRUE(body_g.find("\tmov v0, v1") != std::string::npos); 53 EXPECT_TRUE(body_g.find("\tmov.64 v2, v3") != std::string::npos); 54 EXPECT_TRUE(body_g.find("\tmov.obj v4, v5") != std::string::npos); 56 EXPECT_TRUE(body_g.find("\tmovi v0, 0xffffffffffffffff") != std::string::npos); [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_util/src/ |
| D | string_utils.cpp | 21 std::string StringUtils::Trim(const std::string &src) in Trim() 27 std::string StringUtils::Replace(const std::string &src, const std::string &target, const std::stri… in Replace() 29 std::string::size_type replaceLen = replacement.size(); in Replace() 30 std::string::size_type targetLen = target.size(); in Replace() 31 std::string temp = src; in Replace() 32 std::string::size_type index = 0; in Replace() 34 while (index != std::string::npos) { in Replace() 42 std::string StringUtils::Append(const std::string &src, const std::string &target, const std::strin… in Append() 47 std::string StringUtils::GetStrAfterLast(const std::string &src, const std::string &target, bool is… in GetStrAfterLast() 50 if (pos == std::string::npos) { in GetStrAfterLast() [all …]
|
| D | file_utils.cpp | 32 const std::string kFileSeperatorLinuxStyleStr = std::string(1, kFileSeperatorLinuxStyleChar); 33 const std::string kFileSeperatorWindowsStyleStr = std::string(1, kFileSeperatorWindowsStyleChar); 44 const std::string kFileSeperatorStr = kFileSeperatorWindowsStyleStr; 46 const std::string kFileSeperatorStr = kFileSeperatorLinuxStyleStr; 49 std::string FileUtils::SafeGetenv(const char *envVar) in SafeGetenv() 54 std::string tmpStr(tmpEnvPtr); in SafeGetenv() 58 std::string FileUtils::GetRealPath(const std::string &filePath) in GetRealPath() 71 std::string result(path, path + strlen(path)); in GetRealPath() 75 std::string FileUtils::GetFileName(const std::string &filePath, bool isWithExtension) in GetFileName() 77 std::string fullFileName = StringUtils::GetStrAfterLast(filePath, kFileSeperatorStr); in GetFileName() [all …]
|
| /arkcompiler/toolchain/websocket/ |
| D | http.h | 30 static std::string DecodeHeader(const std::string& headersText, std::string_view headerName); 35 std::string version; 36 std::string connection; 37 std::string upgrade; 38 std::string secWebSocketKey; 40 static bool Decode(const std::string& request, HttpRequest& parsed); 43 …static std::string DecodeVersion(const std::string& request, std::string::size_type methodStartPos… 48 std::string version; 49 std::string status; 50 std::string connection; [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_util/include/ |
| D | string_utils.h | 30 static void Split(const std::string &src, Container &container, char delim) in Split() 37 std::string item; in Split() 65 … static void Split(const std::string &src, std::unordered_set<std::string> &container, char delim); 66 static void Split(const std::string &src, std::queue<std::string> &container, char delim); 68 static std::string Trim(const std::string &s); 69 …static std::string Replace(const std::string &src, const std::string &target, const std::string &r… 70 …static std::string Append(const std::string &src, const std::string &target, const std::string &sp… 71 …static std::string GetStrAfterLast(const std::string &src, const std::string &target, bool isRetur… 72 …static std::string GetStrBeforeLast(const std::string &src, const std::string &target, bool isRetu… 73 static bool HasCommandInjectionChar(const std::string &s) in HasCommandInjectionChar() [all …]
|
| D | profile.h | 61 bool CheckFuncHot(const std::string &className) const; 62 bool CheckMethodHot(const std::string &className) const; 63 bool CheckMethodSigHot(const std::string &methodSigStr) const; 64 bool CheckFieldHot(const std::string &className) const; 65 bool CheckClassHot(const std::string &className) const; 66 bool CheckLiteralHot(const std::string &literal) const; 67 bool CheckReflectionStrHot(const std::string &str, uint8 &layoutType) const; 69 … bool DeCompress(const std::string &fileName, const std::string &dexName, ProfileType type = kAll); 70 const std::unordered_map<std::string, FuncItem> &GetFunctionProf() const; 71 bool GetFunctionBBProf(const std::string &funcName, BBInfo &result); [all …]
|
| D | file_utils.h | 21 extern const std::string kFileSeperatorStr; 28 static std::string SafeGetenv(const char *envVar); 29 static std::string GetRealPath(const std::string &filePath); 30 static std::string GetFileName(const std::string &filePath, bool isWithExtension); 31 static std::string GetFileExtension(const std::string &filePath); 32 static std::string GetFileFolder(const std::string &filePath); 33 static int Remove(const std::string &filePath); 34 static bool IsFileExists(const std::string &filePath); 35 static std::string AppendMapleRootIfNeeded(bool needRootPath, const std::string &path, 36 … const std::string &defaultRoot = "." + kFileSeperatorStr);
|
| /arkcompiler/toolchain/tooling/client/utils/ |
| D | cli_command.h | 32 using StrPair = std::pair<std::string, std::string>; 33 using VecStr = std::vector<std::string>; 42 CliCommand(std::vector<std::string> cliCmdStr, uint32_t sessionId) in CliCommand() 55 ErrCode HeapProfilerCommand(const std::string &cmd); 56 ErrCode DebuggerCommand(const std::string &cmd); 57 ErrCode CpuProfileCommand(const std::string &cmd); 58 ErrCode RuntimeCommand(const std::string &cmd); 59 ErrCode BreakCommand(const std::string &cmd); 60 ErrCode DeleteCommand(const std::string &cmd); 61 ErrCode StepCommand(const std::string &cmd); [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_ir/include/ |
| D | option.h | 31 bool ParseOptions(int argc, char **argv, std::string &fileName) const; 37 const std::vector<std::string> &GetSequence() const in GetSequence() 42 std::string LastPhaseName() const in LastPhaseName() 50 static bool DumpPhase(const std::string &phase) in DumpPhase() 58 static bool IsSkipPhase(const std::string &phaseName) in IsSkipPhase() 74 static std::string dumpPhase; 75 static std::string skipPhase; 76 static std::string skipFrom; 77 static std::string skipAfter; 78 static std::string dumpFunc; [all …]
|
| /arkcompiler/ets_frontend/es2panda/aot/ |
| D | options.h | 78 const std::string &CompilerOutput() const in CompilerOutput() 83 const std::string &SourceFile() const in SourceFile() 88 const std::string &RecordName() const in RecordName() 93 const std::string &ErrorMsg() const in ErrorMsg() 113 std::string ExtractContentFromBase64Input(const std::string &inputBase64String); 115 const std::string &compilerProtoOutput() const in compilerProtoOutput() 120 const std::string &NpmModuleEntryList() const in NpmModuleEntryList() 125 const std::unordered_map<std::string, std::string> &OutputFiles() const in OutputFiles() 130 bool CollectInputFilesFromFileList(const std::string &input, const std::string &inputExtension); 131 bool CollectInputFilesFromFileDirectory(const std::string &input, const std::string &extension); [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/ |
| D | compiler_log.h | 40 explicit CompilerLog(const std::string &logOpt); 109 …void SetMethodLog(const std::string &fileName, const std::string &methodName, AotMethodLogList *lo… 110 void SetStubLog(const std::string &stubName, MethodLogList *logList); 111 void AddCompiledMethod(const std::string& name, const CString& recordName); 112 void RemoveCompiledMethod(const std::string& name, const CString& recordName); 114 void AddMethodTime(const std::string& name, uint32_t id, double time); 115 void AddPassTime(const std::string& name, double time); 118 std::set<std::pair<std::string, CString>> &mismatchMethodSet); 120 std::map<std::string, int> nameIndex_; 148 std::map<std::string, double> timePassMap_ {}; [all …]
|
| /arkcompiler/toolchain/tooling/base/ |
| D | pt_script.h | 32 …PtScript(ScriptId scriptId, const std::string &fileName, const std::string &url, const std::string… 45 const std::string &GetFileName() const in GetFileName() 50 void SetFileName(const std::string &fileName) in SetFileName() 55 const std::string &GetUrl() const in GetUrl() 60 void SetUrl(const std::string &url) in SetUrl() 65 const std::string &GetHash() const in GetHash() 70 void SetHash(const std::string &hash) in SetHash() 75 const std::string &GetScriptSource() const in GetScriptSource() 80 void SetScriptSource(const std::string &scriptSource) in SetScriptSource() 85 const std::string &GetSourceMapUrl() const in GetSourceMapUrl() [all …]
|
| D | pt_types.h | 49 using BreakpointId = std::string; 60 if (lineStart == std::string::npos) { in ParseBreakpointId() 64 if (columnStart == std::string::npos) { in ParseBreakpointId() 68 if (urlStart == std::string::npos) { in ParseBreakpointId() 71 std::string lineStr = id.substr(lineStart + 1, columnStart - lineStart - 1); in ParseBreakpointId() 72 std::string columnStr = id.substr(columnStart + 1, urlStart - columnStart - 1); in ParseBreakpointId() 73 std::string url = id.substr(urlStart + 1); in ParseBreakpointId() 83 std::string url_ {}; 108 const std::string &GetUrl() const in GetUrl() 113 const std::string &GetCondition() const in GetCondition() [all …]
|
| /arkcompiler/runtime_core/libark_defect_scan_aux/include/ |
| D | module_record.h | 24 std::string module_request_; 25 std::string import_name_; 26 std::string local_name_; 30 std::string export_name_; 31 std::string module_request_; 32 std::string import_name_; 33 std::string local_name_; 42 void SetRequestModules(std::vector<std::string> &request_modules); 49 const std::string &GetImportLocalNameByIndex(size_t index) const; 50 const std::string &GetImportNamespaceNameByIndex(size_t index) const; [all …]
|
| /arkcompiler/toolchain/tooling/test/ |
| D | profiler_impl_test.cpp | 89 ASSERT_TRUE(response.GetMessage().find("Stop is failure") != std::string::npos); in HWTEST_F_L0() 131 … std::string msg = std::string() + R"({"id":0,"method":"Debugger.requestMemoryDump","params":{}})"; in HWTEST_F_L0() 164 std::string result = ""; in HWTEST_F_L0() 165 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() 166 [&result]([[maybe_unused]] const void *ptr, const std::string &temp) { result = temp; }; in HWTEST_F_L0() 170 std::string msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{}})"; in HWTEST_F_L0() 173 ASSERT_TRUE(result.find("Unknown method: Test") != std::string::npos); in HWTEST_F_L0() 174 msg = std::string() + R"({"id":0,"method":"Debugger.disable","params":{}})"; in HWTEST_F_L0() 186 std::string result = ""; in HWTEST_F_L0() 187 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() [all …]
|
| D | debugger_impl_test.cpp | 55 std::string outStrForCallbackCheck = ""; in HWTEST_F_L0() 56 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() 57 … [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { in HWTEST_F_L0() 64 std::string strFilename = "filename"; in HWTEST_F_L0() 83 std::string outStrForCallbackCheck = ""; in HWTEST_F_L0() 84 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() 85 … [&outStrForCallbackCheck]([[maybe_unused]] const void *ptr, const std::string &inStrOfReply) { in HWTEST_F_L0() 93 std::string msg = std::string() + in HWTEST_F_L0() 113 std::string outStrForCallbackCheck = ""; in HWTEST_F_L0() 114 std::function<void(const void*, const std::string &)> callback = in HWTEST_F_L0() [all …]
|