Lines Matching refs:desc
169 // JSPandaFile desc cannot be empty, if buffer with empty filename, use pf filename as a descriptor.
170 const CString &desc = filename.empty() ? pf->GetFilename().c_str() : filename;
172 std::shared_ptr<JSPandaFile> jsPandaFile = GenerateJSPandaFile(thread, pf.release(), desc, entryPoint);
216 // JSPandaFile desc cannot be empty, if buffer with empty filename, use pf filename as a descriptor.
217 const CString &desc = filename.empty() ? pf->GetFilename().c_str() : filename;
219 std::shared_ptr<JSPandaFile> jsPandaFile = GenerateJSPandaFile(thread, pf.release(), desc, entryPoint);
389 std::shared_ptr<JSPandaFile> JSPandaFileManager::OpenJSPandaFile(const CString &filename, const CString &desc)
397 return NewJSPandaFile(pf.release(), desc);
413 std::shared_ptr<JSPandaFile> JSPandaFileManager::NewJSPandaFile(const panda_file::File *pf, const CString &desc)
415 std::shared_ptr<JSPandaFile> jsPandaFile = std::make_shared<JSPandaFile>(pf, desc);
492 std::string GetModuleNameFromDesc(const std::string &desc)
495 handle desc like:
501 auto lastSlash = desc.rfind("/");
503 LOG_ECMA(DEBUG) << "GetModuleNameFromDesc can't find fisrt /: " << desc;
507 auto secondLastSlash = desc.rfind("/", lastSlash - 1);
509 LOG_ECMA(DEBUG) << "GetModuleNameFromDesc can't find second /: " << desc;
513 auto thirdLastSlash = desc.rfind("/", secondLastSlash - 1);
515 LOG_ECMA(DEBUG) << "GetModuleNameFromDesc can't find third /: " << desc;
519 return desc.substr(thirdLastSlash + 1, secondLastSlash - thirdLastSlash - 1);
523 const CString &desc, std::string_view entryPoint)
527 std::shared_ptr<JSPandaFile> newJsPandaFile = NewJSPandaFile(pf, desc);
530 std::string moduleName = GetModuleNameFromDesc(desc.c_str());
536 << ", fileName:" << desc << ", hapPath: " << hapPath;
559 std::shared_ptr<JSPandaFile> jsPandaFile = FindJSPandaFileUnlocked(desc);