mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-27 12:10:47 +00:00
!7074 jit compile mode refactor
Merge pull request !7074 from zoumujia/refactor
This commit is contained in:
commit
81f3a44cbd
@ -95,10 +95,6 @@
|
||||
#include "ecmascript/ohos/enable_aot_list_helper.h"
|
||||
#include "ecmascript/ohos/jit_tools.h"
|
||||
|
||||
#ifdef JIT_SWITCH_COMPILE_MODE
|
||||
#include "base/startup/init/interfaces/innerkits/include/syspara/parameters.h"
|
||||
#endif
|
||||
|
||||
#ifdef PANDA_TARGET_OHOS
|
||||
#include "parameters.h"
|
||||
#endif
|
||||
@ -347,11 +343,9 @@ void EcmaVM::EnableJit()
|
||||
options_.SetEnableProfileDump(profileNeedDump);
|
||||
|
||||
GetJSThread()->SwitchJitProfileStubs();
|
||||
#ifdef JIT_SWITCH_COMPILE_MODE
|
||||
bool jitEnableLitecg = OHOS::system::GetBoolParameter("ark.jit.enable.litecg", true);
|
||||
bool jitEnableLitecg = panda::ecmascript::ohos::IsJitEnableLitecg(options_.IsCompilerEnableLiteCG());
|
||||
LOG_JIT(INFO) << "jit enable litecg: " << jitEnableLitecg;
|
||||
options_.SetCompilerEnableLiteCG(jitEnableLitecg);
|
||||
#endif
|
||||
}
|
||||
|
||||
Jit *EcmaVM::GetJit() const
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef ECMASCRIPT_JIT_TOOLS_H
|
||||
#define ECMASCRIPT_JIT_TOOLS_H
|
||||
|
||||
#ifdef JIT_ESCAPE_ENABLE
|
||||
#if defined(JIT_ESCAPE_ENABLE) || defined(JIT_SWITCH_COMPILE_MODE)
|
||||
#include "base/startup/init/interfaces/innerkits/include/syspara/parameters.h"
|
||||
#endif
|
||||
|
||||
@ -28,5 +28,13 @@ bool GetJitEscapeEanble()
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IsJitEnableLitecg(bool value)
|
||||
{
|
||||
#ifdef JIT_SWITCH_COMPILE_MODE
|
||||
return OHOS::system::GetBoolParameter("ark.jit.enable.litecg", true);
|
||||
#endif
|
||||
return value;
|
||||
}
|
||||
}
|
||||
#endif // ECMASCRIPT_JIT_TOOLS_H
|
||||
|
Loading…
Reference in New Issue
Block a user