Passing ecma_value_t arguments by const reference instead of by value.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -60,8 +60,8 @@ ecma_reject (bool is_throw) /**< Throw flag */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_create_array_object (ecma_value_t *arguments_list_p, /**< list of arguments that
|
||||
are passed to Array constructor */
|
||||
ecma_op_create_array_object (const ecma_value_t *arguments_list_p, /**< list of arguments that
|
||||
are passed to Array constructor */
|
||||
ecma_length_t arguments_list_len, /**< length of the arguments' list */
|
||||
bool is_treat_single_arg_as_length) /**< if the value is true,
|
||||
arguments_list_len is 1
|
||||
@@ -74,7 +74,7 @@ ecma_op_create_array_object (ecma_value_t *arguments_list_p, /**< list of argume
|
||||
|| arguments_list_p != NULL);
|
||||
|
||||
uint32_t length;
|
||||
ecma_value_t *array_items_p;
|
||||
const ecma_value_t *array_items_p;
|
||||
ecma_length_t array_items_count;
|
||||
|
||||
if (is_treat_single_arg_as_length
|
||||
@@ -444,8 +444,9 @@ ecma_op_array_object_define_own_property (ecma_object_t *obj_p, /**< the array o
|
||||
ecma_number_t *num_p = ecma_alloc_number ();
|
||||
*num_p = ecma_number_add (ecma_uint32_to_number (index), ECMA_NUMBER_ONE);
|
||||
|
||||
ecma_free_value (ecma_get_named_data_property_value (len_prop_p), false);
|
||||
ecma_set_named_data_property_value (len_prop_p, ecma_make_number_value (num_p));
|
||||
ecma_named_data_property_assign_value (obj_p, len_prop_p, ecma_make_number_value (num_p));
|
||||
|
||||
ecma_dealloc_number (num_p);
|
||||
}
|
||||
|
||||
// f.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_create_array_object (ecma_value_t *arguments_list_p,
|
||||
ecma_op_create_array_object (const ecma_value_t *arguments_list_p,
|
||||
ecma_length_t arguments_list_len,
|
||||
bool is_treat_single_arg_as_length);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,7 +39,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boolean constructor */
|
||||
ecma_op_create_boolean_object (const ecma_value_t& arg) /**< argument passed to the Boolean constructor */
|
||||
{
|
||||
ecma_completion_value_t conv_to_boolean_completion = ecma_op_to_boolean (arg);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern ecma_completion_value_t ecma_op_create_boolean_object (ecma_value_t arg);
|
||||
extern ecma_completion_value_t ecma_op_create_boolean_object (const ecma_value_t& arg);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,8 +35,8 @@
|
||||
* false - otherwise.
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
|
||||
ecma_value_t y) /**< second operand */
|
||||
ecma_op_abstract_equality_compare (const ecma_value_t& x, /**< first operand */
|
||||
const 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);
|
||||
@@ -223,8 +223,8 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_op_strict_equality_compare (ecma_value_t x, /**< first operand */
|
||||
ecma_value_t y) /**< second operand */
|
||||
ecma_op_strict_equality_compare (const ecma_value_t& x, /**< first operand */
|
||||
const 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);
|
||||
@@ -335,14 +335,14 @@ ecma_op_strict_equality_compare (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 (ecma_value_t x, /**< first operand */
|
||||
ecma_value_t y, /**< second operand */
|
||||
ecma_op_abstract_relational_compare (const ecma_value_t& x, /**< first operand */
|
||||
const ecma_value_t& y, /**< second operand */
|
||||
bool left_first) /**< 'LeftFirst' flag */
|
||||
{
|
||||
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
|
||||
|
||||
ecma_value_t first_converted_value = left_first ? x : y;
|
||||
ecma_value_t second_converted_value = left_first ? y : x;
|
||||
const ecma_value_t& first_converted_value = left_first ? x : y;
|
||||
const ecma_value_t& second_converted_value = left_first ? y : x;
|
||||
|
||||
// 1., 2.
|
||||
ECMA_TRY_CATCH(prim_first_converted_value,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,9 +26,13 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
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);
|
||||
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,
|
||||
bool left_first);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,7 +49,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_check_object_coercible (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_check_object_coercible (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -74,8 +74,8 @@ ecma_op_check_object_coercible (ecma_value_t value) /**< ecma-value */
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_op_same_value (ecma_value_t x, /**< ecma-value */
|
||||
ecma_value_t y) /**< ecma-value */
|
||||
ecma_op_same_value (const ecma_value_t& x, /**< ecma-value */
|
||||
const 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 (ecma_value_t x, /**< ecma-value */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_primitive (ecma_value_t value, /**< ecma-value */
|
||||
ecma_op_to_primitive (const 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 (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 (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_to_boolean (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -248,7 +248,7 @@ ecma_op_to_boolean (ecma_value_t value) /**< ecma-value */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_number (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_to_number (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -319,7 +319,7 @@ ecma_op_to_number (ecma_value_t value) /**< ecma-value */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_string (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_to_string (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -387,7 +387,7 @@ ecma_op_to_string (ecma_value_t value) /**< ecma-value */
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_to_object (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_to_object (const 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 (ecma_value_t obj_value, /**< object value */
|
||||
ecma_op_to_property_descriptor (const 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 */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,16 +37,18 @@ typedef enum
|
||||
ECMA_PREFERRED_TYPE_STRING /**< String */
|
||||
} ecma_preferred_type_hint_t;
|
||||
|
||||
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 (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_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,
|
||||
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_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 (ecma_value_t obj_value,
|
||||
extern ecma_completion_value_t ecma_op_to_property_descriptor (const ecma_value_t& obj_value,
|
||||
ecma_property_descriptor_t *out_prop_desc_p);
|
||||
|
||||
/**
|
||||
|
||||
@@ -87,7 +87,7 @@ ecma_unpack_code_internal_property_value (uint32_t value, /**< packed value */
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_op_is_callable (ecma_value_t value) /**< ecma-value */
|
||||
ecma_op_is_callable (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
if (!ecma_is_value_object (value))
|
||||
{
|
||||
@@ -111,7 +111,7 @@ ecma_op_is_callable (ecma_value_t value) /**< ecma-value */
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_is_constructor (ecma_value_t value) /**< ecma-value */
|
||||
ecma_is_constructor (const ecma_value_t& value) /**< ecma-value */
|
||||
{
|
||||
if (!ecma_is_value_object (value))
|
||||
{
|
||||
@@ -295,7 +295,7 @@ ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[], /**< f
|
||||
static ecma_completion_value_t
|
||||
ecma_function_call_setup_args_variables (ecma_object_t *func_obj_p, /**< Function object */
|
||||
ecma_object_t *env_p, /**< lexical environment */
|
||||
ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len, /**< length of argument list */
|
||||
bool is_strict) /**< flag indicating strict mode */
|
||||
{
|
||||
@@ -377,7 +377,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 */
|
||||
ecma_value_t value) /**< argument 'V' */
|
||||
const ecma_value_t& value) /**< argument 'V' */
|
||||
{
|
||||
JERRY_ASSERT(func_obj_p != NULL
|
||||
&& !ecma_is_lexical_environment (func_obj_p));
|
||||
@@ -457,8 +457,8 @@ 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 */
|
||||
ecma_value_t this_arg_value, /**< 'this' argument's value */
|
||||
ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
const 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 */
|
||||
{
|
||||
JERRY_ASSERT(func_obj_p != NULL
|
||||
@@ -564,7 +564,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_function_construct (ecma_object_t *func_obj_p, /**< Function object */
|
||||
ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
const ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< length of arguments list */
|
||||
{
|
||||
JERRY_ASSERT(func_obj_p != NULL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,8 +26,8 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern bool ecma_op_is_callable (ecma_value_t value);
|
||||
extern bool ecma_is_constructor (ecma_value_t value);
|
||||
extern bool ecma_op_is_callable (const ecma_value_t& value);
|
||||
extern bool ecma_is_constructor (const ecma_value_t& value);
|
||||
|
||||
extern ecma_object_t*
|
||||
ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[],
|
||||
@@ -38,18 +38,18 @@ ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[],
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_function_call (ecma_object_t *func_obj_p,
|
||||
ecma_value_t this_arg_value,
|
||||
ecma_value_t* arguments_list_p,
|
||||
const ecma_value_t& this_arg_value,
|
||||
const ecma_value_t* arguments_list_p,
|
||||
ecma_length_t arguments_list_len);
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_function_construct (ecma_object_t *func_obj_p,
|
||||
ecma_value_t* arguments_list_p,
|
||||
const ecma_value_t* arguments_list_p,
|
||||
ecma_length_t arguments_list_len);
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_function_has_instance (ecma_object_t *func_obj_p,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_function_declaration (ecma_object_t *lex_env_p,
|
||||
|
||||
@@ -133,7 +133,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 */
|
||||
ecma_value_t value) /**< ECMA-value */
|
||||
const ecma_value_t& value) /**< ECMA-value */
|
||||
{
|
||||
const bool is_unresolvable_reference = (ref_base_lex_env_p == NULL);
|
||||
|
||||
@@ -204,7 +204,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 */
|
||||
ecma_value_t value) /**< ECMA-value */
|
||||
const ecma_value_t& value) /**< ECMA-value */
|
||||
{
|
||||
const ecma_value_t base = ref.base;
|
||||
const bool is_unresolvable_reference = ecma_is_value_undefined (base);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -135,7 +135,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 */
|
||||
ecma_value_t value, /**< argument V */
|
||||
const ecma_value_t& value, /**< argument V */
|
||||
bool is_strict) /**< argument S */
|
||||
{
|
||||
JERRY_ASSERT(lex_env_p != NULL
|
||||
@@ -408,7 +408,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 */
|
||||
ecma_value_t value) /**< argument V */
|
||||
const ecma_value_t& value) /**< argument V */
|
||||
{
|
||||
JERRY_ASSERT(lex_env_p != NULL
|
||||
&& ecma_is_lexical_environment (lex_env_p));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,9 +36,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,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
extern ecma_completion_value_t ecma_op_put_value_object_base (ecma_reference_t ref,
|
||||
ecma_value_t value);
|
||||
const 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,
|
||||
@@ -48,7 +48,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,
|
||||
ecma_value_t value,
|
||||
const 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,
|
||||
@@ -62,7 +62,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,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
|
||||
extern ecma_object_t* ecma_op_create_global_environment (ecma_object_t *glob_obj_p);
|
||||
extern bool ecma_is_lexical_environment_global (ecma_object_t *lex_env_p);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,7 +39,7 @@
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Number constructor */
|
||||
ecma_op_create_number_object (const ecma_value_t& arg) /**< argument passed to the Number constructor */
|
||||
{
|
||||
ecma_completion_value_t conv_to_num_completion = ecma_op_to_number (arg);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,7 +25,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
extern ecma_completion_value_t ecma_op_create_number_object (ecma_value_t arg);
|
||||
extern ecma_completion_value_t ecma_op_create_number_object (const ecma_value_t& arg);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -46,7 +46,7 @@ ecma_create_arguments_object (ecma_object_t *func_obj_p, /**< callee function */
|
||||
object is created for */
|
||||
ecma_collection_iterator_t *formal_params_iter_p, /**< formal parameters
|
||||
collection iterator */
|
||||
ecma_value_t *arguments_list_p, /**< list of arguments */
|
||||
const ecma_value_t *arguments_list_p, /**< list of arguments */
|
||||
ecma_length_t arguments_list_length, /**< length of arguments' list */
|
||||
bool is_strict) /**< flag indicating whether strict mode is enabled */
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,7 +23,7 @@ extern ecma_object_t*
|
||||
ecma_create_arguments_object (ecma_object_t *func_obj_p,
|
||||
ecma_object_t *lex_env_p,
|
||||
ecma_collection_iterator_t *formal_params_iter_p,
|
||||
ecma_value_t *arguments_list_p,
|
||||
const ecma_value_t *arguments_list_p,
|
||||
ecma_length_t arguments_list_length,
|
||||
bool is_strict);
|
||||
|
||||
|
||||
@@ -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 (ecma_value_t value) /**< argument of constructor */
|
||||
ecma_op_create_object_object_arg (const ecma_value_t& value) /**< argument of constructor */
|
||||
{
|
||||
ecma_check_value_type_is_spec_defined (value);
|
||||
|
||||
@@ -235,7 +235,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 */
|
||||
ecma_value_t value, /**< ecma-value */
|
||||
const ecma_value_t& value, /**< ecma-value */
|
||||
bool is_throw) /**< flag that controls failure handling */
|
||||
{
|
||||
JERRY_ASSERT(obj_p != NULL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -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 (ecma_value_t value);
|
||||
extern ecma_completion_value_t ecma_op_create_object_object_arg (const 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,
|
||||
ecma_value_t value,
|
||||
const 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);
|
||||
|
||||
@@ -221,7 +221,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 */
|
||||
ecma_value_t value, /**< ecma-value */
|
||||
const ecma_value_t& value, /**< ecma-value */
|
||||
bool is_throw) /**< flag that controls failure handling */
|
||||
{
|
||||
JERRY_ASSERT(obj_p != NULL
|
||||
@@ -448,7 +448,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 */
|
||||
ecma_value_t value) /**< argument 'V' */
|
||||
const ecma_value_t& value) /**< argument 'V' */
|
||||
{
|
||||
JERRY_ASSERT(obj_p != NULL
|
||||
&& !ecma_is_lexical_environment (obj_p));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -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,
|
||||
ecma_value_t value,
|
||||
const 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,
|
||||
ecma_value_t value);
|
||||
const ecma_value_t& value);
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
|
||||
@@ -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 (ecma_value_t base, /**< base value */
|
||||
ecma_make_reference (const ecma_value_t& base, /**< base value */
|
||||
ecma_string_t *name_p, /**< referenced name */
|
||||
bool is_strict) /**< strict reference flag */
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,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 (ecma_value_t base,
|
||||
extern ecma_reference_t ecma_make_reference (const ecma_value_t& base,
|
||||
ecma_string_t *name_p,
|
||||
bool is_strict);
|
||||
extern void ecma_free_reference (ecma_reference_t ref);
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
* Returned value must be freed with ecma_free_completion_value
|
||||
*/
|
||||
ecma_completion_value_t
|
||||
ecma_op_create_string_object (ecma_value_t *arguments_list_p, /**< list of arguments that
|
||||
are passed to String constructor */
|
||||
ecma_op_create_string_object (const ecma_value_t *arguments_list_p, /**< list of arguments that
|
||||
are passed to String constructor */
|
||||
ecma_length_t arguments_list_len) /**< length of the arguments' list */
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
extern ecma_completion_value_t
|
||||
ecma_op_create_string_object (ecma_value_t *arguments_list_p,
|
||||
ecma_op_create_string_object (const ecma_value_t *arguments_list_p,
|
||||
ecma_length_t arguments_list_len);
|
||||
|
||||
extern ecma_property_t*
|
||||
|
||||
Reference in New Issue
Block a user