@@ -178,6 +178,11 @@ typedef int32_t ecma_integer_value_t;
178178#define ECMA_IS_VALUE_ERROR (value ) \
179179 (unlikely ((value & ECMA_VALUE_ERROR_FLAG) != 0))
180180
181+ /**
182+ * Representation for native external pointer
183+ */
184+ typedef uintptr_t ecma_external_pointer_t ;
185+
181186/**
182187 * Internal properties' identifiers.
183188 */
@@ -186,10 +191,8 @@ typedef enum
186191 ECMA_INTERNAL_PROPERTY_CLASS , /**< [[Class]] */
187192 ECMA_INTERNAL_PROPERTY_SCOPE , /**< [[Scope]] */
188193 ECMA_INTERNAL_PROPERTY_PARAMETERS_MAP , /**< [[ParametersMap]] */
189- ECMA_INTERNAL_PROPERTY_CODE_BYTECODE , /**< pointer to compact bytecode array */
190194 ECMA_INTERNAL_PROPERTY_REGEXP_BYTECODE , /**< pointer to RegExp bytecode array */
191195
192- ECMA_INTERNAL_PROPERTY_NATIVE_CODE , /**< native handler location descriptor */
193196 ECMA_INTERNAL_PROPERTY_NATIVE_HANDLE , /**< native handle associated with an object */
194197 ECMA_INTERNAL_PROPERTY_FREE_CALLBACK , /**< object's native free callback */
195198 ECMA_INTERNAL_PROPERTY_ECMA_VALUE , /**< [[Primitive value]] for String, Number, and Boolean */
@@ -200,17 +203,6 @@ typedef enum
200203 ECMA_INTERNAL_PROPERTY_BOUND_FUNCTION_BOUND_THIS ,
201204 ECMA_INTERNAL_PROPERTY_BOUND_FUNCTION_BOUND_ARGS ,
202205
203- ECMA_INTERNAL_PROPERTY_BUILT_IN_ID , /**< Implementation-defined identifier of built-in object */
204-
205- ECMA_INTERNAL_PROPERTY_BUILT_IN_ROUTINE_DESC , /**< Implementation-defined identifier of built-in routine
206- * that corresponds to a built-in function object
207- * ([[Built-in routine's description]])
208- */
209-
210- ECMA_INTERNAL_PROPERTY_NON_INSTANTIATED_BUILT_IN_MASK_0_31 , /**< Bit-mask of non-instantiated
211- * built-in's properties (bits 0-31)
212- */
213-
214206 ECMA_INTERNAL_PROPERTY_NON_INSTANTIATED_BUILT_IN_MASK_32_63 , /**< Bit-mask of non-instantiated
215207 * built-in's properties (bits 32-63)
216208 */
@@ -526,6 +518,44 @@ typedef struct ecma_object_t
526518 jmem_cpointer_t prototype_or_outer_reference_cp ;
527519} ecma_object_t ;
528520
521+ /**
522+ * Description of extended ECMA-object.
523+ *
524+ * The extended object is an object with extra fields.
525+ */
526+ typedef struct
527+ {
528+ ecma_object_t object ; /**< object header */
529+
530+ /*
531+ * Description of extra fields. These extra fields depends on the object type.
532+ */
533+ union
534+ {
535+ /*
536+ * Description of built-in objects.
537+ */
538+ struct
539+ {
540+ uint8_t id ; /**< built-in id */
541+ uint8_t length ; /**< length for built-in functions */
542+ uint16_t routine_id ; /**< routine id for built-in functions */
543+ uint32_t instantiated_bitset ; /**< bit set for instantiated properties */
544+ } built_in ;
545+
546+ /*
547+ * Description of function objects.
548+ */
549+ struct
550+ {
551+ ecma_value_t scope_cp ; /**< function scope */
552+ ecma_value_t bytecode_cp ; /**< function byte code */
553+ } function ;
554+
555+ ecma_external_pointer_t external_function ; /**< external function */
556+ } u ;
557+ } ecma_extended_object_t ;
558+
529559/**
530560 * Description of ECMA property descriptor
531561 *
@@ -870,14 +900,9 @@ typedef struct ecma_string_t
870900 } u ;
871901} ecma_string_t ;
872902
873- /**
874- * Representation for native external pointer
875- */
876- typedef uintptr_t ecma_external_pointer_t ;
877-
878903/**
879904 * Compiled byte code data.
880- */
905+ */
881906typedef struct
882907{
883908 uint16_t size ; /**< real size >> JMEM_ALIGNMENT_LOG */
0 commit comments