From e64122e20073b5e3e916674e8d76ce0211be033b Mon Sep 17 00:00:00 2001 From: wengchangcheng Date: Fri, 25 Mar 2022 09:31:39 +0800 Subject: [PATCH] add -Werror -Wextra gn flag for 'compiler' 1. ignore llvm warning 2. fix warning of compiler module issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZHER Signed-off-by: wengchangcheng Change-Id: I09774e431743a26ea366ed28e3276ff027ae0d31 --- BUILD.gn | 41 +-- ecmascript/base/tests/BUILD.gn | 40 +- ecmascript/builtins/tests/BUILD.gn | 216 ++--------- .../compiler/bytecode_circuit_builder.cpp | 2 +- ecmascript/compiler/call_signature.cpp | 18 +- ecmascript/compiler/common_stubs.cpp | 12 +- ecmascript/compiler/gate.cpp | 2 +- ecmascript/compiler/interpreter_stub.cpp | 16 +- ecmascript/compiler/llvm_codegen.cpp | 23 +- ecmascript/compiler/llvm_codegen.h | 21 +- ecmascript/compiler/llvm_ir_builder.cpp | 25 +- ecmascript/compiler/stub-inl.h | 2 +- ecmascript/compiler/stub.cpp | 11 +- ecmascript/compiler/stub.h | 2 +- ecmascript/compiler/tests/stub_tests.cpp | 5 +- ecmascript/containers/tests/BUILD.gn | 16 +- ecmascript/dfx/hprof/tests/BUILD.gn | 16 +- ecmascript/global_env_constants.cpp | 6 + ecmascript/ic/tests/BUILD.gn | 40 +- ecmascript/jobs/tests/BUILD.gn | 16 +- ecmascript/js_typed_array.cpp | 2 +- ecmascript/js_typed_array.h | 2 +- ecmascript/napi/test/BUILD.gn | 8 +- ecmascript/regexp/tests/BUILD.gn | 16 +- ecmascript/snapshot/tests/BUILD.gn | 8 +- ecmascript/tests/BUILD.gn | 344 +++--------------- ecmascript/tests/dump_test.cpp | 6 +- ecmascript/tests/js_array_iterator_test.cpp | 12 +- ecmascript/tests/js_typed_array_test.cpp | 36 +- ecmascript/tooling/BUILD.gn | 27 +- ecmascript/tooling/test/BUILD.gn | 75 +--- ecmascript/ts_types/tests/BUILD.gn | 8 +- .../BUILD.gn | 7 +- test/fuzztest/ark_Execute_fuzzer/BUILD.gn | 7 +- .../ark_InitializeDebugger_fuzzer/BUILD.gn | 7 +- test/resource/js_runtime/ohos_test.xml | 10 +- 36 files changed, 277 insertions(+), 828 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 1b07797c29..23f55c0da1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -136,8 +136,8 @@ source_set("libark_js_intl_static") { sources = intl_sources public_configs = [ - ":ark_jsruntime_public_config", - ":ark_jsruntime_common_config", + "//ark/js_runtime:ark_jsruntime_common_config", + "//ark/js_runtime:ark_jsruntime_public_config", "$ark_root/runtime:arkruntime_public_config", ] @@ -152,23 +152,16 @@ source_set("libark_js_intl_static") { } config("ark_jsruntime_compiler_config") { - configs = [ "//ark/js_runtime:ark_jsruntime_base_config" ] + configs = [ "//ark/js_runtime:ark_jsruntime_common_config" ] } config("ark_jsruntime_common_config") { - configs = [ "//ark/js_runtime:ark_jsruntime_base_config" ] - + defines = [ "PANDA_ENABLE_LTO" ] cflags_cc = [ + "-Wall", "-Wshadow", "-Werror", "-Wextra", - ] -} - -config("ark_jsruntime_base_config") { - defines = [ "PANDA_ENABLE_LTO" ] - cflags_cc = [ - "-Wall", "-pedantic", "-Wno-invalid-offsetof", "-Wno-gnu-statement-expression", @@ -283,6 +276,13 @@ config("ark_jsruntime_base_config") { config("ecma_test_config") { visibility = [ ":*" ] + configs = [ + "//ark/js_runtime:ark_jsruntime_public_config", # should add before + # arkruntime_public_config + "//ark/js_runtime:ark_jsruntime_common_config", + "$ark_root/runtime:arkruntime_public_config", + ] + ldflags = [ "-Wl,-rpath=\$ORIGIN/" ] } @@ -506,9 +506,8 @@ source_set("libark_jsruntime_static") { sources += ecma_debugger_source public_configs = [ - ":ark_jsruntime_public_config", # should add before - # arkruntime_public_config - ":ark_jsruntime_common_config", + "//ark/js_runtime:ark_jsruntime_common_config", + "//ark/js_runtime:ark_jsruntime_public_config", "$ark_root/runtime:arkruntime_public_config", ] @@ -548,8 +547,6 @@ ohos_shared_library("libark_jsruntime") { } } - configs = [ ":ark_jsruntime_common_config" ] - install_enable = true part_name = "ark_js_runtime" @@ -583,18 +580,16 @@ source_set("libark_jsruntime_test_static") { } public_configs = [ - ":ark_jsruntime_public_config", # should add before - # arkruntime_public_config - ":ark_jsruntime_common_config", + "//ark/js_runtime:ark_jsruntime_common_config", + "//ark/js_runtime:ark_jsruntime_public_config", "$ark_root/runtime:arkruntime_public_config", ] } ohos_shared_library("libark_jsruntime_test") { configs = [ - ":ark_jsruntime_public_config", # should add before - # arkruntime_public_config - ":ark_jsruntime_common_config", + "//ark/js_runtime:ark_jsruntime_common_config", + "//ark/js_runtime:ark_jsruntime_public_config", "$ark_root/runtime:arkruntime_public_config", ] diff --git a/ecmascript/base/tests/BUILD.gn b/ecmascript/base/tests/BUILD.gn index 09e6bdc8d2..cf5d0fdda6 100644 --- a/ecmascript/base/tests/BUILD.gn +++ b/ecmascript/base/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("ArrayHelperTest") { "array_helper_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -52,13 +46,7 @@ host_unittest_action("BuiltinsBaseTest") { "builtins_base_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -79,13 +67,7 @@ host_unittest_action("GCRingBufferTest") { "gc_ring_buffer_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -106,13 +88,7 @@ host_unittest_action("JsonParserTest") { "json_parser_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -133,13 +109,7 @@ host_unittest_action("JsonStringifierTest") { "json_stringifier_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/builtins/tests/BUILD.gn b/ecmascript/builtins/tests/BUILD.gn index 931d0f6182..e6fc6ed7b0 100755 --- a/ecmascript/builtins/tests/BUILD.gn +++ b/ecmascript/builtins/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("BuiltinsArraybufferTest") { "builtins_arraybuffer_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -52,13 +46,7 @@ host_unittest_action("BuiltinsArrayTest") { "builtins_array_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -79,13 +67,7 @@ host_unittest_action("BuiltinsBigIntTest") { "builtins_bigint_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -106,13 +88,7 @@ host_unittest_action("BuiltinsBooleanTest") { "builtins_boolean_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -133,13 +109,7 @@ host_unittest_action("BuiltinsCollatorTest") { "builtins_collator_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -160,13 +130,7 @@ host_unittest_action("BuiltinsDataviewTest") { "builtins_dataview_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -187,13 +151,7 @@ host_unittest_action("BuiltinsDateTest") { "builtins_date_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -214,13 +172,7 @@ host_unittest_action("BuiltinsErrorsTest") { "builtins_errors_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -241,13 +193,7 @@ host_unittest_action("BuiltinsFunctionTest") { "builtins_function_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -268,13 +214,7 @@ host_unittest_action("BuiltinsIntlTest") { "builtins_intl_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -295,13 +235,7 @@ host_unittest_action("BuiltinsIteratorTest") { "builtins_iterator_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -322,13 +256,7 @@ host_unittest_action("BuiltinsJsonTest") { "builtins_json_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -349,13 +277,7 @@ host_unittest_action("BuiltinsLocaleTest") { "builtins_locale_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -376,13 +298,7 @@ host_unittest_action("BuiltinsMapTest") { "builtins_map_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -403,13 +319,7 @@ host_unittest_action("BuiltinsMathTest") { "builtins_math_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -430,13 +340,7 @@ host_unittest_action("BuiltinsNumberTest") { "builtins_number_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -457,13 +361,7 @@ host_unittest_action("BuiltinsObjectTest") { "builtins_object_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -484,13 +382,7 @@ host_unittest_action("BuiltinsPromiseTest") { "builtins_promise_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -511,13 +403,7 @@ host_unittest_action("BuiltinsProxyTest") { "builtins_proxy_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -538,13 +424,7 @@ host_unittest_action("BuiltinsReflectTest") { "builtins_reflect_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -565,13 +445,7 @@ host_unittest_action("BuiltinsRegexpTest") { "builtins_regexp_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -592,13 +466,7 @@ host_unittest_action("BuiltinsSetTest") { "builtins_set_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -646,13 +514,7 @@ host_unittest_action("BuiltinsStringTest") { "builtins_string_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -673,13 +535,7 @@ host_unittest_action("BuiltinsSymbolTest") { "builtins_symbol_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -700,13 +556,7 @@ host_unittest_action("BuiltinsTypedarrayTest") { "builtins_typedarray_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -727,13 +577,7 @@ host_unittest_action("BuiltinsWeakMapTest") { "builtins_weak_map_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", "//ark/js_runtime:libark_jsruntime_test", @@ -753,13 +597,7 @@ host_unittest_action("BuiltinsWeakSetTest") { "builtins_weak_set_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/compiler/bytecode_circuit_builder.cpp b/ecmascript/compiler/bytecode_circuit_builder.cpp index fef236853d..6d361ecf94 100644 --- a/ecmascript/compiler/bytecode_circuit_builder.cpp +++ b/ecmascript/compiler/bytecode_circuit_builder.cpp @@ -308,7 +308,7 @@ void BytecodeCircuitBuilder::CompleteBytecodeBlockInfo(std::map, std::vector> &exception, std::vector &bytecodeBlockInfo, - std::map &byteCodeCurPrePc) + [[maybe_unused]] std::map &byteCodeCurPrePc) { std::map startPcToBB; // [start, bb] std::map endPcToBB; // [end, bb] diff --git a/ecmascript/compiler/call_signature.cpp b/ecmascript/compiler/call_signature.cpp index 6c4328a9a2..cdec30ff07 100644 --- a/ecmascript/compiler/call_signature.cpp +++ b/ecmascript/compiler/call_signature.cpp @@ -15,13 +15,29 @@ #include "ecmascript/compiler/call_signature.h" +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wshadow" +#pragma clang diagnostic ignored "-Wunused-parameter" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + #include "llvm-c/Core.h" #include "llvm/Support/Host.h" +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + namespace panda::ecmascript::kungfu { // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) #define DEF_CALL_SIGNATURE(name) \ - void name##CallSignature::Initialize(CallSignature *callSign) + void name##CallSignature::Initialize([[maybe_unused]] CallSignature *callSign) DEF_CALL_SIGNATURE(Add) { diff --git a/ecmascript/compiler/common_stubs.cpp b/ecmascript/compiler/common_stubs.cpp index 2501716942..80cdd21c5a 100644 --- a/ecmascript/compiler/common_stubs.cpp +++ b/ecmascript/compiler/common_stubs.cpp @@ -252,10 +252,10 @@ void GetPropertyByValueStub::GenerateCircuit(const CompilationConfig *cfg) } Bind(¬ValidIndex); { - Label notNumber(env); + Label notNumber1(env); Label getByName(env); - Branch(TaggedIsNumber(*key), &exit, ¬Number); - Bind(¬Number); + Branch(TaggedIsNumber(*key), &exit, ¬Number1); + Bind(¬Number1); { Label isString(env); Label notString(env); @@ -325,10 +325,10 @@ void SetPropertyByValueStub::GenerateCircuit(const CompilationConfig *cfg) } Bind(¬ValidIndex); { - Label notNumber(env); + Label notNumber1(env); Label getByName(env); - Branch(TaggedIsNumber(*key), &exit, ¬Number); - Bind(¬Number); + Branch(TaggedIsNumber(*key), &exit, ¬Number1); + Bind(¬Number1); { Label isString(env); Label notString(env); diff --git a/ecmascript/compiler/gate.cpp b/ecmascript/compiler/gate.cpp index 0001e140f2..fa058049fc 100644 --- a/ecmascript/compiler/gate.cpp +++ b/ecmascript/compiler/gate.cpp @@ -317,7 +317,7 @@ size_t OpCode::GetInValueCount(BitField bitfield) const return valueProp.has_value() ? (valueProp->second ? bitfield : valueProp->first.size()) : 0; } -size_t OpCode::GetRootCount(BitField bitfield) const +size_t OpCode::GetRootCount([[maybe_unused]] BitField bitfield) const { auto properties = GetProperties(); auto rootProp = properties.root; diff --git a/ecmascript/compiler/interpreter_stub.cpp b/ecmascript/compiler/interpreter_stub.cpp index 7678d8196f..c1a16aeaf7 100644 --- a/ecmascript/compiler/interpreter_stub.cpp +++ b/ecmascript/compiler/interpreter_stub.cpp @@ -467,8 +467,8 @@ DECLARE_ASM_HANDLER(HandleDefineNCFuncDynPrefId16Imm16V8) GateRef hClass = LoadHClass(*result); SetPropertyInlinedProps(glue, *result, hClass, Int16BuildTaggedWithNoGC(length), GetInt32Constant(JSFunction::LENGTH_INLINE_PROPERTY_INDEX), VariableType::INT64()); - GateRef env = GetVregValue(sp, ZExtInt8ToPtr(v0)); - SetLexicalEnvToFunction(glue, *result, env); + GateRef lexEnv = GetVregValue(sp, ZExtInt8ToPtr(v0)); + SetLexicalEnvToFunction(glue, *result, lexEnv); SetHomeObjectToFunction(glue, *result, acc); GateRef currentFunc = GetFunctionFromFrame(GetFrame(sp)); SetModuleToFunction(glue, *result, GetModuleFromFunction(currentFunc)); @@ -518,8 +518,8 @@ DECLARE_ASM_HANDLER(HandleDefineGeneratorFuncPrefId16Imm16V8) GateRef hClass = LoadHClass(*result); SetPropertyInlinedProps(glue, *result, hClass, Int16BuildTaggedWithNoGC(length), GetInt32Constant(JSFunction::LENGTH_INLINE_PROPERTY_INDEX), VariableType::INT64()); - GateRef env = GetVregValue(sp, ZExtInt8ToPtr(v0)); - SetLexicalEnvToFunction(glue, *result, env); + GateRef lexEnv = GetVregValue(sp, ZExtInt8ToPtr(v0)); + SetLexicalEnvToFunction(glue, *result, lexEnv); GateRef currentFunc = GetFunctionFromFrame(GetFrame(sp)); SetModuleToFunction(glue, *result, GetModuleFromFunction(currentFunc)); varAcc = *result; @@ -568,8 +568,8 @@ DECLARE_ASM_HANDLER(HandleDefineAsyncFuncPrefId16Imm16V8) GateRef hClass = LoadHClass(*result); SetPropertyInlinedProps(glue, *result, hClass, Int16BuildTaggedWithNoGC(length), GetInt32Constant(JSFunction::LENGTH_INLINE_PROPERTY_INDEX), VariableType::INT64()); - GateRef env = GetVregValue(sp, ZExtInt8ToPtr(v0)); - SetLexicalEnvToFunction(glue, *result, env); + GateRef lexEnv = GetVregValue(sp, ZExtInt8ToPtr(v0)); + SetLexicalEnvToFunction(glue, *result, lexEnv); GateRef currentFunc = GetFunctionFromFrame(GetFrame(sp)); SetModuleToFunction(glue, *result, GetModuleFromFunction(currentFunc)); varAcc = *result; @@ -619,8 +619,8 @@ DECLARE_ASM_HANDLER(HandleDefineMethodPrefId16Imm16V8) GateRef hClass = LoadHClass(*result); SetPropertyInlinedProps(glue, *result, hClass, Int16BuildTaggedWithNoGC(length), GetInt32Constant(JSFunction::LENGTH_INLINE_PROPERTY_INDEX), VariableType::INT64()); - GateRef env = GetVregValue(sp, ZExtInt8ToPtr(v0)); - SetLexicalEnvToFunction(glue, *result, env); + GateRef lexEnv = GetVregValue(sp, ZExtInt8ToPtr(v0)); + SetLexicalEnvToFunction(glue, *result, lexEnv); GateRef currentFunc = GetFunctionFromFrame(GetFrame(sp)); SetModuleToFunction(glue, *result, GetModuleFromFunction(currentFunc)); varAcc = *result; diff --git a/ecmascript/compiler/llvm_codegen.cpp b/ecmascript/compiler/llvm_codegen.cpp index 29630c5a48..858e6c351a 100644 --- a/ecmascript/compiler/llvm_codegen.cpp +++ b/ecmascript/compiler/llvm_codegen.cpp @@ -14,12 +14,26 @@ */ #include "llvm_codegen.h" + #include #include + +#include "ecmascript/compiler/call_signature.h" #include "ecmascript/compiler/compiler_macros.h" #include "ecmascript/compiler/stub-inl.h" #include "ecmascript/ecma_macros.h" #include "ecmascript/object_factory.h" + +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wshadow" +#pragma clang diagnostic ignored "-Wunused-parameter" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + #include "llvm-c/Analysis.h" #include "llvm-c/Core.h" #include "llvm-c/Disassembler.h" @@ -50,7 +64,12 @@ #include "llvm/Support/TargetSelect.h" #include "llvm/Transforms/Scalar.h" #include "llvm/llvm_stackmap_parser.h" -#include "call_signature.h" + +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif using namespace panda::ecmascript; namespace panda::ecmascript::kungfu { @@ -241,7 +260,7 @@ static const char *SymbolLookupCallback([[maybe_unused]] void *disInfo, [[maybe_ } #endif -void LLVMAssembler::Disassemble(const std::map &addr2name) const +void LLVMAssembler::Disassemble([[maybe_unused]] const std::map &addr2name) const { #if ECMASCRIPT_ENABLE_COMPILER_LOG LLVMDisasmContextRef dcr = LLVMCreateDisasm(LLVMGetTarget(module_), nullptr, 0, nullptr, SymbolLookupCallback); diff --git a/ecmascript/compiler/llvm_codegen.h b/ecmascript/compiler/llvm_codegen.h index b896295716..dd838679c5 100644 --- a/ecmascript/compiler/llvm_codegen.h +++ b/ecmascript/compiler/llvm_codegen.h @@ -26,6 +26,17 @@ #include "ecmascript/ecma_macros.h" #include "ecmascript/js_thread.h" #include "llvm_ir_builder.h" + +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wshadow" +#pragma clang diagnostic ignored "-Wunused-parameter" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + #include "llvm-c/Analysis.h" #include "llvm-c/Core.h" #include "llvm-c/ExecutionEngine.h" @@ -34,11 +45,17 @@ #include "llvm-c/Transforms/Scalar.h" #include "llvm-c/Types.h" #include "llvm/ExecutionEngine/Interpreter.h" -#include "llvm/ExecutionEngine/MCJIT.h" -#include "llvm/ExecutionEngine/SectionMemoryManager.h" #include "llvm/IR/Instructions.h" +#include "llvm/ExecutionEngine/SectionMemoryManager.h" +#include "llvm/ExecutionEngine/MCJIT.h" #include "llvm/Support/Host.h" +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + namespace panda::ecmascript::kungfu { struct CodeInfo { using ByteBuffer = std::vector; diff --git a/ecmascript/compiler/llvm_ir_builder.cpp b/ecmascript/compiler/llvm_ir_builder.cpp index b2806e8351..4fa2d90c41 100644 --- a/ecmascript/compiler/llvm_ir_builder.cpp +++ b/ecmascript/compiler/llvm_ir_builder.cpp @@ -29,7 +29,25 @@ #include "ecmascript/frames.h" #include "ecmascript/js_thread.h" #include "ecmascript/js_method.h" + +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wshadow" +#pragma clang diagnostic ignored "-Wunused-parameter" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + #include "llvm/IR/Instructions.h" + +#if defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + #include "llvm/Support/Host.h" #include "securec.h" #include "utils/logger.h" @@ -287,7 +305,7 @@ LLVMTFBuilderBasicBlockImpl *LLVMIRBuilder::EnsureBasicBlockImpl(BasicBlock *bb) return bb->GetImpl(); } -void LLVMIRBuilder::GenPrologue(LLVMModuleRef &module, LLVMBuilderRef &builder) +void LLVMIRBuilder::GenPrologue([[maybe_unused]] LLVMModuleRef &module, LLVMBuilderRef &builder) { /* current frame for x86_64 system: for optimized entry frame @@ -377,7 +395,7 @@ LLVMValueRef LLVMIRBuilder::CallingFp(LLVMModuleRef &module, LLVMBuilderRef &bui return fAddrRet; } -LLVMValueRef LLVMIRBuilder::ReadRegister(LLVMModuleRef &module, LLVMBuilderRef &builder, +LLVMValueRef LLVMIRBuilder::ReadRegister(LLVMModuleRef &module, [[maybe_unused]] LLVMBuilderRef &builder, LLVMMetadataRef meta) { std::vector args = {LLVMMetadataAsValue(context_, meta)}; @@ -1154,7 +1172,7 @@ LLVMValueRef LLVMIRBuilder::PointerAdd(LLVMValueRef baseAddr, LLVMValueRef offse return result; } -LLVMValueRef LLVMIRBuilder::VectorAdd(LLVMValueRef baseAddr, LLVMValueRef offset, LLVMTypeRef rep) +LLVMValueRef LLVMIRBuilder::VectorAdd(LLVMValueRef baseAddr, LLVMValueRef offset, [[maybe_unused]] LLVMTypeRef rep) { LLVMValueRef ptr = CanonicalizeToPtr(baseAddr); LLVMValueRef dstRef8 = LLVMBuildGEP(builder_, ptr, &offset, 1, ""); @@ -1844,7 +1862,6 @@ LLVMTypeRef LLVMModule::GetFuncType(const CallSignature *stubDescriptor) } for (int i = 1; i < paramCount; i++) { - auto paramsType = stubDescriptor->GetParametersType(); paramTys.push_back(ConvertLLVMTypeFromVariableType(paramsType[i])); } auto functype = LLVMFunctionType(returnType, paramTys.data(), paramCount + extraParameterCnt, diff --git a/ecmascript/compiler/stub-inl.h b/ecmascript/compiler/stub-inl.h index c0e61b04cf..825a7c1720 100644 --- a/ecmascript/compiler/stub-inl.h +++ b/ecmascript/compiler/stub-inl.h @@ -1965,7 +1965,7 @@ inline GateRef Stub::ObjectAddressToRange(GateRef x) return IntPtrAnd(TaggedCastToIntPtr(x), GetIntPtrConstant(~panda::ecmascript::DEFAULT_REGION_MASK)); } -inline GateRef Stub::InYoungGeneration(GateRef glue, GateRef region) +inline GateRef Stub::InYoungGeneration(GateRef region) { auto offset = env_.Is32Bit() ? Region::REGION_FLAG_OFFSET_32 : Region::REGION_FLAG_OFFSET_64; GateRef x = Load(VariableType::POINTER(), IntPtrAdd(GetIntPtrConstant(offset), region), diff --git a/ecmascript/compiler/stub.cpp b/ecmascript/compiler/stub.cpp index ad64e6e221..d2b5dbc916 100644 --- a/ecmascript/compiler/stub.cpp +++ b/ecmascript/compiler/stub.cpp @@ -1138,7 +1138,6 @@ void Stub::SetValueWithBarrier(GateRef glue, GateRef obj, GateRef offset, GateRe Label isHeapObject(env); Label isVailedIndex(env); Label notValidIndex(env); - Label marking(env); Branch(TaggedIsHeapObject(value), &isHeapObject, &exit); Bind(&isHeapObject); @@ -1146,8 +1145,8 @@ void Stub::SetValueWithBarrier(GateRef glue, GateRef obj, GateRef offset, GateRe GateRef objectRegion = ObjectAddressToRange(obj); GateRef valueRegion = ObjectAddressToRange(value); GateRef slotAddr = IntPtrAdd(TaggedCastToIntPtr(obj), offset); - GateRef objectNotInYoung = BoolNot(InYoungGeneration(glue, objectRegion)); - GateRef valueRegionInYoung = InYoungGeneration(glue, valueRegion); + GateRef objectNotInYoung = BoolNot(InYoungGeneration(objectRegion)); + GateRef valueRegionInYoung = InYoungGeneration(valueRegion); Branch(BoolAnd(objectNotInYoung, valueRegionInYoung), &isVailedIndex, ¬ValidIndex); Bind(&isVailedIndex); { @@ -3431,8 +3430,6 @@ GateRef Stub::FastBinaryOp(GateRef left, GateRef right, Label doIntOp(env); Label leftIsNumber(env); Label rightIsNumber(env); - Label leftIsInt(env); - Label leftIsDouble(env); Label leftIsIntRightIsDouble(env); Label rightIsInt(env); Label rightIsDouble(env); @@ -3508,8 +3505,8 @@ GateRef Stub::FastAddSubAndMul(GateRef left, GateRef right) { auto doubleLeft = ChangeInt32ToFloat64(TaggedCastToInt32(left)); auto doubleRight = ChangeInt32ToFloat64(TaggedCastToInt32(right)); - auto res = BinaryOp(doubleLeft, doubleRight); - result = DoubleBuildTaggedWithNoGC(res); + auto ret = BinaryOp(doubleLeft, doubleRight); + result = DoubleBuildTaggedWithNoGC(ret); Jump(&exit); } Bind(¬Overflow); diff --git a/ecmascript/compiler/stub.h b/ecmascript/compiler/stub.h index ca265d8059..e261bd6231 100644 --- a/ecmascript/compiler/stub.h +++ b/ecmascript/compiler/stub.h @@ -496,7 +496,7 @@ public: GateRef TaggedIsSpecial(GateRef x); GateRef TaggedIsHeapObject(GateRef x); GateRef ObjectAddressToRange(GateRef x); - GateRef InYoungGeneration(GateRef glue, GateRef x); + GateRef InYoungGeneration(GateRef x); GateRef TaggedIsGeneratorObject(GateRef x); GateRef TaggedIsPropertyBox(GateRef x); GateRef TaggedIsWeak(GateRef x); diff --git a/ecmascript/compiler/tests/stub_tests.cpp b/ecmascript/compiler/tests/stub_tests.cpp index 352da57d7d..803a1e1e3a 100644 --- a/ecmascript/compiler/tests/stub_tests.cpp +++ b/ecmascript/compiler/tests/stub_tests.cpp @@ -59,7 +59,8 @@ public: TestHelper::DestroyEcmaVMWithScope(instance, scope); } - void PrintCircuitByBasicBlock(const std::vector> &cfg, const Circuit &netOfGates) const + void PrintCircuitByBasicBlock([[maybe_unused]] const std::vector> &cfg, + [[maybe_unused]] const Circuit &netOfGates) const { #if ECMASCRIPT_ENABLE_COMPILER_LOG for (size_t bbIdx = 0; bbIdx < cfg.size(); bbIdx++) { @@ -1100,7 +1101,7 @@ HWTEST_F_L0(StubTest, GetPropertyByValueStub) double key = 4.29497e+09; resVal = getPropertyByValuePtr(thread->GetGlueAddr(), strHello.GetTaggedValue().GetRawData(), JSTaggedValue(key).GetRawData()); - EXPECT_EQ(resVal.GetRawData(), 0); + EXPECT_EQ(resVal.GetRawData(), 0ULL); } HWTEST_F_L0(StubTest, FastTypeOfTest) diff --git a/ecmascript/containers/tests/BUILD.gn b/ecmascript/containers/tests/BUILD.gn index 4d563e5719..0a36a89fc6 100644 --- a/ecmascript/containers/tests/BUILD.gn +++ b/ecmascript/containers/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("ContainersTreeMapTest") { "containers_treemap_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -52,13 +46,7 @@ host_unittest_action("ContainersTreeSetTest") { "containers_treeset_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/dfx/hprof/tests/BUILD.gn b/ecmascript/dfx/hprof/tests/BUILD.gn index 269c55107c..e432f358c6 100644 --- a/ecmascript/dfx/hprof/tests/BUILD.gn +++ b/ecmascript/dfx/hprof/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("HeapTrackerTest") { "heap_tracker_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -52,13 +46,7 @@ host_unittest_action("HprofTest") { "hprof_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/global_env_constants.cpp b/ecmascript/global_env_constants.cpp index d052b45df4..c78e900591 100644 --- a/ecmascript/global_env_constants.cpp +++ b/ecmascript/global_env_constants.cpp @@ -209,6 +209,12 @@ void GlobalEnvConstants::InitGlobalConstant(JSThread *thread) SetConstant(ConstantIndex::WRITABLE_STRING_INDEX, factory->NewFromCanBeCompressString("writable")); SetConstant(ConstantIndex::ENUMERABLE_STRING_INDEX, factory->NewFromCanBeCompressString("enumerable")); SetConstant(ConstantIndex::CONFIGURABLE_STRING_INDEX, factory->NewFromCanBeCompressString("configurable")); + /* non ECMA standard jsapi containers iterators, init to Undefined first */ + SetConstant(ConstantIndex::ARRAYLIST_FUNCTION_INDEX, JSTaggedValue::Undefined()); + SetConstant(ConstantIndex::ARRAYLIST_ITERATOR_PROTOTYPE_INDEX, JSTaggedValue::Undefined()); + SetConstant(ConstantIndex::TREEMAP_ITERATOR_PROTOTYPE_INDEX, JSTaggedValue::Undefined()); + SetConstant(ConstantIndex::TREESET_ITERATOR_PROTOTYPE_INDEX, JSTaggedValue::Undefined()); + SetConstant(ConstantIndex::QUEUE_ITERATOR_PROTOTYPE_INDEX, JSTaggedValue::Undefined()); /* SymbolTable *RegisterSymbols */ SetConstant(ConstantIndex::NAME_STRING_INDEX, factory->NewFromCanBeCompressString("name")); SetConstant(ConstantIndex::GETPROTOTYPEOF_STRING_INDEX, factory->NewFromCanBeCompressString("getPrototypeOf")); diff --git a/ecmascript/ic/tests/BUILD.gn b/ecmascript/ic/tests/BUILD.gn index b474d40966..fb6a576f03 100644 --- a/ecmascript/ic/tests/BUILD.gn +++ b/ecmascript/ic/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("ICBinaryOpTest") { "ic_binaryop_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -52,13 +46,7 @@ host_unittest_action("ICCompareOpTest") { "ic_compareop_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -79,13 +67,7 @@ host_unittest_action("ICHandlerTest") { "ic_handler_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -106,13 +88,7 @@ host_unittest_action("ICInvokeTest") { "ic_invoke_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -133,13 +109,7 @@ host_unittest_action("ProfileTypeInfoTest") { "profile_type_info_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/jobs/tests/BUILD.gn b/ecmascript/jobs/tests/BUILD.gn index 3a52d6c3b9..be9d3924b7 100644 --- a/ecmascript/jobs/tests/BUILD.gn +++ b/ecmascript/jobs/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("PendingJobTest") { "pending_job_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -52,13 +46,7 @@ host_unittest_action("MicroJobQueueTest") { "micro_job_queue_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/js_typed_array.cpp b/ecmascript/js_typed_array.cpp index 617a946d2c..7e8e9bd040 100644 --- a/ecmascript/js_typed_array.cpp +++ b/ecmascript/js_typed_array.cpp @@ -379,7 +379,7 @@ OperationResult JSTypedArray::IntegerIndexedElementGet(JSThread *thread, const J // s12 10.4.5.9 IsValidIntegerIndex ( O, index ) bool JSTypedArray::IsValidIntegerIndex(JSThread *thread, const JSHandle &typedArray, - JSTaggedValue &index) + JSTaggedValue index) { // 1. Assert: O is an Integer-Indexed exotic object. // 2. If IsDetachedBuffer(O.[[ViewedArrayBuffer]]) is true, return false. diff --git a/ecmascript/js_typed_array.h b/ecmascript/js_typed_array.h index 10ece1af4f..06e1974e94 100644 --- a/ecmascript/js_typed_array.h +++ b/ecmascript/js_typed_array.h @@ -87,7 +87,7 @@ public: JSTaggedValue index, const JSHandle &value); // s12 10.4.5.9 IsValidIntegerIndex ( O, index ) static bool IsValidIntegerIndex(JSThread *thread, const JSHandle &typedArray, - JSTaggedValue &index); + JSTaggedValue index); static constexpr size_t VIEWED_ARRAY_BUFFER_OFFSET = JSObject::SIZE; ACCESSORS(ViewedArrayBuffer, VIEWED_ARRAY_BUFFER_OFFSET, TYPED_ARRAY_NAME_OFFSET) ACCESSORS(TypedArrayName, TYPED_ARRAY_NAME_OFFSET, BYTE_LENGTH_OFFSET) diff --git a/ecmascript/napi/test/BUILD.gn b/ecmascript/napi/test/BUILD.gn index c1c71d91b4..74306cea42 100644 --- a/ecmascript/napi/test/BUILD.gn +++ b/ecmascript/napi/test/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("JsnapiTest") { "jsnapi_tests.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/regexp/tests/BUILD.gn b/ecmascript/regexp/tests/BUILD.gn index ce35955e99..399e98749a 100644 --- a/ecmascript/regexp/tests/BUILD.gn +++ b/ecmascript/regexp/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("DynChunkTest") { "dyn_chunk_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -52,13 +46,7 @@ host_unittest_action("RegexpTest") { "regexp_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/snapshot/tests/BUILD.gn b/ecmascript/snapshot/tests/BUILD.gn index 545b46bae4..c45489f92d 100644 --- a/ecmascript/snapshot/tests/BUILD.gn +++ b/ecmascript/snapshot/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("SnapshotTest") { "snapshot_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/tests/BUILD.gn b/ecmascript/tests/BUILD.gn index 8f608bde63..de4d0d4297 100644 --- a/ecmascript/tests/BUILD.gn +++ b/ecmascript/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("AssertScopeTest") { "assert_scope_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -52,13 +46,7 @@ host_unittest_action("BuiltinsTest") { "builtins_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -79,13 +67,7 @@ host_unittest_action("DumpTest") { "dump_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -106,13 +88,7 @@ host_unittest_action("EcmaModuleTest") { "ecma_module_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -133,13 +109,7 @@ host_unittest_action("EcmaStringTest") { "ecma_string_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -160,13 +130,7 @@ host_unittest_action("EcmaVMTest") { "ecma_vm_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -187,13 +151,7 @@ host_unittest_action("GlueRegsTest") { "glue_regs_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -214,13 +172,7 @@ host_unittest_action("JsArrayIteratorTest") { "js_array_iterator_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -241,13 +193,7 @@ host_unittest_action("JsArrayTest") { "js_array_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -268,13 +214,7 @@ host_unittest_action("JsDataViewTest") { "js_dataview_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -295,13 +235,7 @@ host_unittest_action("JsDateTest") { "js_date_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -322,13 +256,7 @@ host_unittest_action("JsForinIteratorTest") { "js_forin_iterator_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -349,13 +277,7 @@ host_unittest_action("JsFunctionTest") { "js_function_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -376,13 +298,7 @@ host_unittest_action("JsHandleTest") { "js_handle_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -403,13 +319,7 @@ host_unittest_action("JsIteratorTest") { "js_iterator_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", "//ark/js_runtime:libark_jsruntime_test", @@ -429,13 +339,7 @@ host_unittest_action("JsMapTest") { "js_map_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -456,13 +360,7 @@ host_unittest_action("JSAPITreeMapTest") { "js_api_tree_map_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -483,13 +381,7 @@ host_unittest_action("JSAPITreeSetTest") { "js_api_tree_set_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -510,13 +402,7 @@ host_unittest_action("JsObjectTest") { "js_object_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -537,13 +423,7 @@ host_unittest_action("JsPrimitiveRefTest") { "js_primitive_ref_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -564,13 +444,7 @@ host_unittest_action("JsPromiseTest") { "js_promise_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -591,13 +465,7 @@ host_unittest_action("JsProxyTest") { "js_proxy_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -618,13 +486,7 @@ host_unittest_action("JsSetTest") { "js_set_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -645,13 +507,7 @@ host_unittest_action("JsSymbolTest") { "js_symbol_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -672,13 +528,7 @@ host_unittest_action("JsTaggedQueueTest") { "js_tagged_queue_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -699,13 +549,7 @@ host_unittest_action("JsTypedArrayTest") { "js_typed_array_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -726,13 +570,7 @@ host_unittest_action("JsVerificationTest") { "js_verification_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -753,13 +591,7 @@ host_unittest_action("TaggedTreeTest") { "tagged_tree_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -780,13 +612,7 @@ host_unittest_action("HugeObjectTest") { "huge_object_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -807,13 +633,7 @@ host_unittest_action("JsArgumentsTest") { "js_arguments_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -834,13 +654,7 @@ host_unittest_action("LexicalEnvTest") { "lexical_env_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -861,13 +675,7 @@ host_unittest_action("LinkedHashTableTest") { "linked_hash_table_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -888,13 +696,7 @@ host_unittest_action("NameDictionaryTest") { "name_dictionary_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -915,13 +717,7 @@ host_unittest_action("NativePointerTest") { "native_pointer_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -942,13 +738,7 @@ host_unittest_action("ObjectFactoryTest") { "object_factory_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -969,13 +759,7 @@ host_unittest_action("SymbolTableTest") { "symbol_table_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -996,13 +780,7 @@ host_unittest_action("TaggedValueTest") { "tagged_value_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -1023,13 +801,7 @@ host_unittest_action("MemControllerTest") { "mem_controller_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -1050,13 +822,7 @@ host_unittest_action("WeakRefOldGcTest") { "weak_ref_old_gc_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -1077,13 +843,7 @@ host_unittest_action("WeakRefSemiGcTest") { "weak_ref_semi_gc_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -1104,13 +864,7 @@ host_unittest_action("JsSerializerTest") { "js_serializer_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -1132,13 +886,7 @@ host_unittest_action("GcTest") { "gc_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -1159,13 +907,7 @@ host_unittest_action("ConcurrentMarkingTest") { "concurrent_marking_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/tests/dump_test.cpp b/ecmascript/tests/dump_test.cpp index 4b1ff96aa5..6365f4aa2b 100644 --- a/ecmascript/tests/dump_test.cpp +++ b/ecmascript/tests/dump_test.cpp @@ -477,8 +477,10 @@ HWTEST_F_L0(EcmaDumpTest, HeapProfileDump) case JSType::JS_INT32_ARRAY: case JSType::JS_UINT32_ARRAY: case JSType::JS_FLOAT32_ARRAY: - case JSType::JS_FLOAT64_ARRAY: { - CHECK_DUMP_FIELDS(JSObject::SIZE, JSTypedArray::SIZE, 5) + case JSType::JS_FLOAT64_ARRAY: + case JSType::JS_BIGINT64_ARRAY: + case JSType::JS_BIGUINT64_ARRAY: { + CHECK_DUMP_FIELDS(JSObject::SIZE, JSTypedArray::SIZE, 6) NEW_OBJECT_AND_DUMP(JSTypedArray, JS_TYPED_ARRAY) break; } diff --git a/ecmascript/tests/js_array_iterator_test.cpp b/ecmascript/tests/js_array_iterator_test.cpp index c93950a955..01aadc8452 100644 --- a/ecmascript/tests/js_array_iterator_test.cpp +++ b/ecmascript/tests/js_array_iterator_test.cpp @@ -61,8 +61,8 @@ HWTEST_F_L0(JSArrayIteratorTest, SetIteratedArray) EcmaVM *ecmaVMPtr = thread->GetEcmaVM(); ObjectFactory *factory = ecmaVMPtr->GetFactory(); - uint32_t arrayFrom1[10] = {0, 6, 8, 99, 200, 1, -1, -199, 33, 100}; - uint32_t arrayFrom2[10] = {1111, 3211, 737, 0, 1267, 174, 2763, 832, 11, 93}; + int32_t arrayFrom1[10] = {0, 6, 8, 99, 200, 1, -1, -199, 33, 100}; + int32_t arrayFrom2[10] = {1111, 3211, 737, 0, 1267, 174, 2763, 832, 11, 93}; int numArrayFrom1 = sizeof(arrayFrom1)/sizeof(arrayFrom1[0]); int numArrayFrom2 = sizeof(arrayFrom2)/sizeof(arrayFrom2[0]); JSHandle handleTaggedArrayFrom1(factory->NewTaggedArray(numArrayFrom1)); @@ -84,7 +84,7 @@ HWTEST_F_L0(JSArrayIteratorTest, SetIteratedArray) EXPECT_EQ(handleJSArrayTo1->GetArrayLength(), static_cast(numArrayFrom1)); for (int i = 0; i < numArrayFrom1; i++) { EXPECT_EQ(JSArray::FastGetPropertyByValue(thread, JSHandle(handleJSArrayTo1), i)->GetNumber(), - static_cast(arrayFrom1[i])); + arrayFrom1[i]); } // Call "SetIteratedArray" function in this HWTEST_F_L0. @@ -94,7 +94,7 @@ HWTEST_F_L0(JSArrayIteratorTest, SetIteratedArray) EXPECT_EQ(handleJSArrayTo2->GetArrayLength(), static_cast(numArrayFrom2)); for (int i = 0; i < numArrayFrom2; i++) { EXPECT_EQ(JSArray::FastGetPropertyByValue(thread, JSHandle(handleJSArrayTo2), i)->GetNumber(), - static_cast(arrayFrom2[i])); + arrayFrom2[i]); } } @@ -111,7 +111,7 @@ HWTEST_F_L0(JSArrayIteratorTest, SetNextIndex) EcmaVM *ecmaVMPtr = thread->GetEcmaVM(); ObjectFactory *factory = ecmaVMPtr->GetFactory(); - uint32_t array[10] = {0, 6, 8, 99, 200, 1, -1, -199, 33, 100}; + int32_t array[10] = {0, 6, 8, 99, 200, 1, -1, -199, 33, 100}; int numArray = sizeof(array)/sizeof(array[0]); JSHandle handleTaggedArray(factory->NewTaggedArray(numArray)); for (int i = 0; i < numArray; i++) { @@ -145,7 +145,7 @@ HWTEST_F_L0(JSArrayIteratorTest, SetIterationKind) EcmaVM *ecmaVMPtr = thread->GetEcmaVM(); ObjectFactory *factory = ecmaVMPtr->GetFactory(); - uint32_t array[10] = {0, 6, 8, 99, 200, 1, -1, -199, 33, 100}; + int32_t array[10] = {0, 6, 8, 99, 200, 1, -1, -199, 33, 100}; int numArray = sizeof(array)/sizeof(array[0]); JSHandle handleTaggedArray(factory->NewTaggedArray(numArray)); for (int i = 0; i < numArray; i++) { diff --git a/ecmascript/tests/js_typed_array_test.cpp b/ecmascript/tests/js_typed_array_test.cpp index 687132a660..aa34909cfb 100644 --- a/ecmascript/tests/js_typed_array_test.cpp +++ b/ecmascript/tests/js_typed_array_test.cpp @@ -392,9 +392,9 @@ HWTEST_F_L0(JSTypedArrayTest, IntegerIndexedElementSet_Int8Array_001) EXPECT_EQ(opResult3.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); EXPECT_EQ(opResult4.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt8Array, JSTaggedValue(-1), + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt8Array, JSTaggedValue(-1), JSHandle(thread, JSTaggedValue(0)))); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt8Array, + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt8Array, JSTaggedValue(numElementsInt8Array), JSHandle(thread, JSTaggedValue(0)))); } @@ -491,9 +491,9 @@ HWTEST_F_L0(JSTypedArrayTest, IntegerIndexedElementSet_Uint8Array_001) EXPECT_EQ(opResult3.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); EXPECT_EQ(opResult4.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint8Array, JSTaggedValue(-1), + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint8Array, JSTaggedValue(-1), JSHandle(thread, JSTaggedValue(0)))); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint8Array, + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint8Array, JSTaggedValue(numElementsUint8Array), JSHandle(thread, JSTaggedValue(0)))); } @@ -590,9 +590,9 @@ HWTEST_F_L0(JSTypedArrayTest, IntegerIndexedElementSet_Uint8ClampedArray_001) EXPECT_EQ(opResult3.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); EXPECT_EQ(opResult4.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint8ClampedArray, JSTaggedValue(-1), + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint8ClampedArray, JSTaggedValue(-1), JSHandle(thread, JSTaggedValue(0)))); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint8ClampedArray, + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint8ClampedArray, JSTaggedValue(numElementsUint8ClampedArray), JSHandle(thread, JSTaggedValue(0)))); } @@ -692,9 +692,9 @@ HWTEST_F_L0(JSTypedArrayTest, IntegerIndexedElementSet_Int16Array_001) EXPECT_EQ(opResult3.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); EXPECT_EQ(opResult4.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt16Array, JSTaggedValue(-1), + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt16Array, JSTaggedValue(-1), JSHandle(thread, JSTaggedValue(0)))); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt16Array, + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt16Array, JSTaggedValue(numElementsInt16Array), JSHandle(thread, JSTaggedValue(0)))); } @@ -794,9 +794,9 @@ HWTEST_F_L0(JSTypedArrayTest, IntegerIndexedElementSet_Uint16Array_001) EXPECT_EQ(opResult3.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); EXPECT_EQ(opResult4.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint16Array, JSTaggedValue(-1), + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint16Array, JSTaggedValue(-1), JSHandle(thread, JSTaggedValue(0)))); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint16Array, + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint16Array, JSTaggedValue(numElementsUint16Array), JSHandle(thread, JSTaggedValue(0)))); } @@ -896,9 +896,9 @@ HWTEST_F_L0(JSTypedArrayTest, IntegerIndexedElementSet_Int32Array_001) EXPECT_EQ(opResult3.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); EXPECT_EQ(opResult4.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt32Array, JSTaggedValue(-1), + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt32Array, JSTaggedValue(-1), JSHandle(thread, JSTaggedValue(0)))); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt32Array, + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValInt32Array, JSTaggedValue(numElementsInt32Array), JSHandle(thread, JSTaggedValue(0)))); } @@ -998,9 +998,9 @@ HWTEST_F_L0(JSTypedArrayTest, IntegerIndexedElementSet_Uint32Array_001) EXPECT_EQ(opResult3.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); EXPECT_EQ(opResult4.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint32Array, JSTaggedValue(-1), + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint32Array, JSTaggedValue(-1), JSHandle(thread, JSTaggedValue(0)))); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint32Array, + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValUint32Array, JSTaggedValue(numElementsUint32Array), JSHandle(thread, JSTaggedValue(0)))); } @@ -1100,9 +1100,9 @@ HWTEST_F_L0(JSTypedArrayTest, IntegerIndexedElementSet_Float32Array) EXPECT_EQ(opResult3.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); EXPECT_EQ(opResult4.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValFloat32Array, JSTaggedValue(-1), + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValFloat32Array, JSTaggedValue(-1), JSHandle(thread, JSTaggedValue(0)))); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValFloat32Array, + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValFloat32Array, JSTaggedValue(numElementsFloat32Array), JSHandle(thread, JSTaggedValue(0)))); } @@ -1150,9 +1150,9 @@ HWTEST_F_L0(JSTypedArrayTest, IntegerIndexedElementSet_Float64Array) EXPECT_EQ(opResult3.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); EXPECT_EQ(opResult4.GetValue().GetTaggedValue(), JSTaggedValue::Undefined()); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValFloat64Array, JSTaggedValue(-1), + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValFloat64Array, JSTaggedValue(-1), JSHandle(thread, JSTaggedValue(0)))); - EXPECT_FALSE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValFloat64Array, + EXPECT_TRUE(JSTypedArray::IntegerIndexedElementSet(thread, handleTagValFloat64Array, JSTaggedValue(numElementsFloat64Array), JSHandle(thread, JSTaggedValue(0)))); } diff --git a/ecmascript/tooling/BUILD.gn b/ecmascript/tooling/BUILD.gn index 9a8450bd1e..12822eebf5 100644 --- a/ecmascript/tooling/BUILD.gn +++ b/ecmascript/tooling/BUILD.gn @@ -15,6 +15,12 @@ import("//ark/js_runtime/js_runtime_config.gni") import("//build/ohos.gni") config("ark_ecma_debugger_config") { + configs = [ + "//ark/js_runtime:ark_jsruntime_common_config", + "//ark/js_runtime:ark_jsruntime_public_config", + "$ark_root/runtime:arkruntime_public_config", + ] + include_dirs = [ "//ark/js_runtime/ecmascript/tooling" ] } @@ -37,12 +43,7 @@ debugger_sources = [ source_set("libark_ecma_debugger_static") { sources = debugger_sources - public_configs = [ - ":ark_ecma_debugger_config", - "//ark/js_runtime:ark_jsruntime_common_config", - "//ark/js_runtime:ark_jsruntime_public_config", - "$ark_root/runtime:arkruntime_public_config", - ] + public_configs = [ ":ark_ecma_debugger_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -76,12 +77,7 @@ ohos_shared_library("libark_ecma_debugger") { source_set("libark_ecma_debugger_test_static") { sources = debugger_sources - public_configs = [ - ":ark_ecma_debugger_config", - "//ark/js_runtime:ark_jsruntime_common_config", - "//ark/js_runtime:ark_jsruntime_public_config", - "$ark_root/runtime:arkruntime_public_config", - ] + public_configs = [ ":ark_ecma_debugger_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -102,12 +98,7 @@ ohos_shared_library("libark_ecma_debugger_test") { } } - configs = [ - ":ark_ecma_debugger_config", - "//ark/js_runtime:ark_jsruntime_common_config", - "//ark/js_runtime:ark_jsruntime_public_config", - "$ark_root/runtime:arkruntime_public_config", - ] + public_configs = [ ":ark_ecma_debugger_config" ] if (is_standard_system) { deps += [ "$ark_root/runtime:libarkruntime_static" ] diff --git a/ecmascript/tooling/test/BUILD.gn b/ecmascript/tooling/test/BUILD.gn index 871470c8be..9976fe0731 100644 --- a/ecmascript/tooling/test/BUILD.gn +++ b/ecmascript/tooling/test/BUILD.gn @@ -23,6 +23,9 @@ config("debug_api_test") { visibility = [ ":*" ] ldflags = [ "-Wl,-rpath=\$ORIGIN/" ] + + configs = [ "//ark/js_runtime:ecma_test_config" ] + include_dirs = [ "//ark/js_runtime", "//ark/js_runtime/ecmascript/tooling/test", @@ -56,13 +59,7 @@ ts2abc_gen_abc("ark_exception_abc") { ohos_shared_library("debugger_entry") { sources = [ "entry/test_debugger_entry.cpp" ] - configs = [ - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - ":debug_api_test", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ ":debug_api_test" ] deps = [ ":ark_exception_abc", @@ -88,13 +85,7 @@ ohos_shared_library("jsdebugtest") { "utils/testcases/test_list.cpp", ] - configs = [ - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - ":debug_api_test", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ ":debug_api_test" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -131,13 +122,7 @@ ohos_unittest("EcmaDebugApiTest") { "//ark/js_runtime/test/resource/js_runtime/ohos_test.xml" defines = [ "DEBUGGER_TEST_LIBRARY=\"libdebugger_entry.so\"" ] - configs = [ - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - ":debug_api_test", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ ":debug_api_test" ] deps = [ ":debugger_api_resource", @@ -159,13 +144,7 @@ host_unittest_action("DebuggerCommandsTest") { "debugger_commands_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -186,13 +165,7 @@ host_unittest_action("DebuggerScriptTest") { "debugger_script_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -213,13 +186,7 @@ host_unittest_action("DebuggerEventsTest") { "debugger_events_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -240,13 +207,7 @@ host_unittest_action("DebuggerReturnsTest") { "debugger_returns_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -267,13 +228,7 @@ host_unittest_action("DebuggerTypesTest") { "debugger_types_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", @@ -294,13 +249,7 @@ host_unittest_action("JSPtHooksTest") { "js_pt_hooks_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/ecmascript/ts_types/tests/BUILD.gn b/ecmascript/ts_types/tests/BUILD.gn index f7cfb122cf..507513d3d4 100644 --- a/ecmascript/ts_types/tests/BUILD.gn +++ b/ecmascript/ts_types/tests/BUILD.gn @@ -25,13 +25,7 @@ host_unittest_action("TSTypeTest") { "ts_type_test.cpp", ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", # should add before - # arkruntime_public_config - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/test/fuzztest/ark_DispatchProtocolMessage_fuzzer/BUILD.gn b/test/fuzztest/ark_DispatchProtocolMessage_fuzzer/BUILD.gn index 7dbfb83d0f..ba76aee2f1 100644 --- a/test/fuzztest/ark_DispatchProtocolMessage_fuzzer/BUILD.gn +++ b/test/fuzztest/ark_DispatchProtocolMessage_fuzzer/BUILD.gn @@ -24,12 +24,7 @@ ohos_fuzztest("test_ark_DispatchProtocolMessage_fuzzer") { sources = [ "ark_DispatchProtocolMessage_fuzzer.cpp" ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/test/fuzztest/ark_Execute_fuzzer/BUILD.gn b/test/fuzztest/ark_Execute_fuzzer/BUILD.gn index 7968e47ec6..c643285bb2 100644 --- a/test/fuzztest/ark_Execute_fuzzer/BUILD.gn +++ b/test/fuzztest/ark_Execute_fuzzer/BUILD.gn @@ -24,12 +24,7 @@ ohos_fuzztest("test_ark_Execute_fuzzer") { sources = [ "ark_Execute_fuzzer.cpp" ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/test/fuzztest/ark_InitializeDebugger_fuzzer/BUILD.gn b/test/fuzztest/ark_InitializeDebugger_fuzzer/BUILD.gn index 8170783203..74597dcbd2 100644 --- a/test/fuzztest/ark_InitializeDebugger_fuzzer/BUILD.gn +++ b/test/fuzztest/ark_InitializeDebugger_fuzzer/BUILD.gn @@ -24,12 +24,7 @@ ohos_fuzztest("test_ark_InitializeDebugger_fuzzer") { sources = [ "ark_InitializeDebugger_fuzzer.cpp" ] - configs = [ - "//ark/js_runtime:ecma_test_config", - "//ark/js_runtime:ark_jsruntime_public_config", - "//ark/js_runtime:ark_jsruntime_common_config", - "$ark_root/runtime:arkruntime_public_config", - ] + configs = [ "//ark/js_runtime:ecma_test_config" ] deps = [ "$ark_root/libpandabase:libarkbase", diff --git a/test/resource/js_runtime/ohos_test.xml b/test/resource/js_runtime/ohos_test.xml index 711f026a22..4cf3ac26bd 100755 --- a/test/resource/js_runtime/ohos_test.xml +++ b/test/resource/js_runtime/ohos_test.xml @@ -46,6 +46,11 @@