diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index e9f0eb1c91b3bcb50231829f24a064d68b065f62..315d8a056fee7b6ded5e3bd5d24b34cda7022779 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -228,7 +228,7 @@ panda_target_include_directories(arkruntime_obj PUBLIC ${ECMA_GEN_DIR} ) -panda_target_link_libraries(arkruntime_obj es2panda-lib arkassembler) +panda_target_link_libraries(arkruntime_obj es2panda-public arkassembler) set(RUNTIME_TEMPLATES intrinsics_gen.cpp.erb diff --git a/runtime/js_eval.cpp b/runtime/js_eval.cpp index 568df253940a10a55ba4d90b6c5512b2aeb71031..9104fd27fbabc9eea2c4cea1d5caac337c460f92 100644 --- a/runtime/js_eval.cpp +++ b/runtime/js_eval.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,6 +21,7 @@ #include "plugins/ecmascript/runtime/interpreter/interpreter-inl.h" #include "es2panda.h" #include "assembler/assembly-emitter.h" +#include "util/options.h" namespace ark::ecmascript { JSTaggedValue EvalUtils::GetEvaluatedScript(JSThread *thread, const JSHandle &str, @@ -30,7 +31,9 @@ JSTaggedValue EvalUtils::GetEvaluatedScript(JSThread *thread, const JSHandle program(compiler.Compile(input, options, parserStatus)); + auto fullOptions = es2panda::util::Options {}; + fullOptions.SetCompilerOptions(options); + std::unique_ptr program {compiler.Compile(input, fullOptions, parserStatus)}; ObjectFactory *objectFactory = thread->GetEcmaVM()->GetFactory(); if (!program) {