3434 */
3535
3636/**
37- * Ecma-pointer field is used to calculate ecma- value's address.
37+ * Ecma-pointer field is used to calculate ecma value's address.
3838 *
3939 * Ecma-pointer contains value's shifted offset from common Ecma-pointers' base.
4040 * The offset is shifted right by MEM_ALIGNMENT_LOG.
5252 */
5353
5454/**
55- * Type of ecma- value
55+ * Type of ecma value
5656 */
5757typedef enum
5858{
@@ -63,7 +63,7 @@ typedef enum
6363} ecma_type_t ;
6464
6565/**
66- * Simple ecma- values
66+ * Simple ecma values
6767 */
6868typedef enum
6969{
@@ -80,7 +80,7 @@ typedef enum
8080 ECMA_SIMPLE_VALUE_TRUE , /**< boolean true */
8181 ECMA_SIMPLE_VALUE_ARRAY_HOLE , /**< array hole, used for initialization of an array literal */
8282 ECMA_SIMPLE_VALUE_REGISTER_REF , /**< register reference, a special "base" value for vm */
83- ECMA_SIMPLE_VALUE__COUNT /** count of simple ecma- values */
83+ ECMA_SIMPLE_VALUE__COUNT /** count of simple ecma values */
8484} ecma_simple_value_t ;
8585
8686/**
@@ -94,40 +94,9 @@ typedef enum
9494} ecma_property_type_t ;
9595
9696/**
97- * Type of block evaluation (completion) result.
97+ * Description of an ecma value
9898 *
99- * See also: ECMA-262 v5, 8.9.
100- */
101- typedef enum
102- {
103- ECMA_COMPLETION_TYPE_NORMAL , /**< default completion */
104- ECMA_COMPLETION_TYPE_RETURN , /**< completion with return */
105- ECMA_COMPLETION_TYPE_JUMP , /**< implementation-defined completion type
106- * for jump statements (break, continue)
107- * that require completion of one or several
108- * statements, before performing related jump.
109- *
110- * For example, 'break' in the following code
111- * requires to return from opfunc_with handler
112- * before performing jump to the loop end:
113- *
114- * for (var i = 0; i < 10; i++)
115- * {
116- * with (obj)
117- * {
118- * break;
119- * }
120- * }
121- */
122- ECMA_COMPLETION_TYPE_THROW , /**< completion with throw */
123- ECMA_COMPLETION_TYPE_META /**< implementation-defined completion type
124- for meta opcode */
125- } ecma_completion_type_t ;
126-
127- /**
128- * Description of an ecma-value
129- *
130- * Bit-field structure: type (2) | value (ECMA_POINTER_FIELD_WIDTH)
99+ * Bit-field structure: type (2) | error (1) | value (ECMA_POINTER_FIELD_WIDTH)
131100 */
132101typedef uint32_t ecma_value_t ;
133102
@@ -138,63 +107,23 @@ typedef uint32_t ecma_value_t;
138107#define ECMA_VALUE_TYPE_WIDTH (2)
139108
140109/**
141- * Simple value (ecma_simple_value_t) or compressed pointer to value (depending on value_type )
110+ * Value is error (boolean )
142111 */
143- #define ECMA_VALUE_VALUE_POS (ECMA_VALUE_TYPE_POS + \
112+ #define ECMA_VALUE_ERROR_POS (ECMA_VALUE_TYPE_POS + \
144113 ECMA_VALUE_TYPE_WIDTH)
145- #define ECMA_VALUE_VALUE_WIDTH (ECMA_POINTER_FIELD_WIDTH)
146-
147- /**
148- * Size of ecma value description, in bits
149- */
150- #define ECMA_VALUE_SIZE (ECMA_VALUE_VALUE_POS + ECMA_VALUE_VALUE_WIDTH)
151-
152- /**
153- * Description of a block completion value
154- *
155- * See also: ECMA-262 v5, 8.9.
156- *
157- * value (16)
158- * Bit-field structure: type (8) | padding (8) <
159- * break / continue target
160- */
161- typedef uint32_t ecma_completion_value_t ;
114+ #define ECMA_VALUE_ERROR_WIDTH (1)
162115
163116/**
164- * Value
165- *
166- * Used for normal, return, throw and exit completion types.
167- */
168- #define ECMA_COMPLETION_VALUE_VALUE_POS (0)
169- #define ECMA_COMPLETION_VALUE_VALUE_WIDTH (ECMA_VALUE_SIZE)
170-
171- /**
172- * Type (ecma_completion_type_t)
173- */
174- #define ECMA_COMPLETION_VALUE_TYPE_POS (JERRY_ALIGNUP (ECMA_COMPLETION_VALUE_VALUE_POS + \
175- ECMA_COMPLETION_VALUE_VALUE_WIDTH, \
176- JERRY_BITSINBYTE))
177- #define ECMA_COMPLETION_VALUE_TYPE_WIDTH (8)
178-
179- /**
180- * Size of ecma completion value description, in bits
117+ * Simple value (ecma_simple_value_t) or compressed pointer to value (depending on value_type)
181118 */
182- #define ECMA_COMPLETION_VALUE_SIZE (ECMA_COMPLETION_VALUE_TYPE_POS + \
183- ECMA_COMPLETION_VALUE_TYPE_WIDTH)
119+ #define ECMA_VALUE_VALUE_POS (ECMA_VALUE_ERROR_POS + \
120+ ECMA_VALUE_ERROR_WIDTH)
121+ #define ECMA_VALUE_VALUE_WIDTH (ECMA_POINTER_FIELD_WIDTH)
184122
185123/**
186- * Label
187- *
188- * Used for break and continue completion types.
124+ * Size of ecma value description, in bits
189125 */
190- typedef struct
191- {
192- /** Target's offset */
193- uint32_t offset ;
194-
195- /** Levels to label left */
196- uint32_t depth ;
197- } ecma_label_descriptor_t ;
126+ #define ECMA_VALUE_SIZE (ECMA_VALUE_VALUE_POS + ECMA_VALUE_VALUE_WIDTH)
198127
199128/**
200129 * Internal properties' identifiers.
0 commit comments