Fix func_decl_0: correctly set interpreter's opcode counter.

This commit is contained in:
Ruben Ayrapetyan
2014-08-07 19:35:11 +04:00
parent 99c15ef802
commit cc4d55803c
3 changed files with 14 additions and 2 deletions
+3 -2
View File
@@ -1338,8 +1338,9 @@ opfunc_func_decl_0(OPCODE opdata, /**< operation data */
TODO( Iterate vargs );
const opcode_counter_t jmp_down_opcode_idx = (opcode_counter_t) (int_data->pos);
TODO( ASSERT( Current opcode is jmp_down ) );
OPCODE jmp_down_opcode = read_opcode( jmp_down_opcode_idx );
JERRY_ASSERT( jmp_down_opcode.op_idx == __op__idx_jmp_down );
int_data->pos = (opcode_counter_t) ( jmp_down_opcode_idx + jmp_down_opcode.data.jmp_down.opcode_count );
const opcode_counter_t function_code_opcode_idx = (opcode_counter_t) (jmp_down_opcode_idx + 1);