34
34
*/
35
35
36
36
/**
37
- * Ecma-pointer field is used to calculate ecma- value's address.
37
+ * Ecma-pointer field is used to calculate ecma value's address.
38
38
*
39
39
* Ecma-pointer contains value's shifted offset from common Ecma-pointers' base.
40
40
* The offset is shifted right by MEM_ALIGNMENT_LOG.
52
52
*/
53
53
54
54
/**
55
- * Type of ecma- value
55
+ * Type of ecma value
56
56
*/
57
57
typedef enum
58
58
{
@@ -63,7 +63,7 @@ typedef enum
63
63
} ecma_type_t ;
64
64
65
65
/**
66
- * Simple ecma- values
66
+ * Simple ecma values
67
67
*/
68
68
typedef enum
69
69
{
@@ -80,7 +80,7 @@ typedef enum
80
80
ECMA_SIMPLE_VALUE_TRUE , /**< boolean true */
81
81
ECMA_SIMPLE_VALUE_ARRAY_HOLE , /**< array hole, used for initialization of an array literal */
82
82
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 */
84
84
} ecma_simple_value_t ;
85
85
86
86
/**
@@ -94,40 +94,9 @@ typedef enum
94
94
} ecma_property_type_t ;
95
95
96
96
/**
97
- * Type of block evaluation (completion) result.
97
+ * Description of an ecma value
98
98
*
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)
131
100
*/
132
101
typedef uint32_t ecma_value_t ;
133
102
@@ -138,63 +107,23 @@ typedef uint32_t ecma_value_t;
138
107
#define ECMA_VALUE_TYPE_WIDTH (2)
139
108
140
109
/**
141
- * Simple value (ecma_simple_value_t) or compressed pointer to value (depending on value_type )
110
+ * Value is error (boolean )
142
111
*/
143
- #define ECMA_VALUE_VALUE_POS (ECMA_VALUE_TYPE_POS + \
112
+ #define ECMA_VALUE_ERROR_POS (ECMA_VALUE_TYPE_POS + \
144
113
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)
162
115
163
116
/**
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)
181
118
*/
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)
184
122
185
123
/**
186
- * Label
187
- *
188
- * Used for break and continue completion types.
124
+ * Size of ecma value description, in bits
189
125
*/
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)
198
127
199
128
/**
200
129
* Internal properties' identifiers.
0 commit comments