diff --git a/runtime/napi/jsnapi.cpp b/runtime/napi/jsnapi.cpp index faef8f85fef553dda24dca84f8a46f82e2d90f45..b5612c644dbe4341625ebf7bc402395e3a4a7d2b 100644 --- a/runtime/napi/jsnapi.cpp +++ b/runtime/napi/jsnapi.cpp @@ -114,7 +114,6 @@ LoadableAgentHandle S_DEBUGGER_AGENT; // NOLINT(fuchsia-statically-constructed- bool JSNApi::CreateRuntime(const RuntimeOption &option) { JSRuntimeOptions runtime_options; - runtime_options.SetRuntimeType("ecmascript"); // GC runtime_options.SetGcType(option.GetGcType()); @@ -131,7 +130,6 @@ bool JSNApi::CreateRuntime(const RuntimeOption &option) // Boot runtime_options.SetBootPandaFiles({}); runtime_options.SetLoadRuntimes({"ecmascript"}); - runtime_options.SetBootIntrinsicSpaces({"ecmascript"}); // Dfx base_options::Options base_options(""); diff --git a/runtime_options.yaml b/runtime_options.yaml index 8846157e91c04461ad76a8771c5560dc5922b86e..4eddcae01bba0ee5a7fcda800bf035eb7e7b56ae 100644 --- a/runtime_options.yaml +++ b/runtime_options.yaml @@ -18,7 +18,7 @@ options: - ecmascript possible_values: - ecmascript - description: Load specified intrinsic spaces + description: Load specified intrinsic spaces. This option is for fine tuning. Use load-runtimes instead delimiter: ":" - name: boot-class-spaces @@ -28,7 +28,7 @@ options: possible_values: - core - ecmascript - description: Load specified class spaces + description: Load specified class spaces. This option is for fine tuning. Use load-runtimes instead delimiter: ":" - name: runtime-type @@ -37,7 +37,7 @@ options: possible_values: - core - ecmascript - description: Runtime type + description: Runtime type. This option is for fine tuning. Use load-runtimes instead - name: load-runtimes type: arg_list_t diff --git a/tests/runtime/common/js_arrays/CMakeLists.txt b/tests/runtime/common/js_arrays/CMakeLists.txt index 51168dc4d72997b1261342021a6d6edf22491fc1..4ebde375dba31706147507c90cd75083b0915ef7 100644 --- a/tests/runtime/common/js_arrays/CMakeLists.txt +++ b/tests/runtime/common/js_arrays/CMakeLists.txt @@ -5,7 +5,7 @@ set(JS_ARRAYS_BIN ${CMAKE_CURRENT_BINARY_DIR}/js_arrays.abc) set(JS_ARRAYS_JS ${CMAKE_CURRENT_SOURCE_DIR}/js_arrays.js) set(JS_ARRAYS_VERIFY ${CMAKE_CURRENT_SOURCE_DIR}/verify.sh) -set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --boot-class-spaces=\"ecmascript\" --compiler-enable-jit=false --gc-type=stw --run-gc-in-place --runtime-type \"ecmascript\" ${JS_ARRAYS_BIN} _GLOBAL::func_main_0) +set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --compiler-enable-jit=false --gc-type=stw --run-gc-in-place --load-runtimes \"ecmascript\" ${JS_ARRAYS_BIN} _GLOBAL::func_main_0) add_custom_command( OUTPUT ${JS_ARRAYS_OUTPUT} diff --git a/tests/runtime/common/js_serializer_test.cpp b/tests/runtime/common/js_serializer_test.cpp index b9af24f5d83c8ce1576d31117c1ad8c32ccf386a..960613dd6cedd17d892280cf84c43477861a223a 100644 --- a/tests/runtime/common/js_serializer_test.cpp +++ b/tests/runtime/common/js_serializer_test.cpp @@ -43,9 +43,7 @@ public: JSRuntimeOptions options; options.SetShouldLoadBootPandaFiles(false); options.SetShouldInitializeIntrinsics(false); - options.SetBootIntrinsicSpaces({"ecmascript"}); - options.SetBootClassSpaces({"ecmascript"}); - options.SetRuntimeType("ecmascript"); + options.SetLoadRuntimes({"ecmascript"}); ecmaVm = EcmaVM::Create(options); EXPECT_TRUE(ecmaVm != nullptr) << "Cannot create Runtime"; thread = ecmaVm->GetJSThread(); diff --git a/tests/runtime/common/js_typed_arrays/CMakeLists.txt b/tests/runtime/common/js_typed_arrays/CMakeLists.txt index 5528ad5302ed55f8cc6e75b8350c3e9e7f8305de..d95bcc6eba047aeb5d1dfed1d80c726422ced271 100644 --- a/tests/runtime/common/js_typed_arrays/CMakeLists.txt +++ b/tests/runtime/common/js_typed_arrays/CMakeLists.txt @@ -5,7 +5,7 @@ set(JS_TYPED_ARRAYS_BIN ${CMAKE_CURRENT_BINARY_DIR}/js_typed_arrays.abc) set(JS_TYPED_ARRAYS_JS ${CMAKE_CURRENT_SOURCE_DIR}/js_typed_arrays.js) set(JS_TYPED_ARRAYS_VERIFY ${CMAKE_CURRENT_SOURCE_DIR}/verify.sh) -set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --boot-class-spaces=\"ecmascript\" --compiler-enable-jit=false --run-gc-in-place --runtime-type \"ecmascript\" ${JS_TYPED_ARRAYS_BIN} _GLOBAL::func_main_0) +set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --compiler-enable-jit=false --run-gc-in-place --load-runtimes \"ecmascript\" ${JS_TYPED_ARRAYS_BIN} _GLOBAL::func_main_0) add_custom_command( OUTPUT ${JS_TYPED_ARRAYS_OUTPUT} diff --git a/tests/runtime/common/recursive_array/CMakeLists.txt b/tests/runtime/common/recursive_array/CMakeLists.txt index 23407cfa2fb43e5d495719dadb573ac881b74033..684a7164a2771eda5a0738d1cc4f545b999fb348 100644 --- a/tests/runtime/common/recursive_array/CMakeLists.txt +++ b/tests/runtime/common/recursive_array/CMakeLists.txt @@ -5,7 +5,7 @@ set(RECURSIVE_ARRAY_BIN ${CMAKE_CURRENT_BINARY_DIR}/recursive_array.abc) set(RECURSIVE_ARRAY_JS ${CMAKE_CURRENT_SOURCE_DIR}/recursive_array.js) set(RECURSIVE_ARRAY_VERIFY ${CMAKE_CURRENT_SOURCE_DIR}/verify.sh) -set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --boot-class-spaces=\"ecmascript\" --compiler-enable-jit=false --run-gc-in-place --runtime-type \"ecmascript\" ${RECURSIVE_ARRAY_BIN} _GLOBAL::func_main_0) +set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --compiler-enable-jit=false --run-gc-in-place --load-runtimes \"ecmascript\" ${RECURSIVE_ARRAY_BIN} _GLOBAL::func_main_0) add_custom_command( OUTPUT ${RECURSIVE_ARRAY_OUTPUT} diff --git a/tests/runtime/common/restargs/CMakeLists.txt b/tests/runtime/common/restargs/CMakeLists.txt index 6a5b3ebb3fc14e95eb73c5b65579306b50ac6e4b..6fe8a39e8bd2b8838595106f25eb29f2dc3322ec 100644 --- a/tests/runtime/common/restargs/CMakeLists.txt +++ b/tests/runtime/common/restargs/CMakeLists.txt @@ -5,7 +5,7 @@ set(RESTARGS_BIN ${CMAKE_CURRENT_BINARY_DIR}/restargs.abc) set(RESTARGS_JS ${CMAKE_CURRENT_SOURCE_DIR}/restargs.js) set(RESTARGS_VERIFY ${CMAKE_CURRENT_SOURCE_DIR}/verify.sh) -set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --boot-class-spaces=\"ecmascript\" --compiler-enable-jit=false --runtime-type \"ecmascript\" ${RESTARGS_BIN} _GLOBAL::func_main_0) +set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --compiler-enable-jit=false --load-runtimes \"ecmascript\" ${RESTARGS_BIN} _GLOBAL::func_main_0) add_custom_command( OUTPUT ${RESTARGS_OUTPUT} diff --git a/tests/runtime/common/separate_jsvm_test.cpp b/tests/runtime/common/separate_jsvm_test.cpp index 0b8aa369d1bd91a0a1bf159ec1e305698265dec3..89b17215d7d9a98af4327592ccb3e32b04087314 100644 --- a/tests/runtime/common/separate_jsvm_test.cpp +++ b/tests/runtime/common/separate_jsvm_test.cpp @@ -34,11 +34,11 @@ public: static void SetUpTestCase() { RuntimeOptions options; - options.SetLoadRuntimes({"core", "ecmascript"}); + options.SetBootClassSpaces({"core", "ecmascript"}); + options.SetBootIntrinsicSpaces({"ecmascript"}); options.SetRuntimeType("core"); options.SetBootPandaFiles({}); options.SetShouldLoadBootPandaFiles(false); - options.SetBootIntrinsicSpaces({"ecmascript"}); options.SetRunGcInPlace(true); options.SetGcType("g1-gc"); [[maybe_unused]] bool success = Runtime::Create(options); diff --git a/tests/runtime/common/spread_primitives/CMakeLists.txt b/tests/runtime/common/spread_primitives/CMakeLists.txt index a6708241902a458007bc7bb0d2f9ca970478d0a6..519d3c2226d29e0cd42742b7373b72fc4a85efae 100644 --- a/tests/runtime/common/spread_primitives/CMakeLists.txt +++ b/tests/runtime/common/spread_primitives/CMakeLists.txt @@ -5,7 +5,7 @@ set(SPREAD_PRIMITIVES_BIN ${CMAKE_CURRENT_BINARY_DIR}/spread_primitives.abc) set(SPREAD_PRIMITIVES_JS ${CMAKE_CURRENT_SOURCE_DIR}/spread_primitives.js) set(SPREAD_PRIMITIVES_VERIFY ${CMAKE_CURRENT_SOURCE_DIR}/verify.sh) -set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --boot-class-spaces=\"ecmascript\" --compiler-enable-jit=false --run-gc-in-place --runtime-type \"ecmascript\" ${SPREAD_PRIMITIVES_BIN} _GLOBAL::func_main_0) +set(RUNTIME_ARGUMENTS --boot-panda-files=${CMAKE_BINARY_DIR}/pandastdlib/arkstdlib.abc --compiler-enable-jit=false --run-gc-in-place --load-runtimes \"ecmascript\" ${SPREAD_PRIMITIVES_BIN} _GLOBAL::func_main_0) add_custom_command( OUTPUT ${SPREAD_PRIMITIVES_OUTPUT} diff --git a/tests/runtime/mem/g1gc_barrier_test.cpp b/tests/runtime/mem/g1gc_barrier_test.cpp index 12c7d72714a88c9882a0f24b7ef746b7ebb35c64..af01683df6c8f09d07095e5bf72e6e52bfb41f4b 100644 --- a/tests/runtime/mem/g1gc_barrier_test.cpp +++ b/tests/runtime/mem/g1gc_barrier_test.cpp @@ -21,8 +21,7 @@ public: explicit G1GCBarrierTest(size_t promotion_region_alive_rate = 100) { RuntimeOptions options; - options.SetBootClassSpaces({"ecmascript"}); - options.SetRuntimeType("ecmascript"); + options.SetLoadRuntimes({"ecmascript"}); options.SetGcType("g1-gc"); options.SetRunGcInPlace(true); options.SetCompilerEnableJit(false); @@ -124,8 +123,7 @@ public: G1GCClassCollectionTest() { RuntimeOptions options; - options.SetBootClassSpaces({"ecmascript"}); - options.SetRuntimeType("ecmascript"); + options.SetLoadRuntimes({"ecmascript"}); options.SetGcType("g1-gc"); options.SetRunGcInPlace(true); options.SetG1TrackFreedObjects(GetParam() ? "true" : "false"); diff --git a/tests/runtime/mem/object_helpers_test.cpp b/tests/runtime/mem/object_helpers_test.cpp index a2a37d2d0df4a96ac20304485033b359947d7697..cc5c9227adcfabf3c8000fd7657a067bb6c462ee 100644 --- a/tests/runtime/mem/object_helpers_test.cpp +++ b/tests/runtime/mem/object_helpers_test.cpp @@ -28,8 +28,7 @@ public: DynamicObjectHelpersTest() { RuntimeOptions options; - options.SetBootClassSpaces({"ecmascript"}); - options.SetRuntimeType("ecmascript"); + options.SetLoadRuntimes({"ecmascript"}); options.SetGcType("epsilon"); options.SetGcTriggerType("debug-never"); auto exec_path = panda::os::file::File::GetExecutablePath();