mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2026-02-07 16:16:32 +00:00
Use C99's variable length array instead of alloca
JerryScript-DCO-1.0-Signed-off-by: Yanhui Shen shen.elf@gmail.com
This commit is contained in:
parent
8edab96162
commit
ba2b7dd13f
@ -36,8 +36,6 @@
|
||||
#include "vm.h"
|
||||
#include "vm-stack.h"
|
||||
|
||||
#include <alloca.h>
|
||||
|
||||
/** \addtogroup vm Virtual machine
|
||||
* @{
|
||||
*
|
||||
@ -2635,9 +2633,7 @@ vm_run_with_alloca (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
|
||||
ecma_length_t arg_list_len, /**< length of arguments list */
|
||||
uint32_t call_stack_size) /**< call stack size */
|
||||
{
|
||||
size_t size = call_stack_size * sizeof (ecma_value_t);
|
||||
|
||||
ecma_value_t *stack = (ecma_value_t *) alloca (size);
|
||||
ecma_value_t stack[call_stack_size];
|
||||
|
||||
frame_ctx_p->registers_p = stack;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user