Skip to content

Commit ebdd8d3

Browse files
committed
Handle properties of builtin routine separately from builtin objects
separate builtin routine part to make code clear and to support 'name' property later JerryScript-DCO-1.0-Signed-off-by: HyukWoo Park [email protected]
1 parent 3782449 commit ebdd8d3

File tree

4 files changed

+225
-153
lines changed

4 files changed

+225
-153
lines changed

jerry-core/ecma/base/ecma-globals.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,17 +799,29 @@ typedef struct
799799
} ecma_object_t;
800800

801801
/**
802-
* Description of built-in properties of an object.
802+
* Description of built-in properties of an built-in ECMA-object.
803803
*/
804804
typedef struct
805805
{
806-
uint8_t id; /**< built-in id */
806+
uint8_t id; /**< built-in object id */
807807
uint8_t length_and_bitset_size; /**< length for built-in functions and
808808
* bit set size for all built-ins */
809809
uint16_t routine_id; /**< routine id for built-in functions */
810810
uint32_t instantiated_bitset[1]; /**< bit set for instantiated properties */
811811
} ecma_built_in_props_t;
812812

813+
/**
814+
* Description of built-in routine property of an built-in ECMA-object.
815+
*/
816+
typedef struct
817+
{
818+
uint8_t built_in_object_id; /**< built-in object id */
819+
uint8_t length; /**< length of built-in routine */
820+
uint16_t id; /**< id of built-in routine */
821+
uint16_t name; /**< name of built-in routine */
822+
uint16_t bitset; /**< bit set for instantiated properties of builtin routine */
823+
} ecma_built_in_routine_props_t;
824+
813825
/**
814826
* Start position of bit set size in length_and_bitset_size field.
815827
*/
@@ -830,6 +842,7 @@ typedef struct
830842
union
831843
{
832844
ecma_built_in_props_t built_in; /**< built-in object part */
845+
ecma_built_in_routine_props_t built_in_routine; /**< built-in routine part */
833846

834847
/**
835848
* Description of objects with class.

0 commit comments

Comments
 (0)