| /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 | 53 std::string url_; 55 std::vector<std::string> files_; 56 std::vector<std::string> sources_; 57 std::vector<std::string> names_; 58 std::vector<std::string> mappings_; 73 void Init(const std::string& hapPath); 76 bool TranslateUrlPositionBySourceMap(std::string& url, int& line, int& column); 79 void SplitSourceMap(const std::string& sourceMapData); 80 …void ExtractSourceMapData(const std::string& sourceMapData, std::shared_ptr<SourceMapData>& curMap… 81 void ExtractKeyInfo(const std::string& sourceMap, std::vector<std::string>& sourceKeyInfo); [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() 47 bool Initialize(int targetApiVersion, std::string targetApiSubVersion); 51 ArenaUnorderedMap<std::string, OriginFunctionInfo> *GetOriginFunctionInfo() in GetOriginFunctionInfo() [all …]
|
| D | commonUtil.cpp | 25 std::vector<std::string> Split(const std::string &str, const char delimiter) in Split() 27 std::string normalizedImport {}; in Split() 28 std::string pkgName {}; in Split() 29 std::vector<std::string> items; in Split() 33 while (pos != std::string::npos) { in Split() 34 std::string item = str.substr(start, pos - start); in Split() 39 std::string tail = str.substr(start); in Split() 45 std::string GetStringByVectorElementsWithDelimiter(const std::vector<std::string> &vec, const char … in GetStringByVectorElementsWithDelimiter() 59 std::string GetPkgNameFromNormalizedImport(const std::string &normalizedImport) in GetPkgNameFromNormalizedImport() 61 std::string pkgName {}; in GetPkgNameFromNormalizedImport() [all …]
|
| D | patchFix.h | 45 …l generateSymbolFile, bool generatePatch, PatchFixKind patchFixKind, const std::string &recordName, in PatchFix() 70 uint32_t GetSlotIdFromSymbolTable(const std::string &variableName); 72 void AllocSlotfromPatchEnv(const std::string &variableName); 73 uint32_t GetPatchLexicalIdx(const std::string &variableName); 76 …void ProcessModule(const std::string &recordName, std::vector<panda::pandasm::LiteralArray::Litera… 77 … void ProcessJsonContentRecord(const std::string &recordName, const std::string &jsonFileContent); 78 … void CheckAndRestoreSpecialFunctionName(uint32_t globalIndexForSpecialFunc, std::string &funcName, 79 std::string recordName); 89 void CollectFunctionsWithDefinedClasses(std::string funcName, std::string className); 90 …std::vector<std::pair<std::string, std::string>> GenerateFunctionAndClassHash(panda::pandasm::Func… [all …]
|
| D | commonUtil.h | 37 const std::string NPM_ENTRIES = "npmEntries.txt"; 38 const std::string IS_COMMONJS = "isCommonjs"; 39 const std::string JSON_FilE_CONTENT = "jsonFileContent"; 41 const std::string NORMALIZED_OHMURL_NOT_SO = "@normalized:N"; 42 const std::string NORMALIZED = "@normalized:"; 43 const std::string MODULE_RECORD_IDX = "moduleRecordIdx"; 44 const std::string GLOBAL_TYPE_NAME = "_GLOBAL"; 56 std::vector<std::string> Split(const std::string &str, const char delimiter); 57 std::string GetStringByVectorElementsWithDelimiter(const std::vector<std::string> &vec, const char … 58 bool IsExternalPkgNames(const std::string &ohmurl, const std::set<std::string> &externalPkgNames); [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::optional<std::string> ResolvePath(const std::string &path) const; 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 | 36 static const std::string ELEMENT_SEPARATOR; 37 static const std::string BLOCK_SEPARATOR; 38 static const std::string TYPE_SEPARATOR; 39 static const std::string BLOCK_START; 40 static const std::string ARRAY_START; 41 static const std::string ARRAY_END; 42 static const std::string NEW_LINE; 43 static const std::string SPACE; 44 static const std::string BLOCK_AND_ARRAY_START; 45 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/ets_runtime/test/perform/string/ |
| D | expect_output.txt | 14 string replace regexp flag is g: 44 15 string replace regexp flag is gi :15 16 string replace regexp pattern is /([^d]*)(d*)([^w]*)/ : 161 17 string split number of input parameters is 2 : 70 18 string split number of input parameters is 1 : 35 19 string split into regexp.split : 22 20 string indexOf input parameter is a substring : 14 21 string indexOf Input parameter is not a substring : 15 22 string indexOf number of input parameters is 2 : 11 23 string slice number of input parameters is 1 : 17 [all …]
|
| /arkcompiler/ets_frontend/es2panda/aot/ |
| D | options.h | 80 const std::string &CompilerOutput() const in CompilerOutput() 85 const std::string &SourceFile() const in SourceFile() 90 const std::string &RecordName() const in RecordName() 95 const std::string &ErrorMsg() const in ErrorMsg() 120 std::string ExtractContentFromBase64Input(const std::string &inputBase64String); 122 const std::string &compilerProtoOutput() const in compilerProtoOutput() 127 const std::string &NpmModuleEntryList() const in NpmModuleEntryList() 132 const std::unordered_map<std::string, std::string> &OutputFiles() const in OutputFiles() 137 bool CollectInputFilesFromFileList(const std::string &input, const std::string &inputExtension); 138 bool CollectInputFilesFromFileDirectory(const std::string &input, const std::string &extension); [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/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/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() 56 ErrCode HeapProfilerCommand(const std::string &cmd); 57 ErrCode DebuggerCommand(const std::string &cmd); 58 ErrCode CpuProfileCommand(const std::string &cmd); 59 ErrCode RuntimeCommand(const std::string &cmd); 60 ErrCode BreakCommand(const std::string &cmd); 61 ErrCode DeleteCommand(const std::string &cmd); 62 ErrCode StepCommand(const std::string &cmd); [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 | 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);
|
| 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 …]
|
| /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/merge_abc/src/ |
| D | mergeProgram.h | 26 …static bool EnumerateFilesWindows(const std::string &protoBinPath, const std::string &protoBinSuff… 27 std::vector<std::string> &directoryFiles); 29 … static bool EnumerateFilesUnix(const std::string &protoBinPath, const std::string &protoBinSuffix, 30 std::vector<std::string> &directoryFiles); 31 static bool GetProtoFiles(const std::string &protoBinPath, const std::string &protoBinSuffix, 32 std::vector<std::string> &directoryFiles); 33 static bool AppendProtoFiles(const std::string &filePath, const std::string &protoBinSuffix, 34 std::vector<std::string> &protoFiles); 35 static bool CollectProtoFiles(std::string &input, const std::string &protoBinSuffix, 36 std::vector<std::string> &protoFiles);
|
| /arkcompiler/ets_runtime/ecmascript/compiler/ |
| D | compiler_log.h | 39 explicit CompilerLog(const std::string &logOpt); 108 …void SetMethodLog(const std::string &fileName, const std::string &methodName, AotMethodLogList *lo… 109 void SetStubLog(const std::string &stubName, MethodLogList *logList); 110 void AddCompiledMethod(const std::string& name, const CString& recordName); 111 void RemoveCompiledMethod(const std::string& name, const CString& recordName); 113 void AddMethodTime(const std::string& name, uint32_t id, double time); 114 void AddPassTime(const std::string& name, double time); 117 std::set<std::pair<std::string, CString>> &mismatchMethodSet); 119 std::map<std::string, int> nameIndex_; 147 std::map<std::string, double> timePassMap_ {}; [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/scenarios/js_to_ets/indirect_call/ |
| D | indirect_union.sts | 18 const NUMERIC_VALUE: (number | string) = 1; 20 …let result: (number | string) = js.indirectCallUnion.call(null, NUMERIC_VALUE) as (number | string… 27 const STRING_VALUE: (number | string) = '1'; 29 …let result: (number | string) = js.indirectCallUnion.call(null, STRING_VALUE) as (number | string); 30 assert(typeof result == "string" && result as string == STRING_VALUE); 36 const NUMERIC_VALUE: (number | string) = 1; 38 …let result: (number | string) = js.indirectCallUnion.apply(null, [NUMERIC_VALUE]) as (number | str… 45 const STRING_VALUE: (number | string) = '1'; 47 …let result: (number | string) = js.indirectCallUnion.apply(null, [STRING_VALUE]) as (number | str… 48 assert(typeof result == "string" && result as string == STRING_VALUE); [all …]
|