From 5324b4debbbf4ca9e59cdc99b97aac4ec5170d7e Mon Sep 17 00:00:00 2001 From: wanghuan Date: Mon, 20 Jun 2022 19:04:49 +0800 Subject: [PATCH] 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 Change-Id: I02956ff046ff16a05ff723ab2dc866eb4cb2d64e --- ecmascript/ecma_vm.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ecmascript/ecma_vm.cpp b/ecmascript/ecma_vm.cpp index 60469a74..4655b3cf 100644 --- a/ecmascript/ecma_vm.cpp +++ b/ecmascript/ecma_vm.cpp @@ -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;