Switching to g++ and corresponding changes according to C++ requirements.
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.
|
||||
@@ -54,9 +54,9 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_array_prototype_object_to_string (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_array_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_array_prototype_object_to_string */
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
@@ -54,12 +54,12 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_boolean_prototype_object_to_string (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_boolean_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value;
|
||||
|
||||
ECMA_TRY_CATCH (completion_value_of,
|
||||
ecma_builtin_boolean_prototype_object_value_of (this),
|
||||
ecma_builtin_boolean_prototype_object_value_of (this_arg),
|
||||
ret_value);
|
||||
|
||||
ecma_string_t *ret_str_p;
|
||||
@@ -92,15 +92,15 @@ ecma_builtin_boolean_prototype_object_to_string (ecma_value_t this) /**< this ar
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_boolean_prototype_object_value_of (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_boolean_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
if (ecma_is_value_boolean (this))
|
||||
if (ecma_is_value_boolean (this_arg))
|
||||
{
|
||||
return ecma_make_normal_completion_value (this);
|
||||
return ecma_make_normal_completion_value (this_arg);
|
||||
}
|
||||
else if (ecma_is_value_object (this))
|
||||
else if (ecma_is_value_object (this_arg))
|
||||
{
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this);
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);
|
||||
|
||||
ecma_property_t *class_prop_p = ecma_get_internal_property (obj_p, ECMA_INTERNAL_PROPERTY_CLASS);
|
||||
|
||||
@@ -111,7 +111,7 @@ ecma_builtin_boolean_prototype_object_value_of (ecma_value_t this) /**< this arg
|
||||
|
||||
JERRY_ASSERT (prim_value_prop_p->u.internal_property.value < ECMA_SIMPLE_VALUE__COUNT);
|
||||
|
||||
ecma_simple_value_t prim_simple_value = prim_value_prop_p->u.internal_property.value;
|
||||
ecma_simple_value_t prim_simple_value = (ecma_simple_value_t) prim_value_prop_p->u.internal_property.value;
|
||||
|
||||
ecma_value_t ret_boolean_value = ecma_make_simple_value (prim_simple_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.
|
||||
@@ -54,18 +54,18 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_error_prototype_object_to_string (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_error_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_completion_value_t ret_value;
|
||||
|
||||
// 2.
|
||||
if (!ecma_is_value_object (this))
|
||||
if (!ecma_is_value_object (this_arg))
|
||||
{
|
||||
ret_value = ecma_make_throw_obj_completion_value (ecma_new_standard_error (ECMA_ERROR_TYPE));
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this);
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);
|
||||
ecma_string_t *name_magic_string_p = ecma_get_magic_string (ECMA_MAGIC_STRING_NAME);
|
||||
|
||||
ECMA_TRY_CATCH (name_get_completion,
|
||||
|
||||
@@ -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.
|
||||
@@ -52,9 +52,9 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_object_to_string (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_function_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_function_prototype_object_to_string */
|
||||
|
||||
/**
|
||||
@@ -67,11 +67,11 @@ ecma_builtin_function_prototype_object_to_string (ecma_value_t this) /**< this a
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_object_apply (ecma_value_t this, /**< this 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, arg1, arg2);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_function_prototype_object_apply */
|
||||
|
||||
/**
|
||||
@@ -84,11 +84,11 @@ ecma_builtin_function_prototype_object_apply (ecma_value_t this, /**< this argum
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_object_call (ecma_value_t this, /**< this argument */
|
||||
ecma_builtin_function_prototype_object_call (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t *arguments_list_p, /**< list of arguments */
|
||||
ecma_length_t arguments_number) /**< number of arguments */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this, arguments_list_p, arguments_number);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arguments_list_p, arguments_number);
|
||||
} /* ecma_builtin_function_prototype_object_call */
|
||||
|
||||
/**
|
||||
@@ -101,11 +101,11 @@ ecma_builtin_function_prototype_object_call (ecma_value_t this, /**< this argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_function_prototype_object_bind (ecma_value_t this, /**< this argument */
|
||||
ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t *arguments_list_p, /**< list of arguments */
|
||||
ecma_length_t arguments_number) /**< number of arguments */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this, arguments_list_p, arguments_number);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arguments_list_p, arguments_number);
|
||||
} /* ecma_builtin_function_prototype_object_bind */
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
@@ -33,7 +33,7 @@
|
||||
PASTE (PASTE (ecma_builtin_, builtin_underscored_id), _dispatch_routine)
|
||||
|
||||
#define ROUTINE_ARG(n) , ecma_value_t arg ## n
|
||||
#define ROUTINE_ARG_LIST_0 ecma_value_t this
|
||||
#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)
|
||||
@@ -59,9 +59,6 @@ static ecma_magic_string_id_t ecma_builtin_property_names[] =
|
||||
#include BUILTIN_INC_HEADER_NAME
|
||||
};
|
||||
|
||||
static const ecma_length_t ecma_builtin_property_number = (sizeof (ecma_builtin_property_names) /
|
||||
sizeof (ecma_builtin_property_names [0]));
|
||||
|
||||
/**
|
||||
* Sort builtin's property names array
|
||||
*/
|
||||
@@ -74,7 +71,9 @@ SORT_PROPERTY_NAMES_ROUTINE_NAME (BUILTIN_UNDERSCORED_ID) (void)
|
||||
{
|
||||
swapped = false;
|
||||
|
||||
for (ecma_length_t i = 1; i < ecma_builtin_property_number; i++)
|
||||
for (ecma_length_t i = 1;
|
||||
i < (sizeof (ecma_builtin_property_names) / sizeof (ecma_builtin_property_names [0]));
|
||||
i++)
|
||||
{
|
||||
if (ecma_builtin_property_names [i] < ecma_builtin_property_names [i - 1])
|
||||
{
|
||||
@@ -114,10 +113,11 @@ TRY_TO_INSTANTIATE_PROPERTY_ROUTINE_NAME (BUILTIN_UNDERSCORED_ID) (ecma_object_t
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const ecma_length_t property_numbers = (ecma_length_t) (sizeof (ecma_builtin_property_names) /
|
||||
sizeof (ecma_builtin_property_names [0]));
|
||||
int32_t index;
|
||||
index = ecma_builtin_bin_search_for_magic_string_id_in_array (ecma_builtin_property_names,
|
||||
sizeof (ecma_builtin_property_names) /
|
||||
sizeof (ecma_builtin_property_names [0]),
|
||||
property_numbers,
|
||||
id);
|
||||
|
||||
if (index == -1)
|
||||
|
||||
@@ -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.
|
||||
@@ -54,21 +54,21 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_to_string (ecma_value_t this, /**< this argument */
|
||||
ecma_builtin_number_prototype_object_to_string (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t* arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
ecma_number_t this_arg_number;
|
||||
|
||||
if (ecma_is_value_number (this))
|
||||
if (ecma_is_value_number (this_arg))
|
||||
{
|
||||
ecma_number_t *this_arg_number_p = ecma_get_number_from_value (this);
|
||||
ecma_number_t *this_arg_number_p = ecma_get_number_from_value (this_arg);
|
||||
|
||||
this_arg_number = *this_arg_number_p;
|
||||
}
|
||||
else if (ecma_is_value_object (this))
|
||||
else if (ecma_is_value_object (this_arg))
|
||||
{
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this);
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);
|
||||
|
||||
ecma_property_t *class_prop_p = ecma_get_internal_property (obj_p, ECMA_INTERNAL_PROPERTY_CLASS);
|
||||
|
||||
@@ -77,7 +77,8 @@ ecma_builtin_number_prototype_object_to_string (ecma_value_t this, /**< this arg
|
||||
ecma_property_t *prim_value_prop_p = ecma_get_internal_property (obj_p,
|
||||
ECMA_INTERNAL_PROPERTY_PRIMITIVE_NUMBER_VALUE);
|
||||
|
||||
ecma_number_t *prim_value_num_p = ECMA_GET_NON_NULL_POINTER (prim_value_prop_p->u.internal_property.value);
|
||||
ecma_number_t *prim_value_num_p = ECMA_GET_NON_NULL_POINTER (ecma_number_t,
|
||||
prim_value_prop_p->u.internal_property.value);
|
||||
this_arg_number = *prim_value_num_p;
|
||||
}
|
||||
else
|
||||
@@ -111,9 +112,9 @@ ecma_builtin_number_prototype_object_to_string (ecma_value_t this, /**< 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 (ecma_value_t this) /**< 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, NULL, 0);
|
||||
return ecma_builtin_number_prototype_object_to_string (this_arg, NULL, 0);
|
||||
} /* ecma_builtin_number_prototype_object_to_locale_string */
|
||||
|
||||
/**
|
||||
@@ -126,15 +127,15 @@ ecma_builtin_number_prototype_object_to_locale_string (ecma_value_t this) /**< t
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_value_of (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_number_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
if (ecma_is_value_number (this))
|
||||
if (ecma_is_value_number (this_arg))
|
||||
{
|
||||
return ecma_make_normal_completion_value (ecma_copy_value (this, true));
|
||||
return ecma_make_normal_completion_value (ecma_copy_value (this_arg, true));
|
||||
}
|
||||
else if (ecma_is_value_object (this))
|
||||
else if (ecma_is_value_object (this_arg))
|
||||
{
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this);
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);
|
||||
|
||||
ecma_property_t *class_prop_p = ecma_get_internal_property (obj_p, ECMA_INTERNAL_PROPERTY_CLASS);
|
||||
|
||||
@@ -143,7 +144,8 @@ ecma_builtin_number_prototype_object_value_of (ecma_value_t this) /**< this argu
|
||||
ecma_property_t *prim_value_prop_p = ecma_get_internal_property (obj_p,
|
||||
ECMA_INTERNAL_PROPERTY_PRIMITIVE_NUMBER_VALUE);
|
||||
|
||||
ecma_number_t *prim_value_num_p = ECMA_GET_NON_NULL_POINTER (prim_value_prop_p->u.internal_property.value);
|
||||
ecma_number_t *prim_value_num_p = ECMA_GET_NON_NULL_POINTER (ecma_number_t,
|
||||
prim_value_prop_p->u.internal_property.value);
|
||||
|
||||
ecma_number_t *ret_num_p = ecma_alloc_number ();
|
||||
*ret_num_p = *prim_value_num_p;
|
||||
@@ -165,10 +167,10 @@ ecma_builtin_number_prototype_object_value_of (ecma_value_t this) /**< this argu
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_to_fixed (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_number_prototype_object_to_fixed */
|
||||
|
||||
/**
|
||||
@@ -181,10 +183,10 @@ ecma_builtin_number_prototype_object_to_fixed (ecma_value_t this, /**< this argu
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_to_exponential (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_number_prototype_object_to_exponential */
|
||||
|
||||
/**
|
||||
@@ -197,10 +199,10 @@ ecma_builtin_number_prototype_object_to_exponential (ecma_value_t this, /**< thi
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_number_prototype_object_to_precision (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_number_prototype_object_to_precision */
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
@@ -52,21 +52,21 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_to_string (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_object_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_magic_string_id_t type_string;
|
||||
|
||||
if (ecma_is_value_undefined (this))
|
||||
if (ecma_is_value_undefined (this_arg))
|
||||
{
|
||||
type_string = ECMA_MAGIC_STRING_UNDEFINED_UL;
|
||||
}
|
||||
else if (ecma_is_value_null (this))
|
||||
else if (ecma_is_value_null (this_arg))
|
||||
{
|
||||
type_string = ECMA_MAGIC_STRING_NULL_UL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_completion_value_t obj_this = ecma_op_to_object (this);
|
||||
ecma_completion_value_t obj_this = ecma_op_to_object (this_arg);
|
||||
|
||||
if (!ecma_is_completion_value_normal (obj_this))
|
||||
{
|
||||
@@ -140,9 +140,9 @@ ecma_builtin_object_prototype_object_to_string (ecma_value_t this) /**< this arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_value_of (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_object_prototype_object_value_of (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
return ecma_op_to_object (this);
|
||||
return ecma_op_to_object (this_arg);
|
||||
} /* ecma_builtin_object_prototype_object_value_of */
|
||||
|
||||
/**
|
||||
@@ -155,9 +155,9 @@ ecma_builtin_object_prototype_object_value_of (ecma_value_t this) /**< this argu
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_to_locale_string (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_object_prototype_object_to_locale_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_object_prototype_object_to_locale_string */
|
||||
|
||||
/**
|
||||
@@ -170,10 +170,10 @@ ecma_builtin_object_prototype_object_to_locale_string (ecma_value_t this) /**< t
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_has_own_property (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_prototype_object_has_own_property */
|
||||
|
||||
/**
|
||||
@@ -186,10 +186,10 @@ ecma_builtin_object_prototype_object_has_own_property (ecma_value_t this, /**< t
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_is_prototype_of (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_prototype_object_is_prototype_of */
|
||||
|
||||
/**
|
||||
@@ -202,10 +202,10 @@ ecma_builtin_object_prototype_object_is_prototype_of (ecma_value_t this, /**< th
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_object_prototype_object_property_is_enumerable (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_object_prototype_object_property_is_enumerable */
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
@@ -54,15 +54,15 @@
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_to_string (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
if (ecma_is_value_string (this))
|
||||
if (ecma_is_value_string (this_arg))
|
||||
{
|
||||
return ecma_make_normal_completion_value (ecma_copy_value (this, true));
|
||||
return ecma_make_normal_completion_value (ecma_copy_value (this_arg, true));
|
||||
}
|
||||
else if (ecma_is_value_object (this))
|
||||
else if (ecma_is_value_object (this_arg))
|
||||
{
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this);
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);
|
||||
|
||||
ecma_property_t *class_prop_p = ecma_get_internal_property (obj_p, ECMA_INTERNAL_PROPERTY_CLASS);
|
||||
|
||||
@@ -71,7 +71,8 @@ ecma_builtin_string_prototype_object_to_string (ecma_value_t this) /**< this arg
|
||||
ecma_property_t *prim_value_prop_p = ecma_get_internal_property (obj_p,
|
||||
ECMA_INTERNAL_PROPERTY_PRIMITIVE_STRING_VALUE);
|
||||
|
||||
ecma_string_t *prim_value_str_p = ECMA_GET_NON_NULL_POINTER (prim_value_prop_p->u.internal_property.value);
|
||||
ecma_string_t *prim_value_str_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t,
|
||||
prim_value_prop_p->u.internal_property.value);
|
||||
|
||||
prim_value_str_p = ecma_copy_or_ref_ecma_string (prim_value_str_p);
|
||||
|
||||
@@ -92,9 +93,9 @@ ecma_builtin_string_prototype_object_to_string (ecma_value_t this) /**< this arg
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_value_of (ecma_value_t this) /**< 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);
|
||||
return ecma_builtin_string_prototype_object_to_string (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_value_of */
|
||||
|
||||
/**
|
||||
@@ -107,10 +108,10 @@ ecma_builtin_string_prototype_object_value_of (ecma_value_t this) /**< this argu
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_char_at (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_char_at */
|
||||
|
||||
/**
|
||||
@@ -123,10 +124,10 @@ ecma_builtin_string_prototype_object_char_at (ecma_value_t this, /**< this argum
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_char_code_at (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_char_code_at */
|
||||
|
||||
/**
|
||||
@@ -139,11 +140,11 @@ ecma_builtin_string_prototype_object_char_code_at (ecma_value_t this, /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_concat (ecma_value_t this, /**< this argument */
|
||||
ecma_builtin_string_prototype_object_concat (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t* argument_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_number) /**< number of arguments */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this, argument_list_p, arguments_number);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, argument_list_p, arguments_number);
|
||||
} /* ecma_builtin_string_prototype_object_concat */
|
||||
|
||||
/**
|
||||
@@ -156,11 +157,11 @@ ecma_builtin_string_prototype_object_concat (ecma_value_t this, /**< this argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_index_of (ecma_value_t this, /**< this 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, arg1, arg2);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_index_of */
|
||||
|
||||
/**
|
||||
@@ -173,11 +174,11 @@ ecma_builtin_string_prototype_object_index_of (ecma_value_t this, /**< this argu
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_last_index_of (ecma_value_t this, /**< this 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, arg1, arg2);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_last_index_of */
|
||||
|
||||
/**
|
||||
@@ -190,10 +191,10 @@ ecma_builtin_string_prototype_object_last_index_of (ecma_value_t this, /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_locale_compare (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_locale_compare */
|
||||
|
||||
/**
|
||||
@@ -206,10 +207,10 @@ ecma_builtin_string_prototype_object_locale_compare (ecma_value_t this, /**< thi
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_match (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_match */
|
||||
|
||||
/**
|
||||
@@ -222,11 +223,11 @@ ecma_builtin_string_prototype_object_match (ecma_value_t this, /**< this argumen
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_replace (ecma_value_t this, /**< this 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, arg1, arg2);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_replace */
|
||||
|
||||
/**
|
||||
@@ -239,10 +240,10 @@ ecma_builtin_string_prototype_object_replace (ecma_value_t this, /**< this argum
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_search (ecma_value_t this, /**< this 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);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg);
|
||||
} /* ecma_builtin_string_prototype_object_search */
|
||||
|
||||
/**
|
||||
@@ -255,11 +256,11 @@ ecma_builtin_string_prototype_object_search (ecma_value_t this, /**< this argume
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_slice (ecma_value_t this, /**< this 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, arg1, arg2);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_slice */
|
||||
|
||||
/**
|
||||
@@ -272,11 +273,11 @@ ecma_builtin_string_prototype_object_slice (ecma_value_t this, /**< this argumen
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_split (ecma_value_t this, /**< this 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, arg1, arg2);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_split */
|
||||
|
||||
/**
|
||||
@@ -289,11 +290,11 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this, /**< this argumen
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_substring (ecma_value_t this, /**< this 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, arg1, arg2);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg, arg1, arg2);
|
||||
} /* ecma_builtin_string_prototype_object_substring */
|
||||
|
||||
/**
|
||||
@@ -306,9 +307,9 @@ ecma_builtin_string_prototype_object_substring (ecma_value_t this, /**< 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 (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_lower_case (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_to_lower_case */
|
||||
|
||||
/**
|
||||
@@ -321,9 +322,9 @@ ecma_builtin_string_prototype_object_to_lower_case (ecma_value_t this) /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_to_locale_lower_case (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_locale_lower_case (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_to_locale_lower_case */
|
||||
|
||||
/**
|
||||
@@ -336,9 +337,9 @@ ecma_builtin_string_prototype_object_to_locale_lower_case (ecma_value_t this) /*
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_to_upper_case (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_upper_case (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_to_upper_case */
|
||||
|
||||
/**
|
||||
@@ -351,9 +352,9 @@ ecma_builtin_string_prototype_object_to_upper_case (ecma_value_t this) /**< this
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_to_locale_upper_case (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_to_locale_upper_case (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_to_locale_upper_case */
|
||||
|
||||
/**
|
||||
@@ -366,9 +367,9 @@ ecma_builtin_string_prototype_object_to_locale_upper_case (ecma_value_t this) /*
|
||||
* Returned value must be freed with ecma_free_completion_value.
|
||||
*/
|
||||
static ecma_completion_value_t
|
||||
ecma_builtin_string_prototype_object_trim (ecma_value_t this) /**< this argument */
|
||||
ecma_builtin_string_prototype_object_trim (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this);
|
||||
ECMA_BUILTIN_CP_UNIMPLEMENTED (this_arg);
|
||||
} /* ecma_builtin_string_prototype_object_trim */
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
@@ -62,8 +62,8 @@ ecma_builtin_string_object_from_char_code (ecma_value_t this_arg __unused, /**<
|
||||
|
||||
size_t zt_str_buffer_size = sizeof (ecma_char_t) * (args_number + 1u);
|
||||
|
||||
ecma_char_t *ret_zt_str_p = mem_heap_alloc_block (zt_str_buffer_size,
|
||||
MEM_HEAP_ALLOC_SHORT_TERM);
|
||||
ecma_char_t *ret_zt_str_p = (ecma_char_t*) mem_heap_alloc_block (zt_str_buffer_size,
|
||||
MEM_HEAP_ALLOC_SHORT_TERM);
|
||||
ret_zt_str_p [args_number] = ECMA_CHAR_NULL;
|
||||
|
||||
for (ecma_length_t arg_index = 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.
|
||||
@@ -165,9 +165,9 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
void
|
||||
ecma_init_builtins (void)
|
||||
{
|
||||
for (ecma_builtin_id_t id = 0;
|
||||
for (ecma_builtin_id_t id = (ecma_builtin_id_t) 0;
|
||||
id < ECMA_BUILTIN_ID__COUNT;
|
||||
id++)
|
||||
id = (ecma_builtin_id_t) (id + 1))
|
||||
{
|
||||
ecma_builtin_objects [id] = NULL;
|
||||
}
|
||||
@@ -233,9 +233,9 @@ ecma_instantiate_builtin (ecma_builtin_id_t id) /**< built-in id */
|
||||
void
|
||||
ecma_finalize_builtins (void)
|
||||
{
|
||||
for (ecma_builtin_id_t id = 0;
|
||||
for (ecma_builtin_id_t id = (ecma_builtin_id_t) 0;
|
||||
id < ECMA_BUILTIN_ID__COUNT;
|
||||
id++)
|
||||
id = (ecma_builtin_id_t) (id + 1))
|
||||
{
|
||||
if (ecma_builtin_objects [id] != NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user