@@ -83,7 +83,8 @@ static void
83
83
parser_emit_unary_lvalue_opcode (parser_context_t * context_p , /**< context */
84
84
cbc_opcode_t opcode ) /**< opcode */
85
85
{
86
- if (PARSER_IS_PUSH_LITERAL (context_p -> last_cbc_opcode )
86
+ if ((PARSER_IS_PUSH_LITERAL (context_p -> last_cbc_opcode )
87
+ || context_p -> last_cbc_opcode == CBC_PUSH_THIS_LITERAL )
87
88
&& context_p -> last_cbc .literal_type == LEXER_IDENT_LITERAL )
88
89
{
89
90
if (context_p -> status_flags & PARSER_IS_STRICT )
@@ -124,6 +125,13 @@ parser_emit_unary_lvalue_opcode (parser_context_t *context_p, /**< context */
124
125
CBC_DELETE_IDENT_PUSH_RESULT ,
125
126
context_p -> last_cbc .value );
126
127
}
128
+ else if (context_p -> last_cbc_opcode == CBC_PUSH_THIS_LITERAL )
129
+ {
130
+ context_p -> last_cbc_opcode = CBC_PUSH_THIS ;
131
+ parser_emit_cbc_literal (context_p ,
132
+ CBC_DELETE_IDENT_PUSH_RESULT ,
133
+ context_p -> lit_object .index );
134
+ }
127
135
else
128
136
{
129
137
JERRY_ASSERT (context_p -> last_cbc_opcode == CBC_PUSH_THREE_LITERALS );
@@ -149,6 +157,13 @@ parser_emit_unary_lvalue_opcode (parser_context_t *context_p, /**< context */
149
157
(uint16_t ) (opcode + CBC_UNARY_LVALUE_WITH_IDENT ),
150
158
context_p -> last_cbc .value );
151
159
}
160
+ else if (context_p -> last_cbc_opcode == CBC_PUSH_THIS_LITERAL )
161
+ {
162
+ context_p -> last_cbc_opcode = CBC_PUSH_THIS ;
163
+ parser_emit_cbc_literal (context_p ,
164
+ (uint16_t ) (opcode + CBC_UNARY_LVALUE_WITH_IDENT ),
165
+ context_p -> lit_object .index );
166
+ }
152
167
else
153
168
{
154
169
JERRY_ASSERT (context_p -> last_cbc_opcode == CBC_PUSH_THREE_LITERALS );
@@ -164,14 +179,6 @@ parser_emit_unary_lvalue_opcode (parser_context_t *context_p, /**< context */
164
179
JERRY_ASSERT (CBC_SAME_ARGS (CBC_PUSH_PROP , opcode ));
165
180
context_p -> last_cbc_opcode = (uint16_t ) opcode ;
166
181
}
167
- else if (context_p -> last_cbc_opcode == CBC_PUSH_THIS_LITERAL
168
- && context_p -> last_cbc .literal_type == LEXER_IDENT_LITERAL )
169
- {
170
- context_p -> last_cbc_opcode = CBC_PUSH_THIS ;
171
- parser_emit_cbc_literal (context_p ,
172
- (uint16_t ) (opcode + CBC_UNARY_LVALUE_WITH_IDENT ),
173
- context_p -> lit_object .index );
174
- }
175
182
else
176
183
{
177
184
switch (context_p -> last_cbc_opcode )
0 commit comments