Introduce parser-time optimization that replaces a function's local variables with registers.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-08-21 14:19:04 +03:00
parent 91aecc3bd0
commit 5b9ce05491
11 changed files with 360 additions and 65 deletions
+3 -2
View File
@@ -295,9 +295,10 @@ VM_OP_3 (is_false_jmp_down, IS_FALSE_JMP_DOWN,
VM_OP_1 (var_decl, VAR_DECL,
variable_name, VM_OP_ARG_TYPE_STRING)
VM_OP_2 (reg_var_decl, REG_VAR_DECL,
VM_OP_3 (reg_var_decl, REG_VAR_DECL,
min, VM_OP_ARG_TYPE_REGISTER,
max, VM_OP_ARG_TYPE_REGISTER)
max, VM_OP_ARG_TYPE_REGISTER,
local_var_regs_num, VM_OP_ARG_TYPE_INTEGER_CONST)
VM_OP_3 (meta, META,
type, VM_OP_ARG_TYPE_INTEGER_CONST,