Introduce CBC_MOV_IDENT opcode to improve performance (#3020)
After this patch CBC_ASSIGN_SET_IDENT is transformed to CBC_MOV_IDENT if the opcode has register stored literal argument. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
Dániel Bátyai
parent
996459714c
commit
3af0079a0e
@@ -1941,6 +1941,19 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
left_value = ECMA_VALUE_UNDEFINED;
|
||||
break;
|
||||
}
|
||||
case VM_OC_MOV_IDENT:
|
||||
{
|
||||
uint16_t literal_index;
|
||||
|
||||
READ_LITERAL_INDEX (literal_index);
|
||||
|
||||
JERRY_ASSERT (literal_index < register_end);
|
||||
JERRY_ASSERT (!(opcode_data & (VM_OC_PUT_STACK | VM_OC_PUT_BLOCK)));
|
||||
|
||||
ecma_fast_free_value (frame_ctx_p->registers_p[literal_index]);
|
||||
frame_ctx_p->registers_p[literal_index] = left_value;
|
||||
continue;
|
||||
}
|
||||
case VM_OC_ASSIGN_PROP:
|
||||
{
|
||||
result = stack_top_p[-1];
|
||||
|
||||
@@ -148,6 +148,7 @@ typedef enum
|
||||
VM_OC_PROP_DELETE, /**< delete property */
|
||||
VM_OC_DELETE, /**< delete */
|
||||
|
||||
VM_OC_MOV_IDENT, /**< move identifier register reference */
|
||||
VM_OC_ASSIGN, /**< assign */
|
||||
VM_OC_ASSIGN_PROP, /**< assign property */
|
||||
VM_OC_ASSIGN_PROP_THIS, /**< assign prop this */
|
||||
|
||||
Reference in New Issue
Block a user