代码拉取完成,页面将自动刷新
diff --git a/ecmascript/js_runtime_options.cpp b/ecmascript/js_runtime_options.cpp
index 00169cbe2..353120f10 100644
--- a/ecmascript/js_runtime_options.cpp
+++ b/ecmascript/js_runtime_options.cpp
@@ -260,6 +260,7 @@ bool JSRuntimeOptions::ParseCommand(const int argc, const char **argv)
{"compiler-pkg-info", required_argument, nullptr, OPTION_COMPILER_PKG_INFO},
{"compiler-external-pkg-info", required_argument, nullptr, OPTION_COMPILER_EXTERNAL_PKG_INFO},
{"compiler-enable-external-pkg", required_argument, nullptr, OPTION_COMPILER_ENABLE_EXTERNAL_PKG},
+ {"compiler-framework-aot-path", required_argument, nullptr, OPTION_COMPILER_FRAMEWORK_AOT_PATH},
{"compiler-enable-lexenv-specialization",
required_argument,
nullptr,
@@ -329,7 +330,7 @@ bool JSRuntimeOptions::ParseCommand(const int argc, const char **argv)
break;
case OPTION_ARK_BUNDLENAME:
SetArkBundleName(optarg);
- break;
+ break;
case OPTION_ENABLE_ASM_INTERPRETER:
ret = ParseBoolParam(&argBool);
if (ret) {
@@ -644,7 +645,7 @@ bool JSRuntimeOptions::ParseCommand(const int argc, const char **argv)
}
break;
case OPTION_COMPILER_PGO_SAVE_MIN_INTERVAL:
- ret = ParseUint32Param("compiler-pgo-save-min-interval)", &argUint32);
+ ret = ParseUint32Param("compiler-pgo-save-min-interval", &argUint32);
if (ret) {
SetPGOSaveMinInterval(argUint32);
} else {
@@ -813,6 +814,9 @@ bool JSRuntimeOptions::ParseCommand(const int argc, const char **argv)
case OPTION_TARGET_COMPILER_MODE:
SetTargetCompilerMode(optarg);
break;
+ case OPTION_COMPILER_FRAMEWORK_AOT_PATH:
+ SetCompilerFrameworkAotPath(optarg);
+ break;
case OPTION_HAP_PATH:
SetHapPath(optarg);
break;
diff --git a/ecmascript/js_runtime_options.h b/ecmascript/js_runtime_options.h
index bef3a6c5d..b688545fc 100644
--- a/ecmascript/js_runtime_options.h
+++ b/ecmascript/js_runtime_options.h
@@ -145,6 +145,7 @@ enum CommandValues {
OPTION_COMPILER_PKG_INFO,
OPTION_COMPILER_EXTERNAL_PKG_INFO,
OPTION_COMPILER_ENABLE_EXTERNAL_PKG,
+ OPTION_COMPILER_FRAMEWORK_AOT_PATH,
OPTION_COMPILER_OPT_ARRAY_BOUNDS_CHECK_ELIMINATION,
OPTION_COMPILER_OPT_LOOP_INVARIANT_CODE_MOTION,
OPTION_COMPILER_OPT_CONSTANT_FOLDING,
@@ -1272,6 +1273,16 @@ public:
return maxInlineBytecodes_;
}
+ void SetCompilerFrameworkAotPath(std::string frameworkAotPath)
+ {
+ CompilerFrameworkAotPath_ = std::move(frameworkAotPath);
+ }
+
+ std::string GetCompilerFrameworkAotPath() const
+ {
+ return CompilerFrameworkAotPath_;
+ }
+
void SetTargetCompilerMode(std::string mode)
{
targetCompilerMode_ = std::move(mode);
@@ -1555,6 +1566,7 @@ private:
bool traceInstructionCombine_{false};
size_t maxInlineBytecodes_ {45};
std::string targetCompilerMode_ {""};
+ std::string CompilerFrameworkAotPath_ {""};
std::string hapPath_ {""};
uint32_t hapAbcOffset_ {0};
uint32_t hapAbcSize_ {0};
diff --git a/ecmascript/napi/include/jsnapi.h b/ecmascript/napi/include/jsnapi.h
index ed926d685..f14ff4c3b 100644
--- a/ecmascript/napi/include/jsnapi.h
+++ b/ecmascript/napi/include/jsnapi.h
@@ -195,6 +195,11 @@ public:
arkBundleName_ = bundleName;
}
+ void SetCompilerFrameworkAotPath(std::string frameworkAotPath)
+ {
+ CompilerFrameworkAotPath_ = std::move(frameworkAotPath);
+ }
+
void SetGcThreadNum(size_t num)
{
gcThreadNum_ = num;
@@ -375,6 +380,7 @@ private:
bool enableCpuprofiler_ {false};
int arkProperties_ {-1};
std::string arkBundleName_ = {""};
+ // std::string arkFrameworkPath_ = {""};
size_t gcThreadNum_ {DEFAULT_GC_THREAD_NUM};
size_t longPauseTime_ {DEFAULT_LONG_PAUSE_TIME};
bool enableAsmInterpreter_ {true};
diff --git a/ecmascript/ohos/tests/ohos_test.cpp b/ecmascript/ohos/tests/ohos_test.cpp
index 1bfc25d2e..fa440e4a0 100644
--- a/ecmascript/ohos/tests/ohos_test.cpp
+++ b/ecmascript/ohos/tests/ohos_test.cpp
@@ -51,6 +51,7 @@ public:
runtimeOptions_.SetAOTOutputFile("/data/local/ark-cache/com.ohos.test/arm64/phone");
runtimeOptions_.SetCompilerPkgJsonInfo(BuildOhosPkgJson("/data/local/ark-profile/100/com.ohos.test"));
runtimeOptions_.SetCompilerEnableExternalPkg(true);
+ runtimeOptions_.SetCompilerFrameworkAotPath("/etc/abc/framework");
runtimeOptions_.SetCompilerExternalPkgJsonInfo(BuildOhosExternalPkgJson());
vm_ = JSNApi::CreateEcmaVM(runtimeOptions_);
ASSERT(vm_ != nullptr);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。