Home
last modified time | relevance | path

Searched refs:CString (Results 1 – 25 of 235) sorted by relevance

12345678910

/arkcompiler/ets_runtime/ecmascript/module/
Dmodule_path_helper.h100 static CString ConcatFileNameWithMerge(JSThread *thread, const JSPandaFile *jsPandaFile,
101CString &baseFileName, CString recordName, CString requestName);
102 static void ParseOhmUrl(EcmaVM *vm, const CString &inputFileName,
103 CString &outBaseFileName, CString &outEntryPoint);
104 static CString ParseUrl(EcmaVM *vm, const CString &recordName);
105 static CString ParsePrefixBundle(JSThread *thread, const JSPandaFile *jsPandaFile,
106 …[[maybe_unused]] CString &baseFileName, CString moduleRequestName, [[maybe_unused]] CString record…
107 static CString MakeNewRecord(const JSPandaFile *jsPandaFile, CString &baseFileName,
108 const CString &recordName, const CString &requestName);
109 static CString FindOhpmEntryPoint(const JSPandaFile *jsPandaFile, const CString &ohpmPath,
[all …]
Dmodule_path_helper.cpp21 CString ModulePathHelper::ConcatFileNameWithMerge(JSThread *thread, const JSPandaFile *jsPandaFile, in ConcatFileNameWithMerge()
22 CString &baseFileName, CString recordName, CString requestName) in ConcatFileNameWithMerge()
24 CString entryPoint; in ConcatFileNameWithMerge()
48 CString msg = "failed to load module'" + requestName + "' which imported by '" + in ConcatFileNameWithMerge()
65 void ModulePathHelper::ParseOhmUrl(EcmaVM *vm, const CString &inputFileName, in ParseOhmUrl()
66 CString &outBaseFileName, CString &outEntryPoint) in ParseOhmUrl()
68 size_t pos = CString::npos; in ParseOhmUrl()
73 if (pos != CString::npos) { in ParseOhmUrl()
76 if (pos == CString::npos) { in ParseOhmUrl()
79CString moduleName = inputFileName.substr(BUNDLE_INSTALL_PATH_LEN, pos - BUNDLE_INSTALL_PATH_LEN); in ParseOhmUrl()
[all …]
Djs_module_manager.h55 JSHandle<SourceTextModule> HostGetImportedModule(const CString &referencingModule);
60 …JSHandle<JSTaggedValue> ResolveNativeModule(const CString &moduleRequestName, ModuleTypes moduleTy…
61 …JSTaggedValue> HostResolveImportedModule(const void *buffer, size_t size, const CString &filename);
62 JSHandle<JSTaggedValue> HostResolveImportedModule(const CString &referencingModule,
64 …JSHandle<JSTaggedValue> PUBLIC_API HostResolveImportedModuleWithMerge(const CString &referencingMo…
65 const CString &recordName, bool excuteFromJob = false);
66 …JSHandle<JSTaggedValue> PUBLIC_API HostResolveImportedModuleWithMergeForHotReload(const CString &r…
67 const CString &recordName, bool excuteFromJob = false);
68 …JSHandle<JSTaggedValue> HostResolveImportedModule(const JSPandaFile *jsPandaFile, const CString &f…
79 void AddResolveImportedModule(const JSPandaFile *jsPandaFile, const CString &referencingModule);
[all …]
Dmodule_data_extractor.h38 … const CString &descriptor, const CString &moduleFilename);
41 … const CString &moduleFilename, const CString &recordName = nullptr);
42 …static JSHandle<JSTaggedValue> ParseNativeModule(JSThread *thread, const CString &moduleRequestNam…
44 …static JSTaggedValue JsonParse(JSThread *thread, const JSPandaFile *jsPandaFile, CString entryPoin…
/arkcompiler/ets_runtime/ecmascript/base/
Dpath_helper.h39 static CString NormalizePath(const CString &fileName);
40 static JSHandle<EcmaString> ResolveDirPath(JSThread *thread, CString fileName);
46 inline static void DeleteNamespace(CString &moduleName) in DeleteNamespace()
49 if (pos == CString::npos) { in DeleteNamespace()
59 inline static void AdaptOldIsaRecord(CString &recordName) in AdaptOldIsaRecord()
62 if (pos != CString::npos) { in AdaptOldIsaRecord()
64 if (pos != CString::npos) { in AdaptOldIsaRecord()
74 inline static CString GetStrippedModuleName(const CString &moduleRequestName) in GetStrippedModuleName()
77 if (pos == CString::npos) { in GetStrippedModuleName()
87 inline static CString GetInternalModulePrefix(const CString &moduleRequestName) in GetInternalModulePrefix()
[all …]
Dpath_helper.cpp22 CString PathHelper::NormalizePath(const CString &fileName) in NormalizePath()
24 if (fileName.find(DOUBLE_SLASH_TAG) == CString::npos && in NormalizePath()
25 fileName.find(CURRENT_DIREATORY_TAG) == CString::npos && in NormalizePath()
29 CString res = ""; in NormalizePath()
32 CVector<CString> elems; in NormalizePath()
34 while (curr != CString::npos) { in NormalizePath()
36 CString elem = fileName.substr(prev, curr - prev); in NormalizePath()
63 JSHandle<EcmaString> PathHelper::ResolveDirPath(JSThread *thread, CString fileName) in ResolveDirPath()
71 CString dirPathStr = fileName.substr(0, foundPos + 1); in ResolveDirPath()
Dfast_json_stringifier.h45 CString SerializeObjectKey(const JSHandle<JSTaggedValue> &key, bool hasContent);
58 bool AppendJsonString(bool hasContent, CVector<std::pair<CString, int>> &strCache, int index);
59 bool FastAppendJsonString(bool hasContent, CString &key);
61 CVector<std::pair<CString, int>> &strCache);
63 … CVector<std::pair<CString, int>> &strCache, uint32_t &cacheIndex,
66 CVector<std::pair<CString, int>> &strCache);
68 CVector<std::pair<CString, int>> &strCache, uint32_t &cacheIndex);
74 inline void EraseKeyString(CString &keyStr, bool hasContent) in EraseKeyString()
80 inline void FastSerializeObjectKey(CString &key, bool hasContent) in FastSerializeObjectKey()
109 … inline void SetCache(JSHClass *hclass, size_t numOfKeys, CVector<std::pair<CString, int>> &value) in SetCache() argument
[all …]
/arkcompiler/ets_runtime/ecmascript/module/tests/
Decma_module_test.cpp151 CString localName = "foo"; in HWTEST_F_L0()
152 CString exportName = "bar"; in HWTEST_F_L0()
153 CString value = "hello world"; in HWTEST_F_L0()
183 CString exportLocalName = "*default*"; in HWTEST_F_L0()
184 CString exportName = "default"; in HWTEST_F_L0()
185 CString exportValue = "hello world"; in HWTEST_F_L0()
259 CString baseFileName = "a.abc"; in HWTEST_F_L0()
290 CString baseFilename = "merge.abc"; in HWTEST_F_L0()
305 CString moduleRecordName = "moduleTest1"; in HWTEST_F_L0()
306 CString moduleRequestName = "@bundle:com.bundleName.test/moduleName/requestModuleName1"; in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/mem/
Dc_string.h30 using CString = std::basic_string<char, std::char_traits<char>, CAddressAllocator<char>>; variable
35 using argument_type = panda::ecmascript::CString;
38 size_t operator()(const CString &str) const noexcept in operator()
49 long CStringToL(const CString &str);
50 int64_t CStringToLL(const CString &str);
51 uint64_t CStringToULL(const CString &str);
52 float CStringToF(const CString &str);
53 double CStringToD(const CString &str);
55 CString ConvertToString(const std::string &str);
56 std::string ConvertToStdString(const CString &str);
[all …]
Dc_string.cpp28 long CStringToL(const CString &str) in CStringToL()
36 int64_t CStringToLL(const CString &str) in CStringToLL()
44 uint64_t CStringToULL(const CString &str) in CStringToULL()
52 float CStringToF(const CString &str) in CStringToF()
61 double CStringToD(const CString &str) in CStringToD()
71 CString ConvertToString(T sp) in ConvertToString()
73 CString res; in ConvertToString()
90 CString ConvertToString(const std::string &str) in ConvertToString()
92 CString res; in ConvertToString()
100 CString ConvertToString(const EcmaString *s, StringConvertedUsage usage) in ConvertToString()
[all …]
/arkcompiler/ets_runtime/ecmascript/jspandafile/
Djs_pandafile.h45 CString npmPackageName;
87 JSPandaFile(const panda_file::File *pf, const CString &descriptor);
90 const CString &GetJSPandaFileDesc() const in GetJSPandaFileDesc()
95 CString GetNormalizedFileDesc() const;
97 void SetHapPath(const CString &hapPath) in SetHapPath()
102 const CString &GetJSPandaFileHapPath() const in GetJSPandaFileHapPath()
107 static CString GetNormalizedFileDesc(const CString &desc);
126 CString GetRecordName(EntityId methodId);
163 uint32_t GetMainMethodIndex(const CString &recordName = ENTRY_FUNCTION_NAME) const
176 … const CUnorderedMap<uint32_t, uint64_t> *GetConstpoolMapByReocrd(const CString &recordName) const in GetConstpoolMapByReocrd()
[all …]
Djs_pandafile_executor.cpp35 …ggedValue, bool> JSPandaFileExecutor::ExecuteFromAbcFile(JSThread *thread, const CString &filename, in ExecuteFromAbcFile()
40 CString entry; in ExecuteFromAbcFile()
41 CString name; in ExecuteFromAbcFile()
48 CString normalName = PathHelper::NormalizePath(filename); in ExecuteFromAbcFile()
55 CString assetPath = vm->GetAssetPath(); in ExecuteFromAbcFile()
58 CString assetPath = vm->GetAssetPath(); in ExecuteFromAbcFile()
70 CString msg = "Load file with filename '" + name + "' failed, recordName '" + entry + "'"; in ExecuteFromAbcFile()
75 const CString realEntry = entry; in ExecuteFromAbcFile()
88 CString msg = "cannot find record '" + realEntry + "', please check the request path."; in ExecuteFromAbcFile()
119 …const void *buffer, size_t size, std::string_view entryPoint, const CString &filename, bool needUp… in ExecuteFromBuffer()
[all …]
Djs_pandafile_manager.h36 …std::shared_ptr<JSPandaFile> LoadJSPandaFile(JSThread *thread, const CString &filename, std::strin…
39 …std::shared_ptr<JSPandaFile> LoadJSPandaFile(JSThread *thread, const CString &filename, std::strin…
43 std::shared_ptr<JSPandaFile> LoadJSPandaFileSecure(JSThread *thread, const CString &filename,
47 std::shared_ptr<JSPandaFile> OpenJSPandaFile(const CString &filename);
49 std::shared_ptr<JSPandaFile> OpenJSPandaFile(const CString &filename, const CString &desc);
51 …_ptr<JSPandaFile> OpenJSPandaFileFromBuffer(uint8_t *buffer, size_t size, const CString &filename);
53 std::shared_ptr<JSPandaFile> NewJSPandaFile(const panda_file::File *pf, const CString &desc);
78 std::shared_ptr<JSPandaFile> FindJSPandaFileByNormalizedName(const CString &normalizedName);
79 std::shared_ptr<JSPandaFile> FindJSPandaFile(const CString &filename);
93 …JSPandaFile> GenerateJSPandaFile(JSThread *thread, const panda_file::File *pf, const CString &desc,
[all …]
Djs_pandafile_executor.h28 … static Expected<JSTaggedValue, bool> ExecuteFromAbcFile(JSThread *thread, const CString &filename,
32 … std::string_view entryPoint, const CString &filename = "",
35 … const CString &filename = "", bool needUpdate = false);
36 …<JSTaggedValue, bool> CommonExecuteBuffer(JSThread *thread, bool isBundle, const CString &filename,
37 … const CString &entry, const void *buffer, size_t size);
44 … const CString &filename = "", bool needUpdate = false);
46 const CString &filename = "",
48 …static Expected<JSTaggedValue, bool> CommonExecuteBuffer(JSThread *thread, const CString &filename,
49 … const CString &entry, const JSPandaFile *jsPandaFile);
Djs_pandafile.cpp24 const CString OHOS_PKG_ABC_PATH_ROOT = "/ets/"; // abc file always under /ets/ dir in HAP/HSP
27 JSPandaFile::JSPandaFile(const panda_file::File *pf, const CString &descriptor) in JSPandaFile()
70 void JSPandaFile::CheckIsRecordWithBundleName(const CString &entry) in CheckIsRecordWithBundleName()
73 if (pos == CString::npos) { in CheckIsRecordWithBundleName()
77 CString bundleName = entry.substr(0, pos); in CheckIsRecordWithBundleName()
80 if (info.first.find(PACKAGE_PATH_SEGMENT) != CString::npos || in CheckIsRecordWithBundleName()
81 info.first.find(NPM_PATH_SEGMENT) != CString::npos) { in CheckIsRecordWithBundleName()
84 CString recordName = info.first; in CheckIsRecordWithBundleName()
147 CString fieldName = utf::Mutf8AsCString(sd.data); in InitializeUnMergedPF()
208 CString desc = utf::Mutf8AsCString(cda.GetDescriptor()); in InitializeMergedPF()
[all …]
/arkcompiler/ets_runtime/ecmascript/patch/
Dpatch_loader.h53 CString recordName;
54 CString className;
55 CString methodName;
59 return std::hash<CString>{}(patchMethodIndex.recordName) ^ in operator()
60 …std::hash<CString>{}(patchMethodIndex.className) ^ std::hash<CString>{}(patchMethodIndex.methodNam… in operator()
73 CString patchFileName;
81 CUnorderedSet<CString> replacedRecordNames;
100 const CMap<uint32_t, CString> &baseClassInfo);
101 static PatchErrorCode UnloadPatchInternal(JSThread *thread, const CString &patchFileName,
102 const CString &baseFileName, PatchInfo &patchInfo);
[all …]
/arkcompiler/ets_runtime/ecmascript/
Ddump.cpp138 CString JSHClass::DumpJSType(JSType type) in DumpJSType()
483 CString ret = "unknown type "; in DumpJSType()
548 CString string = ConvertToString(str); in DumpStringClass()
1273 CString string = ConvertToString(EcmaString::Cast(obj)); in DumpHeapObjectType()
1278 CString addrStr = CString(address.str()); in DumpHeapObjectType()
1286 CString addrStr = CString(address.str()); in DumpHeapObjectType()
1775 vec.emplace_back(CString("NextIndex"), JSTaggedValue(GetNextIndex())); in DumpForSnapshot()
1776 vec.emplace_back(CString("IterationKind"), JSTaggedValue(static_cast<int>(GetIterationKind()))); in DumpForSnapshot()
1892 vec.emplace_back(CString("NextIndex"), JSTaggedValue(GetNextIndex())); in DumpForSnapshot()
1893 vec.emplace_back(CString("IterationKind"), JSTaggedValue(static_cast<int>(GetIterationKind()))); in DumpForSnapshot()
[all …]
Djs_date.cpp200 int JSDate::GetSignedNumFromString(const CString &str, int len, int *index) in GetSignedNumFromString()
211 bool JSDate::GetNumFromString(const CString &str, int len, int *index, int *num) in GetNumFromString()
256 JSTaggedValue JSDate::LocalParseStringToMs(const CString &str) in LocalParseStringToMs()
268 CString::size_type indexGmt; in LocalParseStringToMs()
269 CString::size_type indexPlus = CString::npos; in LocalParseStringToMs()
270 std::array<CString, MOUTH_PER_YEAR> monthName = { in LocalParseStringToMs()
278 CString::size_type localSpace = str.find(' ', index); in LocalParseStringToMs()
279 CString strMonth = str.substr(localSpace + 1, LENGTH_MONTH_NAME); in LocalParseStringToMs()
290 if (indexGmt == CString::npos) { in LocalParseStringToMs()
306 if (indexPlus != CString::npos) { in LocalParseStringToMs()
[all …]
/arkcompiler/ets_runtime/ecmascript/dfx/hprof/
Dstring_hashmap.cpp21 CString *StringHashMap::FindOrInsertString(const CString *cstr) in FindOrInsertString()
30 vm_->GetNativeAreaAllocator())->New<CString>(cstr->c_str()); in FindOrInsertString()
38 StringId StringHashMap::GetStringId(const CString *cstr) const in GetStringId()
44 CString *StringHashMap::GetStringByKey(StringKey key) const in GetStringByKey()
53 StringKey StringHashMap::GenerateStringKey(const CString *cstr) const in GenerateStringKey()
55 return std::hash<CString>{} (*cstr); in GenerateStringKey()
58 CString *StringHashMap::GetString(const CString &cstr) in GetString()
Dstring_hashmap.h44 StringId GetStringId(const CString *cstr) const;
55 CString *GetStringByKey(StringKey key) const;
64 CString *GetString(const CString &cstr);
67 StringKey GenerateStringKey(const CString *cstr) const;
68 CString *FindOrInsertString(const CString *cstr);
77 CUnorderedMap<StringKey, CString *> hashmap_;
/arkcompiler/ets_runtime/ecmascript/ts_types/
Dts_type_parser.h39 const CString &recordName;
51 …GlobalTSTypeRef PUBLIC_API CreateGT(const JSPandaFile *jsPandaFile, const CString &recordName, uin…
74 …TSTypeRef GetAndStoreGT(const JSPandaFile *jsPandaFile, uint32_t typeId, const CString &recordName,
93 const CString &recordName, GlobalTSTypeRef gt) in GetAndStoreImportGT()
145 …GlobalTSTypeRef ParseType(const JSPandaFile *jsPandaFile, const CString &recordName, uint32_t type…
149 GlobalTSTypeRef ResolveType(const JSPandaFile *jsPandaFile, const CString &recordName,
152 GlobalTSTypeRef ResolveImportType(const JSPandaFile *jsPandaFile, const CString &recordName,
155 GlobalTSTypeRef ParseIndexSigType(const JSPandaFile *jsPandaFile, const CString &recordName,
158 …JSHandle<JSTaggedValue> ParseNonImportType(const JSPandaFile *jsPandaFile, const CString &recordNa…
161 JSHandle<TSClassType> ParseClassType(const JSPandaFile *jsPandaFile, const CString &recordName,
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/
Dbytecode_info_collector.h124 void AddImportIdAndRecord(uint32_t importId, uint32_t bindingId, const CString &importRecord) in AddImportIdAndRecord()
132 const std::set<CString> &GetImportRecords() const in GetImportRecords()
142 …const std::unordered_map<uint32_t, std::pair<CString, uint32_t>> &GetImportIdToExportRecord() const in GetImportIdToExportRecord()
148 std::set<CString> records_ {};
149 std::unordered_map<uint32_t, std::pair<CString, uint32_t>> idToRecord_ {};
159 explicit ExportRecordInfo(const CString &starRecord) : starExportRecord_({starRecord}) {} in ExportRecordInfo()
178 void AddStarExport(const CString &starExportRecord) in AddStarExport()
183 const std::unordered_set<CString> &GetstarExportRecord() const in GetstarExportRecord()
190 std::unordered_set<CString> starExportRecord_ {};
415 std::vector<CString>& GetRecordNames() in GetRecordNames()
[all …]
/arkcompiler/ets_runtime/ecmascript/dfx/vmstat/
Dcaller_stat.h32 explicit PandaRuntimeCallerStat(const CString &name) : name_(name) {} in PandaRuntimeCallerStat()
49 CString GetHeaderOfName() const in GetHeaderOfName()
51 CString::size_type index = name_.find_first_of("::"); in GetHeaderOfName()
52 if (index == CString::npos) { in GetHeaderOfName()
53 return CString(""); in GetHeaderOfName()
55 CString header = name_.substr(0, index); in GetHeaderOfName()
79 CString name_ {};
/arkcompiler/ets_runtime/ecmascript/regexp/tests/
Dregexp_test.cpp122 CString source("0{2,1}"); in HWTEST_F_L0()
132 CString source("^[z-a]$"); in HWTEST_F_L0()
142 CString source("\\"); in HWTEST_F_L0()
152 CString source("a**"); in HWTEST_F_L0()
162 CString source("a***"); in HWTEST_F_L0()
172 CString source("a**"); in HWTEST_F_L0()
182 CString source("a++"); in HWTEST_F_L0()
192 CString source("a+++"); in HWTEST_F_L0()
202 CString source("a???"); in HWTEST_F_L0()
212 CString source("a????"); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/
Dpgo_profiler.h108 void ProfileBytecode(ApEntityId abcId, const CString &recordName, JSTaggedValue value);
111 …void DumpICByName(ApEntityId abcId, const CString &recordName, EntityId methodId, int32_t bcOffset…
113 …void DumpICByValue(ApEntityId abcId, const CString &recordName, EntityId methodId, int32_t bcOffse…
116 …void DumpICByNameWithPoly(ApEntityId abcId, const CString &recordName, EntityId methodId, int32_t …
118 …void DumpICByValueWithPoly(ApEntityId abcId, const CString &recordName, EntityId methodId, int32_t…
121 …void DumpICByNameWithHandler(ApEntityId abcId, const CString &recordName, EntityId methodId, int32…
123 …void DumpICByValueWithHandler(ApEntityId abcId, const CString &recordName, EntityId methodId, int3…
127 …void DumpOpType(ApEntityId abcId, const CString &recordName, EntityId methodId, int32_t bcOffset, …
129 …void DumpDefineClass(ApEntityId abcId, const CString &recordName, EntityId methodId, int32_t bcOff…
132 …void DumpCreateObject(ApEntityId abcId, const CString &recordName, EntityId methodId, int32_t bcOf…
[all …]

12345678910