Skip to content

Commit 3c4c545

Browse files
committed
Add length property to Array constructor
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
1 parent 9402e3d commit 3c4c545

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

jerry-core/ecma/builtin-objects/ecma-builtin-array.inc.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
4646
ECMA_PROPERTY_NOT_ENUMERABLE,
4747
ECMA_PROPERTY_NOT_CONFIGURABLE)
4848

49+
/* Number properties:
50+
* (property name, object pointer getter) */
51+
52+
// 15.4.3
53+
NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
54+
1,
55+
ECMA_PROPERTY_NOT_WRITABLE,
56+
ECMA_PROPERTY_NOT_ENUMERABLE,
57+
ECMA_PROPERTY_NOT_CONFIGURABLE)
58+
4959
/* Routine properties:
5060
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
5161
ROUTINE (LIT_MAGIC_STRING_IS_ARRAY_UL, ecma_builtin_array_object_is_array, 1, 1)

0 commit comments

Comments
 (0)