Skip to content

Commit 92e0bad

Browse files
committed
Change temporary register allocation mechanism.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
1 parent 36e90d9 commit 92e0bad

File tree

5 files changed

+453
-162
lines changed

5 files changed

+453
-162
lines changed

jerry-core/parser/js/jsp-early-error.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jsp_early_error_start_checking_of_prop_names (void)
114114
}
115115

116116
void
117-
jsp_early_error_add_prop_name (jsp_operand_t op, prop_type pt)
117+
jsp_early_error_add_prop_name (const jsp_operand_t &op, prop_type pt)
118118
{
119119
JERRY_ASSERT (op.is_literal_operand ());
120120
STACK_PUSH (props, create_prop_literal (lit_get_literal_by_cp (op.get_literal ()), pt));
@@ -200,11 +200,14 @@ jsp_early_error_start_checking_of_vargs (void)
200200
STACK_PUSH (size_t_stack, STACK_SIZE (props));
201201
}
202202

203-
void jsp_early_error_add_varg (jsp_operand_t op)
203+
/**
204+
* Add argument of a function declaration or function expression to the list
205+
*/
206+
void jsp_early_error_add_varg (const jsp_operand_t &op) /* operand, containing an argument */
204207
{
205208
JERRY_ASSERT (op.is_literal_operand ());
206209
STACK_PUSH (props, create_prop_literal (lit_get_literal_by_cp (op.get_literal ()), VARG));
207-
}
210+
} /* jsp_early_error_add_varg */
208211

209212
static void
210213
emit_error_on_eval_and_arguments (literal_t lit, locus loc __attr_unused___)
@@ -221,7 +224,7 @@ emit_error_on_eval_and_arguments (literal_t lit, locus loc __attr_unused___)
221224
}
222225

223226
void
224-
jsp_early_error_check_for_eval_and_arguments_in_strict_mode (jsp_operand_t op, bool is_strict, locus loc)
227+
jsp_early_error_check_for_eval_and_arguments_in_strict_mode (const jsp_operand_t &op, bool is_strict, locus loc)
225228
{
226229
if (is_strict
227230
&& op.is_literal_operand ())

jerry-core/parser/js/jsp-early-error.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ void jsp_early_error_init (void);
7676
void jsp_early_error_free (void);
7777

7878
void jsp_early_error_start_checking_of_prop_names (void);
79-
void jsp_early_error_add_prop_name (jsp_operand_t, prop_type);
79+
void jsp_early_error_add_prop_name (const jsp_operand_t &, prop_type);
8080
void jsp_early_error_check_for_duplication_of_prop_names (bool, locus);
8181

8282
void jsp_early_error_start_checking_of_vargs (void);
83-
void jsp_early_error_add_varg (jsp_operand_t);
84-
void jsp_early_error_check_for_eval_and_arguments_in_strict_mode (jsp_operand_t, bool, locus);
83+
void jsp_early_error_add_varg (const jsp_operand_t &);
84+
void jsp_early_error_check_for_eval_and_arguments_in_strict_mode (const jsp_operand_t &, bool, locus);
8585
void jsp_early_error_check_for_syntax_errors_in_formal_param_list (bool, locus);
8686

8787
void jsp_early_error_check_delete (bool, locus);

0 commit comments

Comments
 (0)