From 7c55a150022d633ee951840bc664e48ff2dc9065 Mon Sep 17 00:00:00 2001 From: "e.gavrin" Date: Wed, 9 Jul 2014 19:58:28 +0400 Subject: [PATCH] uncomment assert (opcode <=4) --- src/libcoreint/interpreter.c | 17 ++++++++--------- src/libcoreint/interpreter.h | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/libcoreint/interpreter.c b/src/libcoreint/interpreter.c index f497629f8..7ba03e17d 100644 --- a/src/libcoreint/interpreter.c +++ b/src/libcoreint/interpreter.c @@ -32,12 +32,12 @@ gen_bytecode () wait(500); } */ -// save_op_data (0, getop_loop_inf (1)); -// save_op_data (1, getop_call_1 (0, 12)); -// save_op_data (2, getop_call_1 (0, 13)); -// save_op_data (3, getop_call_1 (0, 14)); -// save_op_data (4, getop_call_1 (0, 15)); -// save_op_data (5, getop_jmp (0)); + // save_op_data (0, getop_loop_inf (1)); + // save_op_data (1, getop_call_1 (0, 12)); + // save_op_data (2, getop_call_1 (0, 13)); + // save_op_data (3, getop_call_1 (0, 14)); + // save_op_data (4, getop_call_1 (0, 15)); + // save_op_data (5, getop_jmp (0)); #ifdef __MCU // It's mandatory to restart app! @@ -49,8 +49,7 @@ void init_int () { #define INIT_OP_FUNC(name) __opfuncs[ name ] = opfunc_##name ; - // FIXME - // JERRY_STATIC_ASSERT (sizeof (OPCODE) <= 4); + JERRY_STATIC_ASSERT (sizeof (OPCODE) <= 4); OP_LIST (INIT_OP_FUNC) } @@ -65,7 +64,7 @@ run_int () while (true) { - run_int_from_pos(&int_data); + run_int_from_pos (&int_data); } } diff --git a/src/libcoreint/interpreter.h b/src/libcoreint/interpreter.h index 9e1a993eb..df556e39c 100644 --- a/src/libcoreint/interpreter.h +++ b/src/libcoreint/interpreter.h @@ -31,10 +31,10 @@ opfunc __opfuncs[LAST_OP]; struct __int_data { - int pos; + int pos; /**< current opcode to execute */ ecma_Object_t *pThisBinding; /**< this binding for current context */ ecma_Object_t *pLexEnv; /**< current lexical environment */ - int *root_op_addr; + int *root_op_addr; /**< pointer to first opcode saved */ }; void gen_bytecode (void);