mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-24 02:30:03 +00:00
Move load AOT and Snapshot file after builtins initialized
Description:Load AOT and Snapshot file after builtins initialized ISSUE:https://gitee.com/openharmony/ark_js_runtime/issues/I571GL Signed-off-by: dingwen <dingwen6@huawei.com> Change-Id: Icd509469da3b8bad955cbba40bd1b7fe0fcc0a4c
This commit is contained in:
parent
491482c043
commit
b10ba05de9
@ -159,17 +159,6 @@ bool EcmaVM::Initialize()
|
||||
GlobalEnv::SIZE,
|
||||
JSType::GLOBAL_ENV);
|
||||
globalConst->InitRootsClass(thread_, *dynClassClassHandle);
|
||||
tsLoader_ = new TSLoader(this);
|
||||
snapshotEnv_ = new SnapshotEnv(this);
|
||||
aotInfo_ = new AotCodeInfo();
|
||||
if (options_.EnableStubAot()) {
|
||||
LoadStubs();
|
||||
}
|
||||
if (options_.EnableTSAot()) {
|
||||
TryLoadSnapshotFile();
|
||||
std::string file = options_.GetAOTOutputFile();
|
||||
LoadAOTFile(file);
|
||||
}
|
||||
globalConst->InitGlobalConstant(thread_);
|
||||
JSHandle<GlobalEnv> globalEnv = factory_->NewGlobalEnv(*globalEnvClass);
|
||||
globalEnv->Init(thread_);
|
||||
@ -181,6 +170,17 @@ bool EcmaVM::Initialize()
|
||||
thread_->SetGlobalObject(GetGlobalEnv()->GetGlobalObject());
|
||||
moduleManager_ = new ModuleManager(this);
|
||||
debuggerManager_->Initialize();
|
||||
tsLoader_ = new TSLoader(this);
|
||||
snapshotEnv_ = new SnapshotEnv(this);
|
||||
aotInfo_ = new AotCodeInfo();
|
||||
if (options_.EnableStubAot()) {
|
||||
LoadStubs();
|
||||
}
|
||||
if (options_.EnableTSAot()) {
|
||||
TryLoadSnapshotFile();
|
||||
std::string file = options_.GetAOTOutputFile();
|
||||
LoadAOTFile(file);
|
||||
}
|
||||
InitializeFinish();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user