From 175f8912b295bfad0a8b87da0ac34cba271306ad Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Wed, 15 Apr 2015 22:25:40 +0300 Subject: [PATCH] Passing ecma_value_t by value instead of by reference. --- jerry-core/ecma/base/ecma-helpers-value.cpp | 46 ++++---- jerry-core/ecma/base/ecma-helpers.cpp | 4 +- jerry-core/ecma/base/ecma-helpers.h | 40 +++---- .../ecma-builtin-array-prototype.cpp | 2 +- .../builtin-objects/ecma-builtin-array.cpp | 4 +- .../ecma-builtin-boolean-prototype.cpp | 4 +- .../ecma-builtin-error-prototype.cpp | 2 +- .../ecma-builtin-function-prototype.cpp | 12 +- .../builtin-objects/ecma-builtin-global.cpp | 40 +++---- ...a-builtin-internal-routines-template.inc.h | 8 +- .../builtin-objects/ecma-builtin-jerry.cpp | 103 +++++++----------- .../builtin-objects/ecma-builtin-math.cpp | 70 ++++++------ .../ecma-builtin-number-prototype.cpp | 18 +-- .../ecma-builtin-object-prototype.cpp | 18 +-- .../builtin-objects/ecma-builtin-object.cpp | 62 +++++------ .../ecma-builtin-string-prototype.cpp | 72 ++++++------ .../builtin-objects/ecma-builtin-string.cpp | 2 +- .../builtin-objects/ecma-builtins-internal.h | 2 +- .../ecma/builtin-objects/ecma-builtins.cpp | 6 +- .../ecma/builtin-objects/ecma-builtins.h | 2 +- .../ecma/operations/ecma-boolean-object.cpp | 2 +- .../ecma/operations/ecma-boolean-object.h | 2 +- .../ecma/operations/ecma-comparison.cpp | 16 +-- jerry-core/ecma/operations/ecma-comparison.h | 12 +- .../ecma/operations/ecma-conversion.cpp | 18 +-- jerry-core/ecma/operations/ecma-conversion.h | 18 +-- .../ecma/operations/ecma-function-object.cpp | 8 +- .../ecma/operations/ecma-function-object.h | 8 +- .../ecma/operations/ecma-get-put-value.cpp | 4 +- jerry-core/ecma/operations/ecma-lex-env.cpp | 4 +- jerry-core/ecma/operations/ecma-lex-env.h | 8 +- .../ecma/operations/ecma-number-object.cpp | 2 +- .../ecma/operations/ecma-number-object.h | 2 +- .../ecma/operations/ecma-objects-general.cpp | 4 +- .../ecma/operations/ecma-objects-general.h | 4 +- jerry-core/ecma/operations/ecma-objects.cpp | 4 +- jerry-core/ecma/operations/ecma-objects.h | 4 +- jerry-core/ecma/operations/ecma-reference.cpp | 2 +- jerry-core/ecma/operations/ecma-reference.h | 2 +- jerry-core/jerry-internal.h | 2 +- jerry-core/jerry.cpp | 4 +- jerry-core/vm/opcodes-ecma-arithmetics.cpp | 4 +- jerry-core/vm/opcodes-ecma-bitwise.cpp | 4 +- jerry-core/vm/opcodes-ecma-support.h | 2 +- jerry-core/vm/opcodes-helpers-variables.cpp | 2 +- jerry-core/vm/vm.cpp | 2 +- jerry-core/vm/vm.h | 2 +- 47 files changed, 319 insertions(+), 344 deletions(-) diff --git a/jerry-core/ecma/base/ecma-helpers-value.cpp b/jerry-core/ecma/base/ecma-helpers-value.cpp index 583341e51..709672566 100644 --- a/jerry-core/ecma/base/ecma-helpers-value.cpp +++ b/jerry-core/ecma/base/ecma-helpers-value.cpp @@ -36,7 +36,7 @@ JERRY_STATIC_ASSERT (sizeof (ecma_completion_value_t) * JERRY_BITSINBYTE >= ECMA * @return type field */ static ecma_type_t __attr_pure___ -ecma_get_value_type_field (const ecma_value_t& value) /**< ecma-value */ +ecma_get_value_type_field (ecma_value_t value) /**< ecma-value */ { return (ecma_type_t) jrt_extract_bit_field (value, ECMA_VALUE_TYPE_POS, @@ -49,7 +49,7 @@ ecma_get_value_type_field (const ecma_value_t& value) /**< ecma-value */ * @return value field */ static uintptr_t __attr_pure___ -ecma_get_value_value_field (const ecma_value_t& value) /**< ecma-value */ +ecma_get_value_value_field (ecma_value_t value) /**< ecma-value */ { return (uintptr_t) jrt_extract_bit_field (value, ECMA_VALUE_VALUE_POS, @@ -62,7 +62,7 @@ ecma_get_value_value_field (const ecma_value_t& value) /**< ecma-value */ * @return ecma-value with updated field */ static ecma_value_t __attr_pure___ -ecma_set_value_type_field (const ecma_value_t& value, /**< ecma-value to set field in */ +ecma_set_value_type_field (ecma_value_t value, /**< ecma-value to set field in */ ecma_type_t type_field) /**< new field value */ { return (ecma_value_t) jrt_set_bit_field_value (value, @@ -77,7 +77,7 @@ ecma_set_value_type_field (const ecma_value_t& value, /**< ecma-value to set fie * @return ecma-value with updated field */ static ecma_value_t __attr_pure___ -ecma_set_value_value_field (const ecma_value_t& value, /**< ecma-value to set field in */ +ecma_set_value_value_field (ecma_value_t value, /**< ecma-value to set field in */ uintptr_t value_field) /**< new field value */ { return (ecma_value_t) jrt_set_bit_field_value (value, @@ -93,7 +93,7 @@ ecma_set_value_value_field (const ecma_value_t& value, /**< ecma-value to set fi * false - otherwise. */ bool __attr_pure___ __attr_always_inline___ -ecma_is_value_empty (const ecma_value_t& value) /**< ecma-value */ +ecma_is_value_empty (ecma_value_t value) /**< ecma-value */ { return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE && ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_EMPTY); @@ -106,7 +106,7 @@ ecma_is_value_empty (const ecma_value_t& value) /**< ecma-value */ * false - otherwise. */ bool __attr_pure___ __attr_always_inline___ -ecma_is_value_undefined (const ecma_value_t& value) /**< ecma-value */ +ecma_is_value_undefined (ecma_value_t value) /**< ecma-value */ { return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE && ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_UNDEFINED); @@ -119,7 +119,7 @@ ecma_is_value_undefined (const ecma_value_t& value) /**< ecma-value */ * false - otherwise. */ bool __attr_pure___ __attr_always_inline___ -ecma_is_value_null (const ecma_value_t& value) /**< ecma-value */ +ecma_is_value_null (ecma_value_t value) /**< ecma-value */ { return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE && ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_NULL); @@ -132,7 +132,7 @@ ecma_is_value_null (const ecma_value_t& value) /**< ecma-value */ * false - otherwise. */ bool __attr_pure___ __attr_always_inline___ -ecma_is_value_boolean (const ecma_value_t& value) /**< ecma-value */ +ecma_is_value_boolean (ecma_value_t value) /**< ecma-value */ { return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE && (ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_TRUE @@ -149,7 +149,7 @@ ecma_is_value_boolean (const ecma_value_t& value) /**< ecma-value */ * false - otherwise. */ bool __attr_pure___ __attr_always_inline___ -ecma_is_value_true (const ecma_value_t& value) /**< ecma-value */ +ecma_is_value_true (ecma_value_t value) /**< ecma-value */ { return (ecma_get_value_type_field (value) == ECMA_TYPE_SIMPLE && ecma_get_value_value_field (value) == ECMA_SIMPLE_VALUE_TRUE); @@ -162,7 +162,7 @@ ecma_is_value_true (const ecma_value_t& value) /**< ecma-value */ * false - otherwise. */ bool __attr_pure___ __attr_always_inline___ -ecma_is_value_number (const ecma_value_t& value) /**< ecma-value */ +ecma_is_value_number (ecma_value_t value) /**< ecma-value */ { return (ecma_get_value_type_field (value) == ECMA_TYPE_NUMBER); } /* ecma_is_value_number */ @@ -174,7 +174,7 @@ ecma_is_value_number (const ecma_value_t& value) /**< ecma-value */ * false - otherwise. */ bool __attr_pure___ __attr_always_inline___ -ecma_is_value_string (const ecma_value_t& value) /**< ecma-value */ +ecma_is_value_string (ecma_value_t value) /**< ecma-value */ { return (ecma_get_value_type_field (value) == ECMA_TYPE_STRING); } /* ecma_is_value_string */ @@ -186,7 +186,7 @@ ecma_is_value_string (const ecma_value_t& value) /**< ecma-value */ * false - otherwise. */ bool __attr_pure___ __attr_always_inline___ -ecma_is_value_object (const ecma_value_t& value) /**< ecma-value */ +ecma_is_value_object (ecma_value_t value) /**< ecma-value */ { return (ecma_get_value_type_field (value) == ECMA_TYPE_OBJECT); } /* ecma_is_value_object */ @@ -196,7 +196,7 @@ ecma_is_value_object (const ecma_value_t& value) /**< ecma-value */ * script-visible types, i.e.: undefined, null, boolean, number, string, object. */ void -ecma_check_value_type_is_spec_defined (const ecma_value_t& value) /**< ecma-value */ +ecma_check_value_type_is_spec_defined (ecma_value_t value) /**< ecma-value */ { JERRY_ASSERT (ecma_is_value_undefined (value) || ecma_is_value_null (value) @@ -283,7 +283,7 @@ ecma_make_object_value (const ecma_object_t* object_p) /**< object to reference * @return the pointer */ ecma_number_t* __attr_pure___ -ecma_get_number_from_value (const ecma_value_t& value) /**< ecma-value */ +ecma_get_number_from_value (ecma_value_t value) /**< ecma-value */ { JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_NUMBER); @@ -297,7 +297,7 @@ ecma_get_number_from_value (const ecma_value_t& value) /**< ecma-value */ * @return the pointer */ ecma_string_t* __attr_pure___ -ecma_get_string_from_value (const ecma_value_t& value) /**< ecma-value */ +ecma_get_string_from_value (ecma_value_t value) /**< ecma-value */ { JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_STRING); @@ -311,7 +311,7 @@ ecma_get_string_from_value (const ecma_value_t& value) /**< ecma-value */ * @return the pointer */ ecma_object_t* __attr_pure___ -ecma_get_object_from_value (const ecma_value_t& value) /**< ecma-value */ +ecma_get_object_from_value (ecma_value_t value) /**< ecma-value */ { JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_OBJECT); @@ -341,7 +341,7 @@ ecma_get_object_from_value (const ecma_value_t& value) /**< ecma-value */ * @return See note. */ ecma_value_t -ecma_copy_value (const ecma_value_t& value, /**< ecma-value */ +ecma_copy_value (ecma_value_t value, /**< ecma-value */ bool do_ref_if_object) /**< if the value is object value, increment reference counter of the object */ { @@ -398,7 +398,7 @@ ecma_copy_value (const ecma_value_t& value, /**< ecma-value */ * Free the ecma-value */ void -ecma_free_value (ecma_value_t& value, /**< value description */ +ecma_free_value (ecma_value_t value, /**< value description */ bool do_deref_if_object) /**< if the value is object value, decrement reference counter of the object */ { @@ -499,7 +499,7 @@ ecma_set_completion_value_type_field (ecma_completion_value_t completion_value, static ecma_completion_value_t __attr_pure___ ecma_set_completion_value_value_field (ecma_completion_value_t completion_value, /**< completion value * to set field in */ - const ecma_value_t& value_field) /**< new field value */ + ecma_value_t value_field) /**< new field value */ { return (ecma_completion_value_t) jrt_set_bit_field_value (completion_value, value_field, @@ -534,7 +534,7 @@ ecma_set_completion_value_label_descriptor (ecma_completion_value_t completion_v */ ecma_completion_value_t __attr_pure___ __attr_always_inline___ ecma_make_completion_value (ecma_completion_type_t type, /**< type */ - const ecma_value_t& value) /**< value */ + ecma_value_t value) /**< value */ { const bool is_type_ok = (type == ECMA_COMPLETION_TYPE_NORMAL || type == ECMA_COMPLETION_TYPE_THROW @@ -606,7 +606,7 @@ ecma_make_simple_completion_value (ecma_simple_value_t simple_value) /**< simple * @return completion value */ ecma_completion_value_t __attr_pure___ __attr_always_inline___ -ecma_make_normal_completion_value (const ecma_value_t& value) /**< value */ +ecma_make_normal_completion_value (ecma_value_t value) /**< value */ { return ecma_make_completion_value (ECMA_COMPLETION_TYPE_NORMAL, value); } /* ecma_make_normal_completion_value */ @@ -617,7 +617,7 @@ ecma_make_normal_completion_value (const ecma_value_t& value) /**< value */ * @return completion value */ ecma_completion_value_t __attr_pure___ __attr_always_inline___ -ecma_make_throw_completion_value (const ecma_value_t& value) /**< value */ +ecma_make_throw_completion_value (ecma_value_t value) /**< value */ { return ecma_make_completion_value (ECMA_COMPLETION_TYPE_THROW, value); } /* ecma_make_throw_completion_value */ @@ -656,7 +656,7 @@ ecma_make_empty_completion_value (void) * @return completion value */ ecma_completion_value_t __attr_pure___ __attr_always_inline___ -ecma_make_return_completion_value (const ecma_value_t& value) /**< value */ +ecma_make_return_completion_value (ecma_value_t value) /**< value */ { return ecma_make_completion_value (ECMA_COMPLETION_TYPE_RETURN, value); } /* ecma_make_return_completion_value */ diff --git a/jerry-core/ecma/base/ecma-helpers.cpp b/jerry-core/ecma/base/ecma-helpers.cpp index 044700f89..454a8e2e9 100644 --- a/jerry-core/ecma/base/ecma-helpers.cpp +++ b/jerry-core/ecma/base/ecma-helpers.cpp @@ -924,7 +924,7 @@ ecma_get_named_data_property_value (const ecma_property_t *prop_p) /**< property */ void ecma_set_named_data_property_value (ecma_property_t *prop_p, /**< property */ - const ecma_value_t& value) /**< value to set */ + ecma_value_t value) /**< value to set */ { JERRY_ASSERT (prop_p->type == ECMA_PROPERTY_NAMEDDATA); @@ -940,7 +940,7 @@ ecma_set_named_data_property_value (ecma_property_t *prop_p, /**< property */ void ecma_named_data_property_assign_value (ecma_object_t *obj_p, /**< object */ ecma_property_t *prop_p, /**< property */ - const ecma_value_t& value) /**< value to assign */ + ecma_value_t value) /**< value to assign */ { JERRY_ASSERT (prop_p->type == ECMA_PROPERTY_NAMEDDATA); ecma_assert_object_contains_the_property (obj_p, prop_p); diff --git a/jerry-core/ecma/base/ecma-helpers.h b/jerry-core/ecma/base/ecma-helpers.h index cfdaa4fc9..5e2ceed78 100644 --- a/jerry-core/ecma/base/ecma-helpers.h +++ b/jerry-core/ecma/base/ecma-helpers.h @@ -67,39 +67,39 @@ } /* ecma-helpers-value.c */ -extern bool ecma_is_value_empty (const ecma_value_t& value); -extern bool ecma_is_value_undefined (const ecma_value_t& value); -extern bool ecma_is_value_null (const ecma_value_t& value); -extern bool ecma_is_value_boolean (const ecma_value_t& value); -extern bool ecma_is_value_true (const ecma_value_t& value); +extern bool ecma_is_value_empty (ecma_value_t value); +extern bool ecma_is_value_undefined (ecma_value_t value); +extern bool ecma_is_value_null (ecma_value_t value); +extern bool ecma_is_value_boolean (ecma_value_t value); +extern bool ecma_is_value_true (ecma_value_t value); -extern bool ecma_is_value_number (const ecma_value_t& value); -extern bool ecma_is_value_string (const ecma_value_t& value); -extern bool ecma_is_value_object (const ecma_value_t& value); +extern bool ecma_is_value_number (ecma_value_t value); +extern bool ecma_is_value_string (ecma_value_t value); +extern bool ecma_is_value_object (ecma_value_t value); -extern void ecma_check_value_type_is_spec_defined (const ecma_value_t& value); +extern void ecma_check_value_type_is_spec_defined (ecma_value_t value); extern ecma_value_t ecma_make_simple_value (const ecma_simple_value_t value); extern ecma_value_t ecma_make_number_value (const ecma_number_t* num_p); extern ecma_value_t ecma_make_string_value (const ecma_string_t* ecma_string_p); extern ecma_value_t ecma_make_object_value (const ecma_object_t* object_p); -extern ecma_number_t* __attr_pure___ ecma_get_number_from_value (const ecma_value_t& value); -extern ecma_string_t* __attr_pure___ ecma_get_string_from_value (const ecma_value_t& value); -extern ecma_object_t* __attr_pure___ ecma_get_object_from_value (const ecma_value_t& value); -extern ecma_value_t ecma_copy_value (const ecma_value_t& value, bool do_ref_if_object); -extern void ecma_free_value (ecma_value_t& value, bool do_deref_if_object); +extern ecma_number_t* __attr_pure___ ecma_get_number_from_value (ecma_value_t value); +extern ecma_string_t* __attr_pure___ ecma_get_string_from_value (ecma_value_t value); +extern ecma_object_t* __attr_pure___ ecma_get_object_from_value (ecma_value_t value); +extern ecma_value_t ecma_copy_value (ecma_value_t value, bool do_ref_if_object); +extern void ecma_free_value (ecma_value_t value, bool do_deref_if_object); extern ecma_completion_value_t ecma_make_completion_value (ecma_completion_type_t type, - const ecma_value_t& value); + ecma_value_t value); extern ecma_completion_value_t ecma_make_label_completion_value (ecma_completion_type_t type, uint8_t depth_level, uint16_t offset); extern ecma_completion_value_t ecma_make_simple_completion_value (ecma_simple_value_t simple_value); -extern ecma_completion_value_t ecma_make_normal_completion_value (const ecma_value_t& value); -extern ecma_completion_value_t ecma_make_throw_completion_value (const ecma_value_t& value); +extern ecma_completion_value_t ecma_make_normal_completion_value (ecma_value_t value); +extern ecma_completion_value_t ecma_make_throw_completion_value (ecma_value_t value); extern ecma_completion_value_t ecma_make_throw_obj_completion_value (ecma_object_t *exception_p); extern ecma_completion_value_t ecma_make_empty_completion_value (void); -extern ecma_completion_value_t ecma_make_return_completion_value (const ecma_value_t& value); +extern ecma_completion_value_t ecma_make_return_completion_value (ecma_value_t value); extern ecma_completion_value_t ecma_make_exit_completion_value (bool is_successful); extern ecma_completion_value_t ecma_make_meta_completion_value (void); extern ecma_value_t ecma_get_completion_value_value (ecma_completion_value_t completion_value); @@ -281,10 +281,10 @@ extern void ecma_free_property (ecma_object_t *obj_p, ecma_property_t *prop_p); extern void ecma_delete_property (ecma_object_t *obj_p, ecma_property_t *prop_p); extern ecma_value_t ecma_get_named_data_property_value (const ecma_property_t *prop_p); -extern void ecma_set_named_data_property_value (ecma_property_t *prop_p, const ecma_value_t& value); +extern void ecma_set_named_data_property_value (ecma_property_t *prop_p, ecma_value_t value); extern void ecma_named_data_property_assign_value (ecma_object_t *obj_p, ecma_property_t *prop_p, - const ecma_value_t& value); + ecma_value_t value); extern ecma_object_t* ecma_get_named_accessor_property_getter (const ecma_property_t *prop_p); extern ecma_object_t* ecma_get_named_accessor_property_setter (const ecma_property_t *prop_p); diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.cpp index 31a1e92a3..0209b0364 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.cpp @@ -54,7 +54,7 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_array_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_array_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg); } /* ecma_builtin_array_prototype_object_to_string */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-array.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-array.cpp index 064f3437a..ccf4b41a0 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-array.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-array.cpp @@ -54,8 +54,8 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_array_object_is_array (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg) /**< first argument */ +ecma_builtin_array_object_is_array (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg) /**< first argument */ { ecma_simple_value_t is_array = ECMA_SIMPLE_VALUE_FALSE; diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.cpp index 02e12b1de..ab308957d 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.cpp @@ -54,7 +54,7 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_boolean_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_boolean_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */ { ecma_completion_value_t ret_value; @@ -92,7 +92,7 @@ ecma_builtin_boolean_prototype_object_to_string (const ecma_value_t& this_arg) / * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_boolean_prototype_object_value_of (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_boolean_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */ { if (ecma_is_value_boolean (this_arg)) { diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.cpp index dc0035dd4..72b096c1f 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.cpp @@ -54,7 +54,7 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_error_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_error_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */ { ecma_completion_value_t ret_value; diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.cpp index b0b715f8c..84888f642 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.cpp @@ -51,7 +51,7 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_function_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_function_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg); } /* ecma_builtin_function_prototype_object_to_string */ @@ -66,9 +66,9 @@ ecma_builtin_function_prototype_object_to_string (const ecma_value_t& this_arg) * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_function_prototype_object_apply (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg1, /**< first argument */ - const ecma_value_t& arg2) /**< second argument */ +ecma_builtin_function_prototype_object_apply (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg1, /**< first argument */ + ecma_value_t arg2) /**< second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_function_prototype_object_apply */ @@ -83,7 +83,7 @@ ecma_builtin_function_prototype_object_apply (const ecma_value_t& this_arg, /**< * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_function_prototype_object_call (const ecma_value_t& this_arg, /**< this argument */ +ecma_builtin_function_prototype_object_call (ecma_value_t this_arg, /**< this argument */ const ecma_value_t* arguments_list_p, /**< list of arguments */ ecma_length_t arguments_number) /**< number of arguments */ { @@ -122,7 +122,7 @@ ecma_builtin_function_prototype_object_call (const ecma_value_t& this_arg, /**< * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_function_prototype_object_bind (const ecma_value_t& this_arg, /**< this argument */ +ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this argument */ const ecma_value_t* arguments_list_p, /**< list of arguments */ ecma_length_t arguments_number) /**< number of arguments */ { diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-global.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-global.cpp index ba8a2053b..e9017c6d9 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-global.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-global.cpp @@ -49,8 +49,8 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_global_object_eval (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& x) /**< routine's first argument */ +ecma_builtin_global_object_eval (ecma_value_t this_arg, /**< this argument */ + ecma_value_t x) /**< routine's first argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, x); } /* ecma_builtin_global_object_eval */ @@ -65,9 +65,9 @@ ecma_builtin_global_object_eval (const ecma_value_t& this_arg, /**< this argumen * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_global_object_parse_int (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& string, /**< routine's first argument */ - const ecma_value_t& radix) /**< routine's second argument */ +ecma_builtin_global_object_parse_int (ecma_value_t this_arg, /**< this argument */ + ecma_value_t string, /**< routine's first argument */ + ecma_value_t radix) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, string, radix); } /* ecma_builtin_global_object_parse_int */ @@ -82,8 +82,8 @@ ecma_builtin_global_object_parse_int (const ecma_value_t& this_arg, /**< this ar * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_global_object_parse_float (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& string) /**< routine's first argument */ +ecma_builtin_global_object_parse_float (ecma_value_t this_arg, /**< this argument */ + ecma_value_t string) /**< routine's first argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, string); } /* ecma_builtin_global_object_parse_float */ @@ -98,8 +98,8 @@ ecma_builtin_global_object_parse_float (const ecma_value_t& this_arg, /**< this * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_global_object_is_nan (const ecma_value_t& this_arg __attr_unused___, /**< this argument */ - const ecma_value_t& arg) /**< routine's first argument */ +ecma_builtin_global_object_is_nan (ecma_value_t this_arg __attr_unused___, /**< this argument */ + ecma_value_t arg) /**< routine's first argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -125,8 +125,8 @@ ecma_builtin_global_object_is_nan (const ecma_value_t& this_arg __attr_unused___ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_global_object_is_finite (const ecma_value_t& this_arg __attr_unused___, /**< this argument */ - const ecma_value_t& arg) /**< routine's first argument */ +ecma_builtin_global_object_is_finite (ecma_value_t this_arg __attr_unused___, /**< this argument */ + ecma_value_t arg) /**< routine's first argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -153,8 +153,8 @@ ecma_builtin_global_object_is_finite (const ecma_value_t& this_arg __attr_unused * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_global_object_decode_uri (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& encoded_uri) /**< routine's first argument */ +ecma_builtin_global_object_decode_uri (ecma_value_t this_arg, /**< this argument */ + ecma_value_t encoded_uri) /**< routine's first argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, encoded_uri); } /* ecma_builtin_global_object_decode_uri */ @@ -169,9 +169,9 @@ ecma_builtin_global_object_decode_uri (const ecma_value_t& this_arg, /**< this a * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_global_object_decode_uri_component (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& encoded_uri_component) /**< routine's - * first argument */ +ecma_builtin_global_object_decode_uri_component (ecma_value_t this_arg, /**< this argument */ + ecma_value_t encoded_uri_component) /**< routine's + * first argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, encoded_uri_component); } /* ecma_builtin_global_object_decode_uri_component */ @@ -186,8 +186,8 @@ ecma_builtin_global_object_decode_uri_component (const ecma_value_t& this_arg, / * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_global_object_encode_uri (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& uri) /**< routine's first argument */ +ecma_builtin_global_object_encode_uri (ecma_value_t this_arg, /**< this argument */ + ecma_value_t uri) /**< routine's first argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, uri); } /* ecma_builtin_global_object_encode_uri */ @@ -202,8 +202,8 @@ ecma_builtin_global_object_encode_uri (const ecma_value_t& this_arg, /**< this a * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_global_object_encode_uri_component (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& uri_component) /**< routine's first argument */ +ecma_builtin_global_object_encode_uri_component (ecma_value_t this_arg, /**< this argument */ + ecma_value_t uri_component) /**< routine's first argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, uri_component); } /* ecma_builtin_global_object_encode_uri_component */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h index 2ca40939a..3e791abb6 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h @@ -32,8 +32,8 @@ #define DISPATCH_ROUTINE_ROUTINE_NAME(builtin_underscored_id) \ PASTE (PASTE (ecma_builtin_, builtin_underscored_id), _dispatch_routine) -#define ROUTINE_ARG(n) , const ecma_value_t& arg ## n -#define ROUTINE_ARG_LIST_0 const ecma_value_t& this_arg +#define ROUTINE_ARG(n) , ecma_value_t arg ## n +#define ROUTINE_ARG_LIST_0 ecma_value_t this_arg #define ROUTINE_ARG_LIST_1 ROUTINE_ARG_LIST_0 ROUTINE_ARG(1) #define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1 ROUTINE_ARG(2) #define ROUTINE_ARG_LIST_3 ROUTINE_ARG_LIST_2 ROUTINE_ARG(3) @@ -277,8 +277,8 @@ TRY_TO_INSTANTIATE_PROPERTY_ROUTINE_NAME (BUILTIN_UNDERSCORED_ID) (ecma_object_t ecma_completion_value_t DISPATCH_ROUTINE_ROUTINE_NAME (BUILTIN_UNDERSCORED_ID) (uint16_t builtin_routine_id, /**< built-in wide routine identifier */ - const ecma_value_t& this_arg_value, /**< 'this' argument - value */ + ecma_value_t this_arg_value, /**< 'this' argument + value */ const ecma_value_t arguments_list [], /**< list of arguments passed to routine */ ecma_length_t arguments_number) /**< length of diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-jerry.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-jerry.cpp index e37c90b60..80811556d 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-jerry.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-jerry.cpp @@ -117,7 +117,7 @@ ecma_builtin_jerry_try_to_instantiate_property (ecma_object_t *obj_p, /**< objec */ ecma_completion_value_t ecma_builtin_jerry_dispatch_routine (uint16_t builtin_routine_id, /**< built-in wide identifier of routine */ - const ecma_value_t& this_arg_value __attr_unused___, /**< 'this' argument value */ + ecma_value_t this_arg_value __attr_unused___, /**< 'this' argument value */ const ecma_value_t arguments_list [], /**< list of arguments * passed to routine */ ecma_length_t arguments_number) /**< length of arguments' list */ @@ -497,71 +497,46 @@ ecma_op_extension_object_get_own_property (ecma_object_t *obj_p, /**< the extens ECMA_PROPERTY_NOT_ENUMERABLE, ECMA_PROPERTY_NOT_CONFIGURABLE); - switch (field_p->type) + if (field_p->type == JERRY_API_DATA_TYPE_UNDEFINED) { - case JERRY_API_DATA_TYPE_VOID: - { - JERRY_UNREACHABLE (); - } - case JERRY_API_DATA_TYPE_UNDEFINED: - { - value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED); - - break; - } - case JERRY_API_DATA_TYPE_NULL: - { - value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL); - - break; - } - case JERRY_API_DATA_TYPE_BOOLEAN: - { - value = ecma_make_simple_value (field_p->v_bool ? ECMA_SIMPLE_VALUE_TRUE : ECMA_SIMPLE_VALUE_FALSE); - - break; - } - case JERRY_API_DATA_TYPE_FLOAT32: - { - ecma_number_t *num_p = ecma_alloc_number (); - *num_p = field_p->v_float32; - value = ecma_make_number_value (num_p); - - break; - } - case JERRY_API_DATA_TYPE_FLOAT64: - { -#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 - JERRY_UNREACHABLE (); -#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 - ecma_number_t *num_p = ecma_alloc_number (); - *num_p = field_p->v_float64; - value = ecma_make_number_value (num_p); + value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED); + } + else if (field_p->type == JERRY_API_DATA_TYPE_NULL) + { + value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL); + } + else if (field_p->type == JERRY_API_DATA_TYPE_BOOLEAN) + { + value = ecma_make_simple_value (field_p->v_bool ? ECMA_SIMPLE_VALUE_TRUE : ECMA_SIMPLE_VALUE_FALSE); + } + else if (field_p->type == JERRY_API_DATA_TYPE_FLOAT32) + { + ecma_number_t *num_p = ecma_alloc_number (); + *num_p = field_p->v_float32; + value = ecma_make_number_value (num_p); + } +#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 + else if (field_p->type == JERRY_API_DATA_TYPE_FLOAT64) + { + JERRY_UNREACHABLE (); + ecma_number_t *num_p = ecma_alloc_number (); + *num_p = field_p->v_float64; + value = ecma_make_number_value (num_p); + } #endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */ - - break; - } - case JERRY_API_DATA_TYPE_UINT32: - { - ecma_number_t *num_p = ecma_alloc_number (); - *num_p = ecma_uint32_to_number (field_p->v_uint32); - JERRY_ASSERT (ecma_number_to_uint32 (*num_p) == field_p->v_uint32); - value = ecma_make_number_value (num_p); - - break; - } - case JERRY_API_DATA_TYPE_STRING: - { - const ecma_char_t *string_p = (const ecma_char_t*) field_p->v_string; - ecma_string_t *str_p = ecma_new_ecma_string (string_p); - value = ecma_make_string_value (str_p); - - break; - } - case JERRY_API_DATA_TYPE_OBJECT: - { - JERRY_UNREACHABLE (); - } + else if (field_p->type == JERRY_API_DATA_TYPE_UINT32) + { + ecma_number_t *num_p = ecma_alloc_number (); + *num_p = ecma_uint32_to_number (field_p->v_uint32); + JERRY_ASSERT (ecma_number_to_uint32 (*num_p) == field_p->v_uint32); + value = ecma_make_number_value (num_p); + } + else + { + JERRY_ASSERT (field_p->type == JERRY_API_DATA_TYPE_STRING); + const ecma_char_t *string_p = (const ecma_char_t*) field_p->v_string; + ecma_string_t *str_p = ecma_new_ecma_string (string_p); + value = ecma_make_string_value (str_p); } ecma_named_data_property_assign_value (obj_p, prop_p, value); diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-math.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-math.cpp index 28a7c5b2b..3e019179c 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-math.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-math.cpp @@ -55,8 +55,8 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_abs (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_abs (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -90,8 +90,8 @@ ecma_builtin_math_object_abs (const ecma_value_t& this_arg __attr_unused___, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_acos (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_acos (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_math_object_acos */ @@ -106,8 +106,8 @@ ecma_builtin_math_object_acos (const ecma_value_t& this_arg, /**< 'this' argumen * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_asin (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_asin (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_math_object_asin */ @@ -122,8 +122,8 @@ ecma_builtin_math_object_asin (const ecma_value_t& this_arg, /**< 'this' argumen * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_atan (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_atan (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_math_object_atan */ @@ -138,9 +138,9 @@ ecma_builtin_math_object_atan (const ecma_value_t& this_arg, /**< 'this' argumen * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_atan2 (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg1, /**< first routine's argument */ - const ecma_value_t& arg2) /**< second routine's argument */ +ecma_builtin_math_object_atan2 (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg1, /**< first routine's argument */ + ecma_value_t arg2) /**< second routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_math_object_atan2 */ @@ -155,8 +155,8 @@ ecma_builtin_math_object_atan2 (const ecma_value_t& this_arg, /**< 'this' argume * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_ceil (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_ceil (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_math_object_ceil */ @@ -171,8 +171,8 @@ ecma_builtin_math_object_ceil (const ecma_value_t& this_arg, /**< 'this' argumen * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_cos (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_cos (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -239,8 +239,8 @@ ecma_builtin_math_object_cos (const ecma_value_t& this_arg __attr_unused___, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_exp (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_exp (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -289,8 +289,8 @@ ecma_builtin_math_object_exp (const ecma_value_t& this_arg __attr_unused___, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_floor (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_floor (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_math_object_floor */ @@ -305,8 +305,8 @@ ecma_builtin_math_object_floor (const ecma_value_t& this_arg, /**< 'this' argume * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_log (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_log (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -352,7 +352,7 @@ ecma_builtin_math_object_log (const ecma_value_t& this_arg __attr_unused___, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_max (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ +ecma_builtin_math_object_max (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ const ecma_value_t args[], /**< arguments list */ ecma_length_t args_number) /**< number of arguments */ { @@ -439,7 +439,7 @@ ecma_builtin_math_object_max (const ecma_value_t& this_arg __attr_unused___, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_min (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ +ecma_builtin_math_object_min (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ const ecma_value_t args[], /**< arguments list */ ecma_length_t args_number) /**< number of arguments */ { @@ -526,9 +526,9 @@ ecma_builtin_math_object_min (const ecma_value_t& this_arg __attr_unused___, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_pow (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg1, /**< first routine's argument */ - const ecma_value_t& arg2) /**< second routine's argument */ +ecma_builtin_math_object_pow (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg1, /**< first routine's argument */ + ecma_value_t arg2) /**< second routine's argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -760,7 +760,7 @@ ecma_builtin_math_object_pow (const ecma_value_t& this_arg __attr_unused___, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_random (const ecma_value_t& this_arg __attr_unused___) /**< 'this' argument */ +ecma_builtin_math_object_random (ecma_value_t this_arg __attr_unused___) /**< 'this' argument */ { /* Implementation of George Marsaglia's XorShift random number generator */ TODO (/* Check for license issues */); @@ -801,8 +801,8 @@ ecma_builtin_math_object_random (const ecma_value_t& this_arg __attr_unused___) * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_round (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_round (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -855,8 +855,8 @@ ecma_builtin_math_object_round (const ecma_value_t& this_arg __attr_unused___, / * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_sin (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_sin (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -923,8 +923,8 @@ ecma_builtin_math_object_sin (const ecma_value_t& this_arg __attr_unused___, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_sqrt (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_sqrt (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); @@ -973,8 +973,8 @@ ecma_builtin_math_object_sqrt (const ecma_value_t& this_arg __attr_unused___, /* * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_math_object_tan (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_math_object_tan (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_math_object_tan */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.cpp index 5066c72d2..4fa752681 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.cpp @@ -54,7 +54,7 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_number_prototype_object_to_string (const ecma_value_t& this_arg, /**< this argument */ +ecma_builtin_number_prototype_object_to_string (ecma_value_t this_arg, /**< this argument */ const ecma_value_t* arguments_list_p, /**< arguments list */ ecma_length_t arguments_list_len) /**< number of arguments */ { @@ -112,7 +112,7 @@ ecma_builtin_number_prototype_object_to_string (const ecma_value_t& this_arg, /* * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_number_prototype_object_to_locale_string (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_number_prototype_object_to_locale_string (ecma_value_t this_arg) /**< this argument */ { return ecma_builtin_number_prototype_object_to_string (this_arg, NULL, 0); } /* ecma_builtin_number_prototype_object_to_locale_string */ @@ -127,7 +127,7 @@ ecma_builtin_number_prototype_object_to_locale_string (const ecma_value_t& this_ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_number_prototype_object_value_of (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_number_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */ { if (ecma_is_value_number (this_arg)) { @@ -167,8 +167,8 @@ ecma_builtin_number_prototype_object_value_of (const ecma_value_t& this_arg) /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_number_prototype_object_to_fixed (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_number_prototype_object_to_fixed (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_number_prototype_object_to_fixed */ @@ -183,8 +183,8 @@ ecma_builtin_number_prototype_object_to_fixed (const ecma_value_t& this_arg, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_number_prototype_object_to_exponential (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_number_prototype_object_to_exponential (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_number_prototype_object_to_exponential */ @@ -199,8 +199,8 @@ ecma_builtin_number_prototype_object_to_exponential (const ecma_value_t& this_ar * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_number_prototype_object_to_precision (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_number_prototype_object_to_precision (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_number_prototype_object_to_precision */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.cpp index 4b00b1be6..18c394d15 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.cpp @@ -52,7 +52,7 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_object_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */ { ecma_magic_string_id_t type_string; @@ -140,7 +140,7 @@ ecma_builtin_object_prototype_object_to_string (const ecma_value_t& this_arg) /* * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_prototype_object_value_of (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_object_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */ { return ecma_op_to_object (this_arg); } /* ecma_builtin_object_prototype_object_value_of */ @@ -155,7 +155,7 @@ ecma_builtin_object_prototype_object_value_of (const ecma_value_t& this_arg) /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_prototype_object_to_locale_string (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_object_prototype_object_to_locale_string (ecma_value_t this_arg) /**< this argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg); } /* ecma_builtin_object_prototype_object_to_locale_string */ @@ -170,8 +170,8 @@ ecma_builtin_object_prototype_object_to_locale_string (const ecma_value_t& this_ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_prototype_object_has_own_property (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< first argument */ +ecma_builtin_object_prototype_object_has_own_property (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< first argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_prototype_object_has_own_property */ @@ -186,8 +186,8 @@ ecma_builtin_object_prototype_object_has_own_property (const ecma_value_t& this_ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_prototype_object_is_prototype_of (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's first argument */ +ecma_builtin_object_prototype_object_is_prototype_of (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's first argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_prototype_object_is_prototype_of */ @@ -202,8 +202,8 @@ ecma_builtin_object_prototype_object_is_prototype_of (const ecma_value_t& this_a * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_prototype_object_property_is_enumerable (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's first argument */ +ecma_builtin_object_prototype_object_property_is_enumerable (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's first argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_prototype_object_property_is_enumerable */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-object.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-object.cpp index 9b717e91b..48bdb4182 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-object.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-object.cpp @@ -111,8 +111,8 @@ ecma_builtin_object_dispatch_construct (const ecma_value_t *arguments_list_p, /* * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_get_prototype_of (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_object_object_get_prototype_of (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_object_get_prototype_of */ @@ -127,8 +127,8 @@ ecma_builtin_object_object_get_prototype_of (const ecma_value_t& this_arg, /**< * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_get_own_property_names (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_object_object_get_own_property_names (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_object_get_own_property_names */ @@ -143,8 +143,8 @@ ecma_builtin_object_object_get_own_property_names (const ecma_value_t& this_arg, * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_seal (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_object_object_seal (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_object_seal */ @@ -159,8 +159,8 @@ ecma_builtin_object_object_seal (const ecma_value_t& this_arg, /**< 'this' argum * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_freeze (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_object_object_freeze (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_object_freeze */ @@ -175,8 +175,8 @@ ecma_builtin_object_object_freeze (const ecma_value_t& this_arg, /**< 'this' arg * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_prevent_extensions (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_object_object_prevent_extensions (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_object_prevent_extensions */ @@ -191,8 +191,8 @@ ecma_builtin_object_object_prevent_extensions (const ecma_value_t& this_arg, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_is_sealed (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_object_is_sealed */ @@ -207,8 +207,8 @@ ecma_builtin_object_object_is_sealed (const ecma_value_t& this_arg, /**< 'this' * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_is_frozen (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_object_is_frozen */ @@ -223,8 +223,8 @@ ecma_builtin_object_object_is_frozen (const ecma_value_t& this_arg, /**< 'this' * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_is_extensible (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_object_object_is_extensible (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_object_is_extensible */ @@ -239,8 +239,8 @@ ecma_builtin_object_object_is_extensible (const ecma_value_t& this_arg, /**< 'th * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_keys (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_object_object_keys (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_object_object_keys */ @@ -255,9 +255,9 @@ ecma_builtin_object_object_keys (const ecma_value_t& this_arg, /**< 'this' argum * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_get_own_property_descriptor (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2) /**< routine's second argument */ +ecma_builtin_object_object_get_own_property_descriptor (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_object_object_get_own_property_descriptor */ @@ -272,9 +272,9 @@ ecma_builtin_object_object_get_own_property_descriptor (const ecma_value_t& this * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_create (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2) /**< routine's second argument */ +ecma_builtin_object_object_create (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_object_object_create */ @@ -289,9 +289,9 @@ ecma_builtin_object_object_create (const ecma_value_t& this_arg, /**< 'this' arg * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_define_properties (const ecma_value_t& this_arg, /**< 'this' argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2) /**< routine's second argument */ +ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this' argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_object_object_define_properties */ @@ -306,10 +306,10 @@ ecma_builtin_object_object_define_properties (const ecma_value_t& this_arg, /**< * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_object_object_define_property (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2, /**< routine's second argument */ - const ecma_value_t& arg3) /**< routine's third argument */ +ecma_builtin_object_object_define_property (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2, /**< routine's second argument */ + ecma_value_t arg3) /**< routine's third argument */ { ecma_completion_value_t ret_value; diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.cpp index a74af209e..7c86e5618 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.cpp @@ -54,7 +54,7 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_to_string (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_string_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */ { if (ecma_is_value_string (this_arg)) { @@ -93,7 +93,7 @@ ecma_builtin_string_prototype_object_to_string (const ecma_value_t& this_arg) /* * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_value_of (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_string_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */ { return ecma_builtin_string_prototype_object_to_string (this_arg); } /* ecma_builtin_string_prototype_object_value_of */ @@ -108,8 +108,8 @@ ecma_builtin_string_prototype_object_value_of (const ecma_value_t& this_arg) /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_char_at (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_string_prototype_object_char_at (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_string_prototype_object_char_at */ @@ -124,8 +124,8 @@ ecma_builtin_string_prototype_object_char_at (const ecma_value_t& this_arg, /**< * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_char_code_at (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_string_prototype_object_char_code_at (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_string_prototype_object_char_code_at */ @@ -140,7 +140,7 @@ ecma_builtin_string_prototype_object_char_code_at (const ecma_value_t& this_arg, * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_concat (const ecma_value_t& this_arg, /**< this argument */ +ecma_builtin_string_prototype_object_concat (ecma_value_t this_arg, /**< this argument */ const ecma_value_t* argument_list_p, /**< arguments list */ ecma_length_t arguments_number) /**< number of arguments */ { @@ -157,9 +157,9 @@ ecma_builtin_string_prototype_object_concat (const ecma_value_t& this_arg, /**< * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_index_of (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2) /**< routine's second argument */ +ecma_builtin_string_prototype_object_index_of (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_string_prototype_object_index_of */ @@ -174,9 +174,9 @@ ecma_builtin_string_prototype_object_index_of (const ecma_value_t& this_arg, /** * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_last_index_of (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2) /**< routine's second argument */ +ecma_builtin_string_prototype_object_last_index_of (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_string_prototype_object_last_index_of */ @@ -191,8 +191,8 @@ ecma_builtin_string_prototype_object_last_index_of (const ecma_value_t& this_arg * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_locale_compare (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_string_prototype_object_locale_compare (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_string_prototype_object_locale_compare */ @@ -207,8 +207,8 @@ ecma_builtin_string_prototype_object_locale_compare (const ecma_value_t& this_ar * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_match (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_string_prototype_object_match (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_string_prototype_object_match */ @@ -223,9 +223,9 @@ ecma_builtin_string_prototype_object_match (const ecma_value_t& this_arg, /**< t * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_replace (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2) /**< routine's second argument */ +ecma_builtin_string_prototype_object_replace (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_string_prototype_object_replace */ @@ -240,8 +240,8 @@ ecma_builtin_string_prototype_object_replace (const ecma_value_t& this_arg, /**< * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_search (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg) /**< routine's argument */ +ecma_builtin_string_prototype_object_search (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg) /**< routine's argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg); } /* ecma_builtin_string_prototype_object_search */ @@ -256,9 +256,9 @@ ecma_builtin_string_prototype_object_search (const ecma_value_t& this_arg, /**< * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_slice (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2) /**< routine's second argument */ +ecma_builtin_string_prototype_object_slice (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_string_prototype_object_slice */ @@ -273,9 +273,9 @@ ecma_builtin_string_prototype_object_slice (const ecma_value_t& this_arg, /**< t * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_split (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2) /**< routine's second argument */ +ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_string_prototype_object_split */ @@ -290,9 +290,9 @@ ecma_builtin_string_prototype_object_split (const ecma_value_t& this_arg, /**< t * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_substring (const ecma_value_t& this_arg, /**< this argument */ - const ecma_value_t& arg1, /**< routine's first argument */ - const ecma_value_t& arg2) /**< routine's second argument */ +ecma_builtin_string_prototype_object_substring (ecma_value_t this_arg, /**< this argument */ + ecma_value_t arg1, /**< routine's first argument */ + ecma_value_t arg2) /**< routine's second argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2); } /* ecma_builtin_string_prototype_object_substring */ @@ -307,7 +307,7 @@ ecma_builtin_string_prototype_object_substring (const ecma_value_t& this_arg, /* * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_to_lower_case (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_string_prototype_object_to_lower_case (ecma_value_t this_arg) /**< this argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg); } /* ecma_builtin_string_prototype_object_to_lower_case */ @@ -322,7 +322,7 @@ ecma_builtin_string_prototype_object_to_lower_case (const ecma_value_t& this_arg * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_to_locale_lower_case (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_string_prototype_object_to_locale_lower_case (ecma_value_t this_arg) /**< this argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg); } /* ecma_builtin_string_prototype_object_to_locale_lower_case */ @@ -337,7 +337,7 @@ ecma_builtin_string_prototype_object_to_locale_lower_case (const ecma_value_t& t * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_to_upper_case (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_string_prototype_object_to_upper_case (ecma_value_t this_arg) /**< this argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg); } /* ecma_builtin_string_prototype_object_to_upper_case */ @@ -352,7 +352,7 @@ ecma_builtin_string_prototype_object_to_upper_case (const ecma_value_t& this_arg * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_to_locale_upper_case (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_string_prototype_object_to_locale_upper_case (ecma_value_t this_arg) /**< this argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg); } /* ecma_builtin_string_prototype_object_to_locale_upper_case */ @@ -367,7 +367,7 @@ ecma_builtin_string_prototype_object_to_locale_upper_case (const ecma_value_t& t * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_prototype_object_trim (const ecma_value_t& this_arg) /**< this argument */ +ecma_builtin_string_prototype_object_trim (ecma_value_t this_arg) /**< this argument */ { ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg); } /* ecma_builtin_string_prototype_object_trim */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-string.cpp b/jerry-core/ecma/builtin-objects/ecma-builtin-string.cpp index 4e77d7d5b..d6a6a263e 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-string.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-string.cpp @@ -54,7 +54,7 @@ * Returned value must be freed with ecma_free_completion_value. */ static ecma_completion_value_t -ecma_builtin_string_object_from_char_code (const ecma_value_t& this_arg __attr_unused___, /**< 'this' argument */ +ecma_builtin_string_object_from_char_code (ecma_value_t this_arg __attr_unused___, /**< 'this' argument */ const ecma_value_t args[], /**< arguments list */ ecma_length_t args_number) /**< number of arguments */ { diff --git a/jerry-core/ecma/builtin-objects/ecma-builtins-internal.h b/jerry-core/ecma/builtin-objects/ecma-builtins-internal.h index 966aa27f9..44000a6ad 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtins-internal.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtins-internal.h @@ -70,7 +70,7 @@ ecma_builtin_ ## lowercase_name ## _dispatch_construct (const ecma_value_t *argu ecma_length_t arguments_list_len); \ extern ecma_completion_value_t \ ecma_builtin_ ## lowercase_name ## _dispatch_routine (uint16_t builtin_routine_id, \ - const ecma_value_t& this_arg_value, \ + ecma_value_t this_arg_value, \ const ecma_value_t arguments_list [], \ ecma_length_t arguments_number); \ extern ecma_property_t* \ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtins.cpp b/jerry-core/ecma/builtin-objects/ecma-builtins.cpp index 84f202a6a..f228254a0 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtins.cpp +++ b/jerry-core/ecma/builtin-objects/ecma-builtins.cpp @@ -34,7 +34,7 @@ static ecma_completion_value_t ecma_builtin_dispatch_routine (ecma_builtin_id_t builtin_object_id, uint16_t builtin_routine_id, - const ecma_value_t& this_arg_value, + ecma_value_t this_arg_value, const ecma_value_t arguments_list [], ecma_length_t arguments_number); static void ecma_instantiate_builtin (ecma_builtin_id_t id); @@ -365,7 +365,7 @@ ecma_builtin_make_function_object_for_routine (ecma_builtin_id_t builtin_id, /** */ ecma_completion_value_t ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */ - const ecma_value_t& this_arg_value, /**< 'this' argument value */ + ecma_value_t this_arg_value, /**< 'this' argument value */ const ecma_value_t *arguments_list_p, /**< arguments list */ ecma_length_t arguments_list_len) /**< length of the arguments list */ { @@ -522,7 +522,7 @@ ecma_builtin_dispatch_routine (ecma_builtin_id_t builtin_object_id, /**< built-i uint16_t builtin_routine_id, /**< builtin-wide identifier * of the built-in object's * routine property */ - const ecma_value_t& this_arg_value, /**< 'this' argument value */ + ecma_value_t this_arg_value, /**< 'this' argument value */ const ecma_value_t arguments_list [], /**< list of arguments passed to routine */ ecma_length_t arguments_number) /**< length of arguments' list */ { diff --git a/jerry-core/ecma/builtin-objects/ecma-builtins.h b/jerry-core/ecma/builtin-objects/ecma-builtins.h index ad4af8e26..73e8093db 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtins.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtins.h @@ -41,7 +41,7 @@ extern void ecma_finalize_builtins (void); extern ecma_completion_value_t ecma_builtin_dispatch_call (ecma_object_t *obj_p, - const ecma_value_t& this_arg, + ecma_value_t this_arg, const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len); extern ecma_completion_value_t diff --git a/jerry-core/ecma/operations/ecma-boolean-object.cpp b/jerry-core/ecma/operations/ecma-boolean-object.cpp index bde3f9b1b..2b953c08e 100644 --- a/jerry-core/ecma/operations/ecma-boolean-object.cpp +++ b/jerry-core/ecma/operations/ecma-boolean-object.cpp @@ -39,7 +39,7 @@ * Returned value must be freed with ecma_free_completion_value */ ecma_completion_value_t -ecma_op_create_boolean_object (const ecma_value_t& arg) /**< argument passed to the Boolean constructor */ +ecma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boolean constructor */ { ecma_completion_value_t conv_to_boolean_completion = ecma_op_to_boolean (arg); diff --git a/jerry-core/ecma/operations/ecma-boolean-object.h b/jerry-core/ecma/operations/ecma-boolean-object.h index f3a58eb37..c287c0697 100644 --- a/jerry-core/ecma/operations/ecma-boolean-object.h +++ b/jerry-core/ecma/operations/ecma-boolean-object.h @@ -25,7 +25,7 @@ * @{ */ -extern ecma_completion_value_t ecma_op_create_boolean_object (const ecma_value_t& arg); +extern ecma_completion_value_t ecma_op_create_boolean_object (ecma_value_t arg); /** * @} diff --git a/jerry-core/ecma/operations/ecma-comparison.cpp b/jerry-core/ecma/operations/ecma-comparison.cpp index 2ee0156d3..5731ad705 100644 --- a/jerry-core/ecma/operations/ecma-comparison.cpp +++ b/jerry-core/ecma/operations/ecma-comparison.cpp @@ -35,8 +35,8 @@ * false - otherwise. */ ecma_completion_value_t -ecma_op_abstract_equality_compare (const ecma_value_t& x, /**< first operand */ - const ecma_value_t& y) /**< second operand */ +ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */ + ecma_value_t y) /**< second operand */ { const bool is_x_undefined = ecma_is_value_undefined (x); const bool is_x_null = ecma_is_value_null (x); @@ -217,8 +217,8 @@ ecma_op_abstract_equality_compare (const ecma_value_t& x, /**< first operand */ * false - otherwise. */ bool -ecma_op_strict_equality_compare (const ecma_value_t& x, /**< first operand */ - const ecma_value_t& y) /**< second operand */ +ecma_op_strict_equality_compare (ecma_value_t x, /**< first operand */ + ecma_value_t y) /**< second operand */ { const bool is_x_undefined = ecma_is_value_undefined (x); const bool is_x_null = ecma_is_value_null (x); @@ -329,14 +329,14 @@ ecma_op_strict_equality_compare (const ecma_value_t& x, /**< first operand */ * Returned value must be freed with ecma_free_completion_value */ ecma_completion_value_t -ecma_op_abstract_relational_compare (const ecma_value_t& x, /**< first operand */ - const ecma_value_t& y, /**< second operand */ +ecma_op_abstract_relational_compare (ecma_value_t x, /**< first operand */ + ecma_value_t y, /**< second operand */ bool left_first) /**< 'LeftFirst' flag */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); - const ecma_value_t& first_converted_value = left_first ? x : y; - const ecma_value_t& second_converted_value = left_first ? y : x; + ecma_value_t first_converted_value = left_first ? x : y; + ecma_value_t second_converted_value = left_first ? y : x; // 1., 2. ECMA_TRY_CATCH(prim_first_converted_value, diff --git a/jerry-core/ecma/operations/ecma-comparison.h b/jerry-core/ecma/operations/ecma-comparison.h index eba9e1733..52699bf87 100644 --- a/jerry-core/ecma/operations/ecma-comparison.h +++ b/jerry-core/ecma/operations/ecma-comparison.h @@ -26,12 +26,12 @@ * @{ */ -extern ecma_completion_value_t ecma_op_abstract_equality_compare (const ecma_value_t& x, - const ecma_value_t& y); -extern bool ecma_op_strict_equality_compare (const ecma_value_t& x, - const ecma_value_t& y); -extern ecma_completion_value_t ecma_op_abstract_relational_compare (const ecma_value_t& x, - const ecma_value_t& y, +extern ecma_completion_value_t ecma_op_abstract_equality_compare (ecma_value_t x, + ecma_value_t y); +extern bool ecma_op_strict_equality_compare (ecma_value_t x, + ecma_value_t y); +extern ecma_completion_value_t ecma_op_abstract_relational_compare (ecma_value_t x, + ecma_value_t y, bool left_first); /** diff --git a/jerry-core/ecma/operations/ecma-conversion.cpp b/jerry-core/ecma/operations/ecma-conversion.cpp index ceedc7f32..87ca3fcd4 100644 --- a/jerry-core/ecma/operations/ecma-conversion.cpp +++ b/jerry-core/ecma/operations/ecma-conversion.cpp @@ -49,7 +49,7 @@ * Returned value must be freed with ecma_free_completion_value */ ecma_completion_value_t -ecma_op_check_object_coercible (const ecma_value_t& value) /**< ecma-value */ +ecma_op_check_object_coercible (ecma_value_t value) /**< ecma-value */ { ecma_check_value_type_is_spec_defined (value); @@ -74,8 +74,8 @@ ecma_op_check_object_coercible (const ecma_value_t& value) /**< ecma-value */ * false - otherwise. */ bool -ecma_op_same_value (const ecma_value_t& x, /**< ecma-value */ - const ecma_value_t& y) /**< ecma-value */ +ecma_op_same_value (ecma_value_t x, /**< ecma-value */ + ecma_value_t y) /**< ecma-value */ { const bool is_x_undefined = ecma_is_value_undefined (x); const bool is_x_null = ecma_is_value_null (x); @@ -157,7 +157,7 @@ ecma_op_same_value (const ecma_value_t& x, /**< ecma-value */ * Returned value must be freed with ecma_free_completion_value */ ecma_completion_value_t -ecma_op_to_primitive (const ecma_value_t& value, /**< ecma-value */ +ecma_op_to_primitive (ecma_value_t value, /**< ecma-value */ ecma_preferred_type_hint_t preferred_type) /**< preferred type hint */ { ecma_check_value_type_is_spec_defined (value); @@ -185,7 +185,7 @@ ecma_op_to_primitive (const ecma_value_t& value, /**< ecma-value */ * However, ecma_free_completion_value may be called for it, but it is a no-op. */ ecma_completion_value_t -ecma_op_to_boolean (const ecma_value_t& value) /**< ecma-value */ +ecma_op_to_boolean (ecma_value_t value) /**< ecma-value */ { ecma_check_value_type_is_spec_defined (value); @@ -248,7 +248,7 @@ ecma_op_to_boolean (const ecma_value_t& value) /**< ecma-value */ * Returned value must be freed with ecma_free_completion_value */ ecma_completion_value_t -ecma_op_to_number (const ecma_value_t& value) /**< ecma-value */ +ecma_op_to_number (ecma_value_t value) /**< ecma-value */ { ecma_check_value_type_is_spec_defined (value); @@ -319,7 +319,7 @@ ecma_op_to_number (const ecma_value_t& value) /**< ecma-value */ * Returned value must be freed with ecma_free_completion_value */ ecma_completion_value_t -ecma_op_to_string (const ecma_value_t& value) /**< ecma-value */ +ecma_op_to_string (ecma_value_t value) /**< ecma-value */ { ecma_check_value_type_is_spec_defined (value); @@ -387,7 +387,7 @@ ecma_op_to_string (const ecma_value_t& value) /**< ecma-value */ * Returned value must be freed with ecma_free_completion_value */ ecma_completion_value_t -ecma_op_to_object (const ecma_value_t& value) /**< ecma-value */ +ecma_op_to_object (ecma_value_t value) /**< ecma-value */ { ecma_check_value_type_is_spec_defined (value); @@ -557,7 +557,7 @@ ecma_op_from_property_descriptor (const ecma_property_descriptor_t* src_prop_des * Returned value must be freed with ecma_free_completion_value */ ecma_completion_value_t -ecma_op_to_property_descriptor (const ecma_value_t& obj_value, /**< object value */ +ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */ ecma_property_descriptor_t *out_prop_desc_p) /**< out: filled property descriptor if return value is normal empty completion value */ diff --git a/jerry-core/ecma/operations/ecma-conversion.h b/jerry-core/ecma/operations/ecma-conversion.h index 9ce911c51..fca29d11f 100644 --- a/jerry-core/ecma/operations/ecma-conversion.h +++ b/jerry-core/ecma/operations/ecma-conversion.h @@ -37,18 +37,18 @@ typedef enum ECMA_PREFERRED_TYPE_STRING /**< String */ } ecma_preferred_type_hint_t; -extern ecma_completion_value_t ecma_op_check_object_coercible (const ecma_value_t& value); -extern bool ecma_op_same_value (const ecma_value_t& x, - const ecma_value_t& y); -extern ecma_completion_value_t ecma_op_to_primitive (const ecma_value_t& value, +extern ecma_completion_value_t ecma_op_check_object_coercible (ecma_value_t value); +extern bool ecma_op_same_value (ecma_value_t x, + ecma_value_t y); +extern ecma_completion_value_t ecma_op_to_primitive (ecma_value_t value, ecma_preferred_type_hint_t preferred_type); -extern ecma_completion_value_t ecma_op_to_boolean (const ecma_value_t& value); -extern ecma_completion_value_t ecma_op_to_number (const ecma_value_t& value); -extern ecma_completion_value_t ecma_op_to_string (const ecma_value_t& value); -extern ecma_completion_value_t ecma_op_to_object (const ecma_value_t& value); +extern ecma_completion_value_t ecma_op_to_boolean (ecma_value_t value); +extern ecma_completion_value_t ecma_op_to_number (ecma_value_t value); +extern ecma_completion_value_t ecma_op_to_string (ecma_value_t value); +extern ecma_completion_value_t ecma_op_to_object (ecma_value_t value); extern ecma_object_t* ecma_op_from_property_descriptor (const ecma_property_descriptor_t* src_prop_desc_p); -extern ecma_completion_value_t ecma_op_to_property_descriptor (const ecma_value_t& obj_value, +extern ecma_completion_value_t ecma_op_to_property_descriptor (ecma_value_t obj_value, ecma_property_descriptor_t *out_prop_desc_p); /** diff --git a/jerry-core/ecma/operations/ecma-function-object.cpp b/jerry-core/ecma/operations/ecma-function-object.cpp index 4fdbc6408..bf763b7a6 100644 --- a/jerry-core/ecma/operations/ecma-function-object.cpp +++ b/jerry-core/ecma/operations/ecma-function-object.cpp @@ -90,7 +90,7 @@ ecma_unpack_code_internal_property_value (uint32_t value, /**< packed value */ * false - otherwise. */ bool -ecma_op_is_callable (const ecma_value_t& value) /**< ecma-value */ +ecma_op_is_callable (ecma_value_t value) /**< ecma-value */ { if (!ecma_is_value_object (value)) { @@ -115,7 +115,7 @@ ecma_op_is_callable (const ecma_value_t& value) /**< ecma-value */ * false - otherwise. */ bool -ecma_is_constructor (const ecma_value_t& value) /**< ecma-value */ +ecma_is_constructor (ecma_value_t value) /**< ecma-value */ { if (!ecma_is_value_object (value)) { @@ -432,7 +432,7 @@ ecma_function_call_setup_args_variables (ecma_object_t *func_obj_p, /**< Functio */ ecma_completion_value_t ecma_op_function_has_instance (ecma_object_t *func_obj_p, /**< Function object */ - const ecma_value_t& value) /**< argument 'V' */ + ecma_value_t value) /**< argument 'V' */ { JERRY_ASSERT(func_obj_p != NULL && !ecma_is_lexical_environment (func_obj_p)); @@ -512,7 +512,7 @@ ecma_op_function_has_instance (ecma_object_t *func_obj_p, /**< Function object * */ ecma_completion_value_t ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */ - const ecma_value_t& this_arg_value, /**< 'this' argument's value */ + ecma_value_t this_arg_value, /**< 'this' argument's value */ const ecma_value_t* arguments_list_p, /**< arguments list */ ecma_length_t arguments_list_len) /**< length of arguments list */ { diff --git a/jerry-core/ecma/operations/ecma-function-object.h b/jerry-core/ecma/operations/ecma-function-object.h index 0458c5f3f..76e76065c 100644 --- a/jerry-core/ecma/operations/ecma-function-object.h +++ b/jerry-core/ecma/operations/ecma-function-object.h @@ -26,8 +26,8 @@ * @{ */ -extern bool ecma_op_is_callable (const ecma_value_t& value); -extern bool ecma_is_constructor (const ecma_value_t& value); +extern bool ecma_op_is_callable (ecma_value_t value); +extern bool ecma_is_constructor (ecma_value_t value); extern ecma_object_t* ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[], @@ -40,7 +40,7 @@ ecma_op_create_external_function_object (ecma_external_pointer_t code_p); extern ecma_completion_value_t ecma_op_function_call (ecma_object_t *func_obj_p, - const ecma_value_t& this_arg_value, + ecma_value_t this_arg_value, const ecma_value_t* arguments_list_p, ecma_length_t arguments_list_len); @@ -51,7 +51,7 @@ ecma_op_function_construct (ecma_object_t *func_obj_p, extern ecma_completion_value_t ecma_op_function_has_instance (ecma_object_t *func_obj_p, - const ecma_value_t& value); + ecma_value_t value); extern ecma_completion_value_t ecma_op_function_declaration (ecma_object_t *lex_env_p, diff --git a/jerry-core/ecma/operations/ecma-get-put-value.cpp b/jerry-core/ecma/operations/ecma-get-put-value.cpp index 813d56ff1..8527cb81a 100644 --- a/jerry-core/ecma/operations/ecma-get-put-value.cpp +++ b/jerry-core/ecma/operations/ecma-get-put-value.cpp @@ -132,7 +132,7 @@ ecma_completion_value_t ecma_op_put_value_lex_env_base (ecma_object_t *ref_base_lex_env_p, /**< reference's base (lexical environment) */ ecma_string_t *var_name_string_p, /**< variable name */ bool is_strict, /**< flag indicating strict mode */ - const ecma_value_t& value) /**< ECMA-value */ + ecma_value_t value) /**< ECMA-value */ { const bool is_unresolvable_reference = (ref_base_lex_env_p == NULL); @@ -203,7 +203,7 @@ ecma_reject_put (bool is_throw) /**< Throw flag */ */ ecma_completion_value_t ecma_op_put_value_object_base (ecma_reference_t ref, /**< ECMA-reference */ - const ecma_value_t& value) /**< ECMA-value */ + ecma_value_t value) /**< ECMA-value */ { const ecma_value_t base = ref.base; const bool is_unresolvable_reference = ecma_is_value_undefined (base); diff --git a/jerry-core/ecma/operations/ecma-lex-env.cpp b/jerry-core/ecma/operations/ecma-lex-env.cpp index 7c6048cf0..30ba37430 100644 --- a/jerry-core/ecma/operations/ecma-lex-env.cpp +++ b/jerry-core/ecma/operations/ecma-lex-env.cpp @@ -206,7 +206,7 @@ ecma_op_create_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environme ecma_completion_value_t ecma_op_set_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environment */ ecma_string_t *name_p, /**< argument N */ - const ecma_value_t& value, /**< argument V */ + ecma_value_t value, /**< argument V */ bool is_strict) /**< argument S */ { JERRY_ASSERT(lex_env_p != NULL @@ -479,7 +479,7 @@ ecma_op_create_immutable_binding (ecma_object_t *lex_env_p, /**< lexical environ void ecma_op_initialize_immutable_binding (ecma_object_t *lex_env_p, /**< lexical environment */ ecma_string_t *name_p, /**< argument N */ - const ecma_value_t& value) /**< argument V */ + ecma_value_t value) /**< argument V */ { JERRY_ASSERT(lex_env_p != NULL && ecma_is_lexical_environment (lex_env_p)); diff --git a/jerry-core/ecma/operations/ecma-lex-env.h b/jerry-core/ecma/operations/ecma-lex-env.h index e2f72c8b4..879c691d6 100644 --- a/jerry-core/ecma/operations/ecma-lex-env.h +++ b/jerry-core/ecma/operations/ecma-lex-env.h @@ -51,9 +51,9 @@ extern ecma_completion_value_t ecma_op_get_value_object_base (ecma_reference_t r extern ecma_completion_value_t ecma_op_put_value_lex_env_base (ecma_object_t *ref_base_lex_env_p, ecma_string_t *var_name_string_p, bool is_strict, - const ecma_value_t& value); + ecma_value_t value); extern ecma_completion_value_t ecma_op_put_value_object_base (ecma_reference_t ref, - const ecma_value_t& value); + ecma_value_t value); /* ECMA-262 v5, Table 17. Abstract methods of Environment Records */ extern bool ecma_op_has_binding (ecma_object_t *lex_env_p, @@ -63,7 +63,7 @@ extern ecma_completion_value_t ecma_op_create_mutable_binding (ecma_object_t *le bool is_deletable); extern ecma_completion_value_t ecma_op_set_mutable_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p, - const ecma_value_t& value, + ecma_value_t value, bool is_strict); extern ecma_completion_value_t ecma_op_get_binding_value (ecma_object_t *lex_env_p, ecma_string_t *name_p, @@ -77,7 +77,7 @@ extern void ecma_op_create_immutable_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p); extern void ecma_op_initialize_immutable_binding (ecma_object_t *lex_env_p, ecma_string_t *name_p, - const ecma_value_t& value); + ecma_value_t value); extern ecma_object_t* ecma_op_create_global_environment (ecma_object_t *glob_obj_p); diff --git a/jerry-core/ecma/operations/ecma-number-object.cpp b/jerry-core/ecma/operations/ecma-number-object.cpp index 3c9c4baec..f620a98b1 100644 --- a/jerry-core/ecma/operations/ecma-number-object.cpp +++ b/jerry-core/ecma/operations/ecma-number-object.cpp @@ -39,7 +39,7 @@ * Returned value must be freed with ecma_free_completion_value */ ecma_completion_value_t -ecma_op_create_number_object (const ecma_value_t& arg) /**< argument passed to the Number constructor */ +ecma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Number constructor */ { ecma_completion_value_t conv_to_num_completion = ecma_op_to_number (arg); diff --git a/jerry-core/ecma/operations/ecma-number-object.h b/jerry-core/ecma/operations/ecma-number-object.h index c1960e498..16fddeda9 100644 --- a/jerry-core/ecma/operations/ecma-number-object.h +++ b/jerry-core/ecma/operations/ecma-number-object.h @@ -25,7 +25,7 @@ * @{ */ -extern ecma_completion_value_t ecma_op_create_number_object (const ecma_value_t& arg); +extern ecma_completion_value_t ecma_op_create_number_object (ecma_value_t arg); /** * @} diff --git a/jerry-core/ecma/operations/ecma-objects-general.cpp b/jerry-core/ecma/operations/ecma-objects-general.cpp index 70137f56a..84d6e4fe4 100644 --- a/jerry-core/ecma/operations/ecma-objects-general.cpp +++ b/jerry-core/ecma/operations/ecma-objects-general.cpp @@ -80,7 +80,7 @@ ecma_op_create_object_object_noarg (void) * @return pointer to newly created 'Object' object */ ecma_completion_value_t -ecma_op_create_object_object_arg (const ecma_value_t& value) /**< argument of constructor */ +ecma_op_create_object_object_arg (ecma_value_t value) /**< argument of constructor */ { ecma_check_value_type_is_spec_defined (value); @@ -234,7 +234,7 @@ ecma_op_general_object_get_property (ecma_object_t *obj_p, /**< the object */ ecma_completion_value_t ecma_op_general_object_put (ecma_object_t *obj_p, /**< the object */ ecma_string_t *property_name_p, /**< property name */ - const ecma_value_t& value, /**< ecma-value */ + ecma_value_t value, /**< ecma-value */ bool is_throw) /**< flag that controls failure handling */ { JERRY_ASSERT(obj_p != NULL diff --git a/jerry-core/ecma/operations/ecma-objects-general.h b/jerry-core/ecma/operations/ecma-objects-general.h index a3cf38b3a..3ed8e0739 100644 --- a/jerry-core/ecma/operations/ecma-objects-general.h +++ b/jerry-core/ecma/operations/ecma-objects-general.h @@ -27,7 +27,7 @@ */ extern ecma_object_t* ecma_op_create_object_object_noarg (void); -extern ecma_completion_value_t ecma_op_create_object_object_arg (const ecma_value_t& value); +extern ecma_completion_value_t ecma_op_create_object_object_arg (ecma_value_t value); extern ecma_completion_value_t ecma_op_general_object_get (ecma_object_t *obj_p, ecma_string_t *property_name_p); @@ -37,7 +37,7 @@ extern ecma_property_t *ecma_op_general_object_get_property (ecma_object_t *obj_ ecma_string_t *property_name_p); extern ecma_completion_value_t ecma_op_general_object_put (ecma_object_t *obj_p, ecma_string_t *property_name_p, - const ecma_value_t& value, + ecma_value_t value, bool is_throw); extern bool ecma_op_general_object_can_put (ecma_object_t *obj_p, ecma_string_t *property_name_p); diff --git a/jerry-core/ecma/operations/ecma-objects.cpp b/jerry-core/ecma/operations/ecma-objects.cpp index 643eac846..a460add6b 100644 --- a/jerry-core/ecma/operations/ecma-objects.cpp +++ b/jerry-core/ecma/operations/ecma-objects.cpp @@ -242,7 +242,7 @@ ecma_op_object_get_property (ecma_object_t *obj_p, /**< the object */ ecma_completion_value_t ecma_op_object_put (ecma_object_t *obj_p, /**< the object */ ecma_string_t *property_name_p, /**< property name */ - const ecma_value_t& value, /**< ecma-value */ + ecma_value_t value, /**< ecma-value */ bool is_throw) /**< flag that controls failure handling */ { JERRY_ASSERT(obj_p != NULL @@ -473,7 +473,7 @@ ecma_op_object_define_own_property (ecma_object_t *obj_p, /**< the object */ */ ecma_completion_value_t ecma_op_object_has_instance (ecma_object_t *obj_p, /**< the object */ - const ecma_value_t& value) /**< argument 'V' */ + ecma_value_t value) /**< argument 'V' */ { JERRY_ASSERT(obj_p != NULL && !ecma_is_lexical_environment (obj_p)); diff --git a/jerry-core/ecma/operations/ecma-objects.h b/jerry-core/ecma/operations/ecma-objects.h index 776b4fdc5..9e7cbd992 100644 --- a/jerry-core/ecma/operations/ecma-objects.h +++ b/jerry-core/ecma/operations/ecma-objects.h @@ -31,7 +31,7 @@ extern ecma_property_t *ecma_op_object_get_own_property (ecma_object_t *obj_p, e extern ecma_property_t *ecma_op_object_get_property (ecma_object_t *obj_p, ecma_string_t *property_name_p); extern ecma_completion_value_t ecma_op_object_put (ecma_object_t *obj_p, ecma_string_t *property_name_p, - const ecma_value_t& value, + ecma_value_t value, bool is_throw); extern bool ecma_op_object_can_put (ecma_object_t *obj_p, ecma_string_t *property_name_p); extern ecma_completion_value_t ecma_op_object_delete (ecma_object_t *obj_p, @@ -44,7 +44,7 @@ ecma_op_object_define_own_property (ecma_object_t *obj_p, const ecma_property_descriptor_t* property_desc_p, bool is_throw); extern ecma_completion_value_t ecma_op_object_has_instance (ecma_object_t *obj_p, - const ecma_value_t& value); + ecma_value_t value); /** * @} * @} diff --git a/jerry-core/ecma/operations/ecma-reference.cpp b/jerry-core/ecma/operations/ecma-reference.cpp index ef59acece..edc7b8750 100644 --- a/jerry-core/ecma/operations/ecma-reference.cpp +++ b/jerry-core/ecma/operations/ecma-reference.cpp @@ -93,7 +93,7 @@ ecma_op_get_identifier_reference (ecma_object_t *lex_env_p, /**< lexical environ * Returned value must be freed through ecma_free_reference. */ ecma_reference_t -ecma_make_reference (const ecma_value_t& base, /**< base value */ +ecma_make_reference (ecma_value_t base, /**< base value */ ecma_string_t *name_p, /**< referenced name */ bool is_strict) /**< strict reference flag */ { diff --git a/jerry-core/ecma/operations/ecma-reference.h b/jerry-core/ecma/operations/ecma-reference.h index 09e4ddc91..4f87e4a93 100644 --- a/jerry-core/ecma/operations/ecma-reference.h +++ b/jerry-core/ecma/operations/ecma-reference.h @@ -49,7 +49,7 @@ extern ecma_object_t* ecma_op_resolve_reference_base (ecma_object_t *lex_env_p, extern ecma_reference_t ecma_op_get_identifier_reference (ecma_object_t *lex_env_p, ecma_string_t *name_p, bool is_strict); -extern ecma_reference_t ecma_make_reference (const ecma_value_t& base, +extern ecma_reference_t ecma_make_reference (ecma_value_t base, ecma_string_t *name_p, bool is_strict); extern void ecma_free_reference (ecma_reference_t ref); diff --git a/jerry-core/jerry-internal.h b/jerry-core/jerry-internal.h index ee4bb98c0..9b0ce67a1 100644 --- a/jerry-core/jerry-internal.h +++ b/jerry-core/jerry-internal.h @@ -26,7 +26,7 @@ extern ecma_completion_value_t jerry_dispatch_external_function (ecma_object_t *function_object_p, ecma_external_pointer_t handler_p, - const ecma_value_t& this_arg_value, + ecma_value_t this_arg_value, const ecma_value_t args_p [], ecma_length_t args_count); diff --git a/jerry-core/jerry.cpp b/jerry-core/jerry.cpp index a004403c1..a88562fd3 100644 --- a/jerry-core/jerry.cpp +++ b/jerry-core/jerry.cpp @@ -72,7 +72,7 @@ char jerry_extension_characters_buffer [CONFIG_EXTENSION_CHAR_BUFFER_SIZE]; */ static void jerry_api_convert_ecma_value_to_api_value (jerry_api_value_t *out_value_p, /**< out: api value */ - const ecma_value_t& value) /**< ecma-value (undefined, + ecma_value_t value) /**< ecma-value (undefined, * null, boolean, number, * string or object */ { @@ -371,7 +371,7 @@ jerry_api_create_external_function (jerry_external_handler_t handler_p) /**< poi ecma_completion_value_t jerry_dispatch_external_function (ecma_object_t *function_object_p, /**< external function object */ ecma_external_pointer_t handler_p, /**< pointer to the function's native handler */ - const ecma_value_t& this_arg_value, /**< 'this' argument */ + ecma_value_t this_arg_value, /**< 'this' argument */ const ecma_value_t args_p [], /**< arguments list */ ecma_length_t args_count) /**< number of arguments */ { diff --git a/jerry-core/vm/opcodes-ecma-arithmetics.cpp b/jerry-core/vm/opcodes-ecma-arithmetics.cpp index 37a314c12..2958b372b 100644 --- a/jerry-core/vm/opcodes-ecma-arithmetics.cpp +++ b/jerry-core/vm/opcodes-ecma-arithmetics.cpp @@ -45,8 +45,8 @@ static ecma_completion_value_t do_number_arithmetic (int_data_t *int_data, /**< interpreter context */ idx_t dst_var_idx, /**< destination variable identifier */ number_arithmetic_op op, /**< number arithmetic operation */ - const ecma_value_t& left_value, /**< left value */ - const ecma_value_t& right_value) /** right value */ + ecma_value_t left_value, /**< left value */ + ecma_value_t right_value) /** right value */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); diff --git a/jerry-core/vm/opcodes-ecma-bitwise.cpp b/jerry-core/vm/opcodes-ecma-bitwise.cpp index e0a40dca1..c4e6b00d4 100644 --- a/jerry-core/vm/opcodes-ecma-bitwise.cpp +++ b/jerry-core/vm/opcodes-ecma-bitwise.cpp @@ -45,8 +45,8 @@ static ecma_completion_value_t do_number_bitwise_logic (int_data_t *int_data, /**< interpreter context */ idx_t dst_var_idx, /**< destination variable identifier */ number_bitwise_logic_op op, /**< number bitwise logic operation */ - const ecma_value_t& left_value, /**< left value */ - const ecma_value_t& right_value) /** right value */ + ecma_value_t left_value, /**< left value */ + ecma_value_t right_value) /** right value */ { ecma_completion_value_t ret_value = ecma_make_empty_completion_value (); diff --git a/jerry-core/vm/opcodes-ecma-support.h b/jerry-core/vm/opcodes-ecma-support.h index 80052a66f..8fd39c9da 100644 --- a/jerry-core/vm/opcodes-ecma-support.h +++ b/jerry-core/vm/opcodes-ecma-support.h @@ -34,7 +34,7 @@ bool is_reg_variable (int_data_t *int_data, idx_t var_idx); ecma_completion_value_t get_variable_value (int_data_t *, idx_t, bool); -ecma_completion_value_t set_variable_value (int_data_t *, opcode_counter_t, idx_t, const ecma_value_t&); +ecma_completion_value_t set_variable_value (int_data_t *, opcode_counter_t, idx_t, ecma_value_t); ecma_completion_value_t fill_varg_list (int_data_t *int_data, ecma_length_t args_number, ecma_value_t args_values[], diff --git a/jerry-core/vm/opcodes-helpers-variables.cpp b/jerry-core/vm/opcodes-helpers-variables.cpp index 6f0156cf7..e7ee24ce4 100644 --- a/jerry-core/vm/opcodes-helpers-variables.cpp +++ b/jerry-core/vm/opcodes-helpers-variables.cpp @@ -127,7 +127,7 @@ ecma_completion_value_t set_variable_value (int_data_t *int_data, /**< interpreter context */ opcode_counter_t lit_oc, /**< opcode counter for literal */ idx_t var_idx, /**< variable identifier */ - const ecma_value_t& value) /**< value to set */ + ecma_value_t value) /**< value to set */ { ecma_completion_value_t ret_value; diff --git a/jerry-core/vm/vm.cpp b/jerry-core/vm/vm.cpp index 6f9da6111..2c1ab1954 100644 --- a/jerry-core/vm/vm.cpp +++ b/jerry-core/vm/vm.cpp @@ -462,7 +462,7 @@ run_int_loop (int_data_t *int_data) ecma_completion_value_t run_int_from_pos (opcode_counter_t start_pos, - const ecma_value_t& this_binding_value, + ecma_value_t this_binding_value, ecma_object_t *lex_env_p, bool is_strict, bool is_eval_code) diff --git a/jerry-core/vm/vm.h b/jerry-core/vm/vm.h index 21a3725bb..0e7b089c4 100644 --- a/jerry-core/vm/vm.h +++ b/jerry-core/vm/vm.h @@ -24,7 +24,7 @@ void init_int (const opcode_t* program_p, bool dump_mem_stats); jerry_completion_code_t run_int (void); ecma_completion_value_t run_int_loop (int_data_t *int_data); ecma_completion_value_t run_int_from_pos (opcode_counter_t start_pos, - const ecma_value_t& this_binding_value, + ecma_value_t this_binding_value, ecma_object_t *lex_env_p, bool is_strict, bool is_eval_code);