mirror of
https://github.com/openharmony/ark_js_runtime.git
synced 2026-08-27 02:31:17 -04:00
asm interp compatible with windows
desc: asm interp compatible with windows solu: disable asm interp in windows by use macro issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5D6Q5 Signed-off-by: wanghuan <wanghuan80@huawei.com> Change-Id: I02956ff046ff16a05ff723ab2dc866eb4cb2d64e
This commit is contained in:
@@ -79,7 +79,12 @@ namespace panda::ecmascript {
|
||||
/* static */
|
||||
EcmaVM *EcmaVM::Create(const JSRuntimeOptions &options, EcmaParamConfiguration &config)
|
||||
{
|
||||
auto vm = new EcmaVM(options, config);
|
||||
JSRuntimeOptions newOptions = options;
|
||||
// windows or mac disable asm interpreter and use c interpreter
|
||||
#if defined(PANDA_TARGET_WINDOWS) || defined(PANDA_TARGET_MACOS)
|
||||
newOptions.SetEnableAsmInterpreter(false);
|
||||
#endif
|
||||
auto vm = new EcmaVM(newOptions, config);
|
||||
if (UNLIKELY(vm == nullptr)) {
|
||||
LOG_ECMA(ERROR) << "Failed to create jsvm";
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user