From 7b7d86f5fd9b88d7852f006b1be8c79df302969e Mon Sep 17 00:00:00 2001 From: Zidong Jiang Date: Tue, 20 Sep 2016 19:11:53 +0800 Subject: [PATCH] Remove the vm_run_with_inline. (#1363) JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com --- jerry-core/vm/vm.c | 54 ++++------------------------------------------ 1 file changed, 4 insertions(+), 50 deletions(-) diff --git a/jerry-core/vm/vm.c b/jerry-core/vm/vm.c index b56545e30..868974995 100644 --- a/jerry-core/vm/vm.c +++ b/jerry-core/vm/vm.c @@ -2616,43 +2616,6 @@ vm_execute (vm_frame_ctx_t *frame_ctx_p, /**< frame context */ return completion_value; } /* vm_execute */ -#define INLINE_STACK_SIZE 16 - -/** - * Run the code with inline stack. - * - * @return ecma value - */ -static ecma_value_t __attr_noinline___ -vm_run_with_inline_stack (vm_frame_ctx_t *frame_ctx_p, /**< frame context */ - const ecma_value_t *arg_p, /**< arguments list */ - ecma_length_t arg_list_len) /**< length of arguments list */ -{ - ecma_value_t inline_stack[INLINE_STACK_SIZE]; - - frame_ctx_p->registers_p = inline_stack; - - return vm_execute (frame_ctx_p, arg_p, arg_list_len); -} /* vm_run_with_inline_stack */ - -/** - * Run the code with inline stack. - * - * @return ecma value - */ -static ecma_value_t __attr_noinline___ -vm_run_with_alloca (vm_frame_ctx_t *frame_ctx_p, /**< frame context */ - const ecma_value_t *arg_p, /**< arguments list */ - ecma_length_t arg_list_len, /**< length of arguments list */ - uint32_t call_stack_size) /**< call stack size */ -{ - ecma_value_t stack[call_stack_size]; - - frame_ctx_p->registers_p = stack; - - return vm_execute (frame_ctx_p, arg_p, arg_list_len); -} /* vm_run_with_alloca */ - /** * Run the code. * @@ -2700,19 +2663,10 @@ vm_run (const ecma_compiled_code_t *bytecode_header_p, /**< byte-code data heade frame_ctx.is_eval_code = is_eval_code; frame_ctx.call_operation = VM_NO_EXEC_OP; - if (call_stack_size <= INLINE_STACK_SIZE) - { - return vm_run_with_inline_stack (&frame_ctx, - arg_list_p, - arg_list_len); - } - else - { - return vm_run_with_alloca (&frame_ctx, - arg_list_p, - arg_list_len, - call_stack_size); - } + ecma_value_t stack[call_stack_size]; + frame_ctx.registers_p = stack; + + return vm_execute (&frame_ctx, arg_list_p, arg_list_len); } /* vm_run */ /**