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:
wanghuan
2022-06-20 19:04:49 +08:00
parent 63ed734dd7
commit 5324b4debb
+6 -1
View File
@@ -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;