• Home
  • Raw
  • Download

Lines Matching full:module

15 #include "ecmascript/module/js_module_deregister.h"
23 #include "ecmascript/module/js_module_manager.h"
24 #include "ecmascript/module/js_module_source_text.h"
25 #include "ecmascript/module/module_data_extractor.h"
36 LOG_FULL(FATAL) << "Lacking deregister module's name."; in FreeModuleRecord()
41 // pointer is module's name, which will be deregistered. in FreeModuleRecord()
42 JSHandle<SourceTextModule> module = in FreeModuleRecord() local
45 LoadingTypes type = module->GetLoadingTypes(); in FreeModuleRecord()
46 JSTaggedValue moduleRecordName = SourceTextModule::GetModuleName(module.GetTaggedValue()); in FreeModuleRecord()
49 LOG_FULL(DEBUG) << "free stable module's ModuleNameSpace" << recordNameStr; in FreeModuleRecord()
55 DecreaseRegisterCounts(thread, module, decreaseModule); in FreeModuleRecord()
56 uint16_t counts = module->GetRegisterCounts(); in FreeModuleRecord()
60 … LOG_FULL(DEBUG) << "try to remove module " << recordNameStr << ", register counts is " << counts; in FreeModuleRecord()
68 JSHandle<SourceTextModule> module = moduleManager->HostGetImportedModule(moduleName); in ReviseLoadedModuleCount() local
70 LoadingTypes type = module->GetLoadingTypes(); in ReviseLoadedModuleCount()
71 // do not change stable module's RegisterCounts. in ReviseLoadedModuleCount()
78 IncreaseRegisterCounts(thread, module, increaseModule); in ReviseLoadedModuleCount()
82 void ModuleDeregister::RemoveModule(JSThread *thread, JSHandle<SourceTextModule> module) in RemoveModule() argument
84 JSTaggedValue moduleRecordName = SourceTextModule::GetModuleName(module.GetTaggedValue()); in RemoveModule()
86 …if (module->GetTypes() == ModuleTypes::APP_MODULE || module->GetTypes() == ModuleTypes::OHOS_MODUL… in RemoveModule()
87 if (TryToRemoveSO(thread, module)) { in RemoveModule()
88 …LOG_FULL(INFO) << "Remove native module " << ConvertToString(moduleRecordName).c_str() << " succes… in RemoveModule()
90 …LOG_FULL(INFO) << "Remove native module " << ConvertToString(moduleRecordName).c_str() << " failed… in RemoveModule()
95 … LOG_ECMA_IF(entry == -1, FATAL) << "Can not get module: " << ConvertToString(moduleRecordName) << in RemoveModule()
96 ", when try to remove the module"; in RemoveModule()
101 void ModuleDeregister::IncreaseRegisterCounts(JSThread *thread, JSHandle<SourceTextModule> module, in IncreaseRegisterCounts() argument
104 if (!module->GetRequestedModules().IsUndefined()) { in IncreaseRegisterCounts()
105 JSHandle<TaggedArray> requestedModules(thread, module->GetRequestedModules()); in IncreaseRegisterCounts()
111 JSTaggedValue moduleRecordName = module->GetEcmaModuleRecordName(); in IncreaseRegisterCounts()
115 SourceTextModule::HostResolveImportedModule(thread, module, required); in IncreaseRegisterCounts()
122 SourceTextModule::HostResolveImportedModuleWithMerge(thread, module, required); in IncreaseRegisterCounts()
128 LOG_FULL(DEBUG) << "Find module cyclical loading, stop increasing."; in IncreaseRegisterCounts()
140 if (module->GetLoadingTypes() == LoadingTypes::STABLE_MODULE) { in IncreaseRegisterCounts()
143 uint16_t registerNum = module->GetRegisterCounts(); in IncreaseRegisterCounts()
145 module->SetLoadingTypes(LoadingTypes::STABLE_MODULE); in IncreaseRegisterCounts()
148 module->SetRegisterCounts(registerNum + 1); in IncreaseRegisterCounts()
151 void ModuleDeregister::DecreaseRegisterCounts(JSThread *thread, JSHandle<SourceTextModule> module, in DecreaseRegisterCounts() argument
154 if (!module->GetRequestedModules().IsUndefined()) { in DecreaseRegisterCounts()
155 JSHandle<TaggedArray> requestedModules(thread, module->GetRequestedModules()); in DecreaseRegisterCounts()
161 JSTaggedValue moduleRecordName = module->GetEcmaModuleRecordName(); in DecreaseRegisterCounts()
165 SourceTextModule::HostResolveImportedModule(thread, module, required); in DecreaseRegisterCounts()
172 SourceTextModule::HostResolveImportedModuleWithMerge(thread, module, required); in DecreaseRegisterCounts()
178 LOG_FULL(DEBUG) << "Find module cyclical loading, stop increasing."; in DecreaseRegisterCounts()
190 if (module->GetLoadingTypes() != LoadingTypes::DYNAMITC_MODULE) { in DecreaseRegisterCounts()
193 uint16_t num = module->GetRegisterCounts(); in DecreaseRegisterCounts()
200 …LOG_FULL(DEBUG) << "try to remove module " << ConvertToString(module->GetEcmaModuleRecordName()).c… in DecreaseRegisterCounts()
201 RemoveModule(thread, module); in DecreaseRegisterCounts()
203 module->SetRegisterCounts(registerNum); in DecreaseRegisterCounts()