diff --git a/tests/checked/CMakeLists.txt b/tests/checked/CMakeLists.txt index b008ca9fca8e7b40440fac12fd063ab2c06fe5f4..dda4a329d696571deb17e3026fecd6e366b64887 100644 --- a/tests/checked/CMakeLists.txt +++ b/tests/checked/CMakeLists.txt @@ -107,6 +107,7 @@ if (NOT PANDA_TARGET_ARM32) panda_add_checked_test_ecma(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ecma_inlining_deoptimize.js SUPPORT_RELEASE true) panda_add_checked_test_ecma(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ecma_call_profile_clear.js SUPPORT_RELEASE true) panda_add_checked_test_ecma(FILE ${CMAKE_CURRENT_SOURCE_DIR}/peephole_negoverflowandzerocheck.js SUPPORT_RELEASE true) + panda_add_checked_test_ecma(FILE ${CMAKE_CURRENT_SOURCE_DIR}/prototype_array.js SUPPORT_RELEASE true) # there is flaky bug when turning on TSAN if (NOT PANDA_ENABLE_THREAD_SANITIZER) panda_add_checked_test_ecma(FILE ${CMAKE_CURRENT_SOURCE_DIR}/acc_after_deopt.js SUPPORT_RELEASE true) diff --git a/tests/checked/prototype_array.js b/tests/checked/prototype_array.js new file mode 100644 index 0000000000000000000000000000000000000000..f00fafacf19e8e5ba0c2bc03e1856a93bf864ad4 --- /dev/null +++ b/tests/checked/prototype_array.js @@ -0,0 +1,9 @@ +//! CHECKER Test prototype array +//! RUN options: "--compiler-enable-jit=false", entry: "_GLOBAL::func_main_0" + +function getset(f) { f.length = 16; f.length; } + +function foo() {} +foo.prototype = new Array(1, 2, 3); +var f = new foo(); +getset(f) \ No newline at end of file