Remove of 'this_binding' opcode.

- introduce 'const' register type;
 - adding constant register for reading ThisBinding value of active interpreter context.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-10-06 11:52:14 +03:00
parent f2c3e59bbe
commit 1e2dfc73f5
9 changed files with 10 additions and 47 deletions
-26
View File
@@ -1350,32 +1350,6 @@ opfunc_logical_not (vm_instr_t instr, /**< instruction */
return ret_value;
} /* opfunc_logical_not */
/**
* 'This' opcode handler.
*
* See also: ECMA-262 v5, 11.1.1
*
* @return completion value
* Returned value must be freed with ecma_free_completion_value
*/
ecma_completion_value_t
opfunc_this_binding (vm_instr_t instr, /**< instruction */
vm_frame_ctx_t *frame_ctx_p) /**< interpreter context */
{
const vm_idx_t dst_var_idx = instr.data.this_binding.lhs;
const vm_instr_counter_t lit_oc = frame_ctx_p->pos;
frame_ctx_p->pos++;
ecma_completion_value_t ret_value;
ret_value = set_variable_value (frame_ctx_p, lit_oc,
dst_var_idx,
frame_ctx_p->this_binding);
return ret_value;
} /* opfunc_this_binding */
/**
* 'With' opcode handler.
*