aboutsummaryrefslogtreecommitdiff
path: root/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c
diff options
context:
space:
mode:
authorLászló Langó <llango.u-szeged@partner.samsung.com>2016-03-17 11:08:53 +0100
committerLászló Langó <llango.u-szeged@partner.samsung.com>2016-03-22 08:05:00 +0100
commit2027caeda5d3d93cad7ce44d334c5b5b079d7b99 (patch)
tree2103916fc73ef3d407de9aa1dce810946677abcd /jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c
parent94f887919eb15e6af22c2e78bad1c1ac9606495a (diff)
Performance optimizations
* inline some hot function * add 'ecma_copy_value_if_not_object' similer to 'ecma_value_free_if_not_object' * remove unnecessary helpers * improve 'do_number_bitwise_logic' JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
Diffstat (limited to 'jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c')
-rw-r--r--jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c
index b2a2032a..2c7cdcd5 100644
--- a/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c
+++ b/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c
@@ -1,4 +1,4 @@
-/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
+/* Copyright 2014-2016 Samsung Electronics Co., Ltd.
* Copyright 2015-2016 University of Szeged.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -139,7 +139,7 @@ ecma_builtin_function_prototype_object_apply (ecma_value_t this_arg, /**< this a
ecma_op_object_get (obj_p, curr_idx_str_p),
ret_value);
- arguments_list_p[index] = ecma_copy_value (get_value, true);
+ arguments_list_p[index] = ecma_copy_value (get_value);
last_index = index + 1;
ECMA_FINALIZE (get_value);
@@ -256,7 +256,7 @@ ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this ar
if (arg_count > 0)
{
- bound_this_prop_p->v.internal_property.value = ecma_copy_value (arguments_list_p[0], false);
+ bound_this_prop_p->v.internal_property.value = ecma_copy_value_if_not_object (arguments_list_p[0]);
}
else
{
@@ -292,7 +292,7 @@ ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this ar
const ecma_length_t bound_arg_count = arg_count > 1 ? arg_count - 1 : 0;
/* 15.a */
- *length_p = *ecma_get_number_from_value (get_len_value) - ecma_uint32_to_number (bound_arg_count);
+ *length_p = *ecma_get_number_from_value (get_len_value) - ((ecma_number_t) bound_arg_count);
ecma_free_value (get_len_value);
/* 15.b */