diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c index 81b8c5572..3f840bce6 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c @@ -1037,9 +1037,16 @@ ecma_builtin_typedarray_prototype_sort_compare_helper (ecma_value_t lhs, /**< le { if (ecma_is_value_undefined (compare_func)) { + /* Default comparison when no comparefn is passed. */ +#if ENABLED (JERRY_BUILTIN_BIGINT) + if (ecma_is_value_bigint (lhs) && ecma_is_value_bigint (rhs)) + { + return ecma_make_number_value (ecma_bigint_compare_to_bigint (lhs, rhs)); + } +#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */ + ecma_number_t result = ECMA_NUMBER_ZERO; - /* Default comparison when no comparefn is passed. */ double lhs_value = (double) ecma_get_number_from_value (lhs); double rhs_value = (double) ecma_get_number_from_value (rhs); diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-template.inc.h b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-template.inc.h index 89e834e6a..c64a3d740 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-template.inc.h +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-template.inc.h @@ -42,7 +42,7 @@ NUMBER_VALUE (LIT_MAGIC_STRING_BYTES_PER_ELEMENT_U, /* ES2015 22.2.5 */ STRING_VALUE (LIT_MAGIC_STRING_NAME, TYPEDARRAY_MAGIC_STRING_ID, - ECMA_PROPERTY_FIXED) + ECMA_PROPERTY_FLAG_CONFIGURABLE) /* ES2015 22.2.5.2 */ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE, diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.inc.h b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.inc.h index eb4ef674f..050ed5b55 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.inc.h +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.inc.h @@ -22,14 +22,15 @@ #if ENABLED (JERRY_BUILTIN_TYPEDARRAY) /* ES2015 22.2.2 */ +/* ES11 22.2.1.1 - value of length changed to 0 */ NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH, - 3, + 0, ECMA_PROPERTY_FLAG_CONFIGURABLE) /* ES2015 22.2.2 */ STRING_VALUE (LIT_MAGIC_STRING_NAME, LIT_MAGIC_STRING_TYPED_ARRAY_UL, - ECMA_PROPERTY_FIXED) + ECMA_PROPERTY_FLAG_CONFIGURABLE) /* ES2015 22.2.2.3 */ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE, diff --git a/tests/jerry/es.next/test_suite_22.js b/tests/jerry/es.next/test_suite_22.js index 6b1ae9087..79ba74bd3 100644 --- a/tests/jerry/es.next/test_suite_22.js +++ b/tests/jerry/es.next/test_suite_22.js @@ -25,9 +25,10 @@ assert(a[2] === 32.5); })(); +/* ES11 22.2.1.1 - length is equal to 0 */ (function tc_22_02_02__002() { var a = Object.getPrototypeOf(Int8Array); - assert(a.length === 3); + assert(a.length === 0); })(); (function tc_22_02_02__003() { diff --git a/tests/test262-esnext-excludelist.xml b/tests/test262-esnext-excludelist.xml index 7dd5aa5cd..79c70b116 100644 --- a/tests/test262-esnext-excludelist.xml +++ b/tests/test262-esnext-excludelist.xml @@ -1617,8 +1617,6 @@ - - @@ -1818,8 +1816,6 @@ - - @@ -1866,17 +1862,6 @@ - - - - - - - - - - -