Renaming ecma_Object_t::u_Attributes to u.

Renaming ecma_CompletionValue_t:: completion_type to type, completion_value to value.
Introducing ECMA_TARGET_ID_RESERVED value of ecma_CompletionValue_t::target when it is unused.
Adding ecma_Reference_t type for ECMA-reference.
Introducing some constructors and helpers for ecma-values.
Introducing ecma_FindNamedProperty helper.
Removing ecma_SyntacticReference_t type.
Implementing ecma operation GetIdentifierReference.
Stubs and partial implementation for GetValue, SetValue, lexical environment operations (HasBinding, etc.).
This commit is contained in:
Ruben Ayrapetyan
2014-07-15 19:26:42 +04:00
parent f88fe5fae3
commit 4395da05d3
10 changed files with 520 additions and 45 deletions
+33 -3
View File
@@ -116,15 +116,21 @@ typedef struct {
*/
typedef struct {
/** Type (ecma_CompletionType_t) */
unsigned int completion_type : 3;
unsigned int type : 3;
/** Value */
ecma_Value_t completion_value;
ecma_Value_t value;
/** Target */
unsigned int target : 8;
} __packed ecma_CompletionValue_t;
/**
* Target value indicating that target field
* of ecma_CompletionValue_t defines no target.
*/
#define ECMA_TARGET_ID_RESERVED 255
/**
* Internal properties' identifiers.
*/
@@ -283,7 +289,7 @@ typedef struct ecma_Object_t {
unsigned int m_pOuterReference : ECMA_POINTER_FIELD_WIDTH;
} __packed m_LexicalEnvironment;
} __packed u_Attributes;
} __packed u;
/** GC's information */
ecma_GCInfo_t m_GCInfo;
@@ -342,6 +348,30 @@ typedef struct {
uint8_t m_Elements[ ECMA_ARRAY_CHUNK_SIZE_IN_BYTES - sizeof (uint16_t) ];
} ecma_ArrayNonFirstChunk_t;
/**
* \addtogroup reference ECMA-reference
* @{
*/
/**
* ECMA-reference (see also: ECMA-262 v5, 8.7).
*/
typedef struct
{
/** base value */
ecma_Value_t base;
/** referenced name value pointer */
ecma_Char_t *referenced_name_p;
/** strict reference flag */
bool is_strict;
} ecma_Reference_t;
/**
* @}
*/
#endif /* JERRY_ECMA_GLOBALS_H */
/**