Remove ecma_simple_value_t and refactor ecma_make_simple_value (#2135)
This patch removes all ecma_make_simple_value calls to make the code more easy to understand. Also removes the type ecma_simple_value_t which improves the performance in related code paths by calculating the value of new ecma_value_t is no longer needed. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
Dániel Bátyai
parent
1007b63024
commit
e83de3accd
@@ -85,7 +85,7 @@ ecma_builtin_array_prototype_helper_set_length (ecma_object_t *object, /**< obje
|
||||
static ecma_value_t
|
||||
ecma_builtin_array_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this_value,
|
||||
@@ -130,7 +130,7 @@ ecma_builtin_array_prototype_object_to_string (ecma_value_t this_arg) /**< this
|
||||
static ecma_value_t
|
||||
ecma_builtin_array_prototype_object_to_locale_string (const ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_value,
|
||||
@@ -226,7 +226,7 @@ ecma_builtin_array_prototype_object_concat (ecma_value_t this_arg, /**< this arg
|
||||
const ecma_value_t args[], /**< arguments list */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -311,7 +311,7 @@ static ecma_value_t
|
||||
ecma_op_array_get_to_string_at_index (ecma_object_t *obj_p, /**< this object */
|
||||
uint32_t index) /**< array index */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_string_t *index_string_p = ecma_new_ecma_string_from_uint32 (index);
|
||||
|
||||
ECMA_TRY_CATCH (index_value,
|
||||
@@ -349,7 +349,7 @@ static ecma_value_t
|
||||
ecma_builtin_array_prototype_join (const ecma_value_t this_arg, /**< this argument */
|
||||
const ecma_value_t separator_arg) /**< separator argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_value,
|
||||
@@ -450,7 +450,7 @@ ecma_builtin_array_prototype_join (const ecma_value_t this_arg, /**< this argume
|
||||
static ecma_value_t
|
||||
ecma_builtin_array_prototype_object_pop (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -478,7 +478,7 @@ ecma_builtin_array_prototype_object_pop (ecma_value_t this_arg) /**< this argume
|
||||
ret_value);
|
||||
|
||||
/* 4.b */
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_value = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
ECMA_FINALIZE (set_length_value)
|
||||
}
|
||||
@@ -529,7 +529,7 @@ ecma_builtin_array_prototype_object_push (ecma_value_t this_arg, /**< this argum
|
||||
const ecma_value_t *argument_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_number) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this_value, ecma_op_to_object (this_arg), ret_value);
|
||||
@@ -595,7 +595,7 @@ ecma_builtin_array_prototype_object_push (ecma_value_t this_arg, /**< this argum
|
||||
static ecma_value_t
|
||||
ecma_builtin_array_prototype_object_reverse (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -689,7 +689,7 @@ ecma_builtin_array_prototype_object_reverse (ecma_value_t this_arg) /**< this ar
|
||||
static ecma_value_t
|
||||
ecma_builtin_array_prototype_object_shift (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -715,7 +715,7 @@ ecma_builtin_array_prototype_object_shift (ecma_value_t this_arg) /**< this argu
|
||||
ecma_builtin_array_prototype_helper_set_length (obj_p, ECMA_NUMBER_ZERO),
|
||||
ret_value);
|
||||
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_value = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
ECMA_FINALIZE (set_length_value);
|
||||
}
|
||||
@@ -802,7 +802,7 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t this_arg, /**< 'this' ar
|
||||
ecma_value_t arg1, /**< start */
|
||||
ecma_value_t arg2) /**< end */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -922,7 +922,7 @@ ecma_builtin_array_prototype_object_sort_compare_helper (ecma_value_t j, /**< le
|
||||
* compares greater than any other value, undefined property values always
|
||||
* sort to the end of the result, followed by non-existent property values.
|
||||
*/
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_number_t result = ECMA_NUMBER_ZERO;
|
||||
|
||||
bool j_is_undef = ecma_is_value_undefined (j);
|
||||
@@ -984,7 +984,7 @@ ecma_builtin_array_prototype_object_sort_compare_helper (ecma_value_t j, /**< le
|
||||
|
||||
ECMA_TRY_CATCH (call_value,
|
||||
ecma_op_function_call (comparefn_obj_p,
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
compare_args,
|
||||
2),
|
||||
ret_value);
|
||||
@@ -1026,7 +1026,7 @@ ecma_builtin_array_prototype_object_array_to_heap_helper (ecma_value_t array[],
|
||||
int right, /**< right index is a maximum index */
|
||||
ecma_value_t comparefn) /**< compare function */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* Left child of the current index. */
|
||||
int child = index * 2 + 1;
|
||||
@@ -1097,7 +1097,7 @@ ecma_builtin_array_prototype_object_array_to_heap_helper (ecma_value_t array[],
|
||||
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_value = ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
@@ -1114,7 +1114,7 @@ ecma_builtin_array_prototype_object_array_heap_sort_helper (ecma_value_t array[]
|
||||
int right, /**< right index */
|
||||
ecma_value_t comparefn) /**< compare function */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* First, construct the ordered binary tree from the array. */
|
||||
for (int i = right / 2; i >= 0 && ecma_is_value_empty (ret_value); i--)
|
||||
@@ -1171,7 +1171,7 @@ ecma_builtin_array_prototype_object_sort (ecma_value_t this_arg, /**< this argum
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("Compare function is not callable."));
|
||||
}
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
ecma_op_to_object (this_arg),
|
||||
@@ -1317,7 +1317,7 @@ ecma_builtin_array_prototype_object_splice (ecma_value_t this_arg, /**< this arg
|
||||
const ecma_value_t args[], /**< arguments list */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -1599,7 +1599,7 @@ ecma_builtin_array_prototype_object_unshift (ecma_value_t this_arg, /**< this ar
|
||||
const ecma_value_t args[], /**< arguments list */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -1694,7 +1694,7 @@ ecma_builtin_array_prototype_object_index_of (ecma_value_t this_arg, /**< this a
|
||||
ecma_value_t arg1, /**< searchElement */
|
||||
ecma_value_t arg2) /**< fromIndex */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -1784,8 +1784,8 @@ ecma_builtin_array_prototype_object_last_index_of (ecma_value_t this_arg, /**< t
|
||||
const ecma_value_t args[], /**< arguments list */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t search_element = (args_number > 0) ? args[0] : ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_value_t search_element = (args_number > 0) ? args[0] : ECMA_VALUE_UNDEFINED;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -1927,7 +1927,7 @@ ecma_builtin_array_prototype_object_every (ecma_value_t this_arg, /**< this argu
|
||||
ecma_value_t arg1, /**< callbackfn */
|
||||
ecma_value_t arg2) /**< thisArg */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -1983,7 +1983,7 @@ ecma_builtin_array_prototype_object_every (ecma_value_t this_arg, /**< this argu
|
||||
/* 7.c.iii */
|
||||
if (!ecma_op_to_boolean (call_value))
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
|
||||
ret_value = ECMA_VALUE_FALSE;
|
||||
}
|
||||
|
||||
ECMA_FINALIZE (call_value);
|
||||
@@ -1999,7 +1999,7 @@ ecma_builtin_array_prototype_object_every (ecma_value_t this_arg, /**< this argu
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
/* 8. */
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
|
||||
ret_value = ECMA_VALUE_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2024,7 +2024,7 @@ ecma_builtin_array_prototype_object_some (ecma_value_t this_arg, /**< this argum
|
||||
ecma_value_t arg1, /**< callbackfn */
|
||||
ecma_value_t arg2) /**< thisArg */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -2081,7 +2081,7 @@ ecma_builtin_array_prototype_object_some (ecma_value_t this_arg, /**< this argum
|
||||
/* 7.c.iii */
|
||||
if (ecma_op_to_boolean (call_value))
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
|
||||
ret_value = ECMA_VALUE_TRUE;
|
||||
}
|
||||
|
||||
ECMA_FINALIZE (call_value);
|
||||
@@ -2097,7 +2097,7 @@ ecma_builtin_array_prototype_object_some (ecma_value_t this_arg, /**< this argum
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
/* 8. */
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
|
||||
ret_value = ECMA_VALUE_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2122,7 +2122,7 @@ ecma_builtin_array_prototype_object_for_each (ecma_value_t this_arg, /**< this a
|
||||
ecma_value_t arg1, /**< callbackfn */
|
||||
ecma_value_t arg2) /**< thisArg */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
ecma_op_to_object (this_arg),
|
||||
@@ -2185,7 +2185,7 @@ ecma_builtin_array_prototype_object_for_each (ecma_value_t this_arg, /**< this a
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
/* 8. */
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_value = ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
|
||||
ecma_free_value (to_object_comp);
|
||||
@@ -2212,7 +2212,7 @@ ecma_builtin_array_prototype_object_map (ecma_value_t this_arg, /**< this argume
|
||||
ecma_value_t arg1, /**< callbackfn */
|
||||
ecma_value_t arg2) /**< thisArg */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -2322,7 +2322,7 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t this_arg, /**< this arg
|
||||
ecma_value_t arg1, /**< callbackfn */
|
||||
ecma_value_t arg2) /**< thisArg */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -2440,9 +2440,9 @@ ecma_builtin_array_prototype_object_reduce (ecma_value_t this_arg, /**< this arg
|
||||
const ecma_value_t args[], /**< arguments list */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t callbackfn = (args_number > 0) ? args[0] : ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t initial_value = (args_number > 1) ? args[1] : ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_value_t callbackfn = (args_number > 0) ? args[0] : ECMA_VALUE_UNDEFINED;
|
||||
ecma_value_t initial_value = (args_number > 1) ? args[1] : ECMA_VALUE_UNDEFINED;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -2472,7 +2472,7 @@ ecma_builtin_array_prototype_object_reduce (ecma_value_t this_arg, /**< this arg
|
||||
|
||||
JERRY_ASSERT (ecma_is_value_object (callbackfn));
|
||||
func_object_p = ecma_get_object_from_value (callbackfn);
|
||||
ecma_value_t accumulator = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t accumulator = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
/* 5. */
|
||||
if (len_number == ECMA_NUMBER_ZERO && ecma_is_value_undefined (initial_value))
|
||||
@@ -2546,7 +2546,7 @@ ecma_builtin_array_prototype_object_reduce (ecma_value_t this_arg, /**< this arg
|
||||
|
||||
ECMA_TRY_CATCH (call_value,
|
||||
ecma_op_function_call (func_object_p,
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
call_args,
|
||||
4),
|
||||
ret_value);
|
||||
@@ -2593,9 +2593,9 @@ ecma_builtin_array_prototype_object_reduce_right (ecma_value_t this_arg, /**< th
|
||||
const ecma_value_t args[], /**< arguments list */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t callbackfn = (args_number > 0) ? args[0] : ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t initial_value = (args_number > 1) ? args[1] : ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_value_t callbackfn = (args_number > 0) ? args[0] : ECMA_VALUE_UNDEFINED;
|
||||
ecma_value_t initial_value = (args_number > 1) ? args[1] : ECMA_VALUE_UNDEFINED;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_this,
|
||||
@@ -2633,7 +2633,7 @@ ecma_builtin_array_prototype_object_reduce_right (ecma_value_t this_arg, /**< th
|
||||
}
|
||||
else
|
||||
{
|
||||
ecma_value_t accumulator = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t accumulator = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
/* 6. */
|
||||
int64_t index = (int64_t) len - 1;
|
||||
@@ -2700,7 +2700,7 @@ ecma_builtin_array_prototype_object_reduce_right (ecma_value_t this_arg, /**< th
|
||||
|
||||
ECMA_TRY_CATCH (call_value,
|
||||
ecma_op_function_call (func_object_p,
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
call_args,
|
||||
4),
|
||||
ret_value);
|
||||
|
||||
@@ -58,7 +58,7 @@ ecma_builtin_array_object_is_array (ecma_value_t this_arg, /**< 'this' argument
|
||||
ecma_value_t arg) /**< first argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_simple_value_t is_array = ECMA_SIMPLE_VALUE_FALSE;
|
||||
ecma_value_t is_array = ECMA_VALUE_FALSE;
|
||||
|
||||
if (ecma_is_value_object (arg))
|
||||
{
|
||||
@@ -66,11 +66,11 @@ ecma_builtin_array_object_is_array (ecma_value_t this_arg, /**< 'this' argument
|
||||
|
||||
if (ecma_object_get_class_name (obj_p) == LIT_MAGIC_STRING_ARRAY_UL)
|
||||
{
|
||||
is_array = ECMA_SIMPLE_VALUE_TRUE;
|
||||
is_array = ECMA_VALUE_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return ecma_make_simple_value (is_array);
|
||||
return is_array;
|
||||
} /* ecma_builtin_array_object_is_array */
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,7 +100,7 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
|
||||
|
||||
ecma_length_t start = 0, end = len;
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_OP_TO_NUMBER_TRY_CATCH (start_num,
|
||||
arg1,
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
static ecma_value_t
|
||||
ecma_builtin_boolean_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (value_of_ret,
|
||||
ecma_builtin_boolean_prototype_object_value_of (this_arg),
|
||||
|
||||
@@ -59,15 +59,14 @@ ecma_builtin_boolean_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
|
||||
|
||||
if (arguments_list_len == 0)
|
||||
{
|
||||
arg_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
arg_value = ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
else
|
||||
{
|
||||
arg_value = arguments_list_p[0];
|
||||
}
|
||||
|
||||
return ecma_make_simple_value (ecma_op_to_boolean (arg_value) ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
return ecma_op_to_boolean (arg_value) ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;
|
||||
} /* ecma_builtin_boolean_dispatch_call */
|
||||
|
||||
/**
|
||||
@@ -83,7 +82,7 @@ ecma_builtin_boolean_dispatch_construct (const ecma_value_t *arguments_list_p, /
|
||||
|
||||
if (arguments_list_len == 0)
|
||||
{
|
||||
return ecma_op_create_boolean_object (ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE));
|
||||
return ecma_op_create_boolean_object (ECMA_VALUE_FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -126,7 +126,7 @@ enum
|
||||
static ecma_value_t
|
||||
ecma_builtin_date_prototype_to_json (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj,
|
||||
@@ -145,7 +145,7 @@ ecma_builtin_date_prototype_to_json (ecma_value_t this_arg) /**< this argument *
|
||||
|
||||
if (ecma_number_is_nan (num_value) || ecma_number_is_infinity (num_value))
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
ret_value = ECMA_VALUE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -577,9 +577,9 @@ ecma_builtin_date_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
|
||||
if (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_TIME)
|
||||
{
|
||||
ecma_value_t time = (arguments_number >= 1 ? arguments_list[0]
|
||||
: ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED));
|
||||
: ECMA_VALUE_UNDEFINED);
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_OP_TO_NUMBER_TRY_CATCH (time_num, time, ret_value);
|
||||
|
||||
@@ -79,7 +79,7 @@ static ecma_value_t
|
||||
ecma_date_construct_helper (const ecma_value_t *args, /**< arguments passed to the Date constructor */
|
||||
ecma_length_t args_len) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_number_t prim_value = ecma_number_make_nan ();
|
||||
|
||||
ECMA_TRY_CATCH (year_value, ecma_op_to_number (args[0]), ret_value);
|
||||
@@ -181,7 +181,7 @@ ecma_builtin_date_parse (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< string */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_number_t date_num = ecma_number_make_nan ();
|
||||
|
||||
/* Date Time String fromat (ECMA-262 v5, 15.9.1.15) */
|
||||
@@ -403,7 +403,7 @@ ecma_builtin_date_utc (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (args_number < 2)
|
||||
{
|
||||
@@ -454,10 +454,10 @@ ecma_builtin_date_dispatch_call (const ecma_value_t *arguments_list_p, /**< argu
|
||||
{
|
||||
JERRY_UNUSED (arguments_list_p);
|
||||
JERRY_UNUSED (arguments_list_len);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (now_val,
|
||||
ecma_builtin_date_now (ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED)),
|
||||
ecma_builtin_date_now (ECMA_VALUE_UNDEFINED),
|
||||
ret_value);
|
||||
|
||||
ret_value = ecma_date_value_to_string (ecma_get_number_from_value (now_val));
|
||||
@@ -479,7 +479,7 @@ ecma_value_t
|
||||
ecma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_number_t prim_value_num = ECMA_NUMBER_ZERO;
|
||||
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_DATE_PROTOTYPE);
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
static ecma_value_t
|
||||
ecma_builtin_error_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 2. */
|
||||
if (!ecma_is_value_object (this_arg))
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
static ecma_value_t
|
||||
ecma_builtin_function_prototype_object_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_op_is_callable (this_arg))
|
||||
{
|
||||
@@ -83,7 +83,7 @@ ecma_builtin_function_prototype_object_apply (ecma_value_t this_arg, /**< this a
|
||||
ecma_value_t arg1, /**< first argument */
|
||||
ecma_value_t arg2) /**< second argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
if (!ecma_op_is_callable (this_arg))
|
||||
@@ -195,7 +195,7 @@ ecma_builtin_function_prototype_object_call (ecma_value_t this_arg, /**< this ar
|
||||
{
|
||||
/* Even a 'this' argument is missing. */
|
||||
return ecma_op_function_call (func_obj_p,
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
NULL,
|
||||
0);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this ar
|
||||
const ecma_value_t *arguments_list_p, /**< list of arguments */
|
||||
ecma_length_t arguments_number) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 2. */
|
||||
if (!ecma_op_is_callable (this_arg))
|
||||
@@ -254,7 +254,7 @@ ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this ar
|
||||
ECMA_SET_INTERNAL_VALUE_POINTER (ext_function_p->u.bound_function.target_function,
|
||||
this_arg_obj_p);
|
||||
|
||||
ext_function_p->u.bound_function.args_len_or_this = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ext_function_p->u.bound_function.args_len_or_this = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
if (arguments_number != 0)
|
||||
{
|
||||
@@ -279,7 +279,7 @@ ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this ar
|
||||
|
||||
/* NOTE: This solution provides temporary false data about the object's size
|
||||
but prevents GC from freeing it until it's not fully initialized. */
|
||||
ext_function_p->u.bound_function.args_len_or_this = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ext_function_p->u.bound_function.args_len_or_this = ECMA_VALUE_UNDEFINED;
|
||||
ecma_value_t *args_p = (ecma_value_t *) (ext_function_p + 1);
|
||||
|
||||
for (ecma_length_t i = 0; i < arguments_number; i++)
|
||||
@@ -317,7 +317,7 @@ ecma_builtin_function_prototype_dispatch_call (const ecma_value_t *arguments_lis
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
return ECMA_VALUE_UNDEFINED;
|
||||
} /* ecma_builtin_function_prototype_dispatch_call */
|
||||
|
||||
/**
|
||||
|
||||
@@ -61,7 +61,7 @@ ecma_builtin_global_object_eval (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t x) /**< routine's first argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
bool is_direct_eval = vm_is_direct_eval_form_call ();
|
||||
|
||||
@@ -107,7 +107,7 @@ ecma_builtin_global_object_parse_int (ecma_value_t this_arg, /**< this argument
|
||||
ecma_value_t radix) /**< routine's second argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (string_var, ecma_op_to_string (string), ret_value);
|
||||
@@ -318,7 +318,7 @@ ecma_builtin_global_object_parse_float (ecma_value_t this_arg, /**< this argumen
|
||||
ecma_value_t string) /**< routine's first argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (string_var, ecma_op_to_string (string), ret_value);
|
||||
@@ -537,14 +537,13 @@ ecma_builtin_global_object_is_nan (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's first argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_OP_TO_NUMBER_TRY_CATCH (arg_num, arg, ret_value);
|
||||
|
||||
bool is_nan = ecma_number_is_nan (arg_num);
|
||||
|
||||
ret_value = ecma_make_simple_value (is_nan ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
ret_value = is_nan ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;
|
||||
|
||||
ECMA_OP_TO_NUMBER_FINALIZE (arg_num);
|
||||
|
||||
@@ -565,15 +564,14 @@ ecma_builtin_global_object_is_finite (ecma_value_t this_arg, /**< this argument
|
||||
ecma_value_t arg) /**< routine's first argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_OP_TO_NUMBER_TRY_CATCH (arg_num, arg, ret_value);
|
||||
|
||||
bool is_finite = !(ecma_number_is_nan (arg_num)
|
||||
|| ecma_number_is_infinity (arg_num));
|
||||
|
||||
ret_value = ecma_make_simple_value (is_finite ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
ret_value = is_finite ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;
|
||||
|
||||
ECMA_OP_TO_NUMBER_FINALIZE (arg_num);
|
||||
|
||||
@@ -638,7 +636,7 @@ ecma_builtin_global_object_decode_uri_helper (ecma_value_t uri, /**< uri argumen
|
||||
const uint8_t *reserved_uri_bitset) /**< reserved characters bitset */
|
||||
{
|
||||
JERRY_UNUSED (uri);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (string,
|
||||
ecma_op_to_string (uri),
|
||||
@@ -915,7 +913,7 @@ static ecma_value_t
|
||||
ecma_builtin_global_object_encode_uri_helper (ecma_value_t uri, /**< uri argument */
|
||||
const uint8_t *unescaped_uri_bitset_p) /**< unescaped bitset */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (string,
|
||||
ecma_op_to_string (uri),
|
||||
@@ -1138,7 +1136,7 @@ ecma_builtin_global_object_escape (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's first argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (string,
|
||||
ecma_op_to_string (arg),
|
||||
@@ -1259,7 +1257,7 @@ ecma_builtin_global_object_unescape (ecma_value_t this_arg, /**< this argument *
|
||||
ecma_value_t arg) /**< routine's first argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (string, ecma_op_to_string (arg), ret_value);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/* ECMA-262 v5, 15.1.1.3 */
|
||||
SIMPLE_VALUE (LIT_MAGIC_STRING_UNDEFINED,
|
||||
ECMA_SIMPLE_VALUE_UNDEFINED,
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
/* Number properties:
|
||||
|
||||
@@ -47,7 +47,7 @@ ecma_builtin_helper_error_dispatch_call (ecma_standard_error_t error_type, /**<
|
||||
if (arguments_list_len != 0
|
||||
&& !ecma_is_value_undefined (arguments_list_p[0]))
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (msg_str_value,
|
||||
ecma_op_to_string (arguments_list_p[0]),
|
||||
|
||||
@@ -122,7 +122,7 @@ ecma_value_t
|
||||
ecma_builtin_helper_get_to_locale_string_at_index (ecma_object_t *obj_p, /**< this object */
|
||||
uint32_t index) /**< array index */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_string_t *index_string_p = ecma_new_ecma_string_from_uint32 (index);
|
||||
|
||||
ECMA_TRY_CATCH (index_value,
|
||||
@@ -322,7 +322,7 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *obj_p, /**< array */
|
||||
uint32_t *length_p, /**< [in,out] array's length */
|
||||
ecma_value_t value) /**< value to concat */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 5.b */
|
||||
if (ecma_is_value_object (value)
|
||||
@@ -400,7 +400,7 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *obj_p, /**< array */
|
||||
|
||||
if (ecma_is_value_empty (ret_value))
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
|
||||
ret_value = ECMA_VALUE_TRUE;
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
@@ -478,7 +478,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_value_t this_arg, /**
|
||||
ecma_value_t arg2, /**< routine's second argument */
|
||||
bool first_index) /**< routine's third argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1 */
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
|
||||
@@ -173,7 +173,7 @@ DISPATCH_ROUTINE_ROUTINE_NAME (uint16_t builtin_routine_id, /**< built-in wide r
|
||||
switch (builtin_routine_id)
|
||||
{
|
||||
#define ROUTINE_ARG(n) (arguments_number >= n ? arguments_list[n - 1] \
|
||||
: ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED))
|
||||
: ECMA_VALUE_UNDEFINED)
|
||||
#define ROUTINE_ARG_LIST_0
|
||||
#define ROUTINE_ARG_LIST_1 , ROUTINE_ARG(1)
|
||||
#define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1, ROUTINE_ARG(2)
|
||||
|
||||
@@ -561,15 +561,15 @@ ecma_builtin_json_parse_value (ecma_json_token_t *token_p) /**< token argument *
|
||||
}
|
||||
case null_token:
|
||||
{
|
||||
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
return ECMA_VALUE_NULL;
|
||||
}
|
||||
case true_token:
|
||||
{
|
||||
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
|
||||
return ECMA_VALUE_TRUE;
|
||||
}
|
||||
case false_token:
|
||||
{
|
||||
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
|
||||
return ECMA_VALUE_FALSE;
|
||||
}
|
||||
case left_brace_token:
|
||||
{
|
||||
@@ -629,7 +629,7 @@ ecma_builtin_json_parse_value (ecma_json_token_t *token_p) /**< token argument *
|
||||
* Parse error occured.
|
||||
*/
|
||||
ecma_deref_object (object_p);
|
||||
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
return ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
case left_square_token:
|
||||
{
|
||||
@@ -689,11 +689,11 @@ ecma_builtin_json_parse_value (ecma_json_token_t *token_p) /**< token argument *
|
||||
* Parse error occured.
|
||||
*/
|
||||
ecma_deref_object (array_p);
|
||||
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
return ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
return ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
}
|
||||
} /* ecma_builtin_json_parse_value */
|
||||
@@ -716,7 +716,7 @@ ecma_builtin_json_walk (ecma_object_t *reviver_p, /**< reviver function */
|
||||
JERRY_ASSERT (holder_p);
|
||||
JERRY_ASSERT (name_p);
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (value_get,
|
||||
ecma_op_object_get (holder_p, name_p),
|
||||
@@ -806,7 +806,7 @@ ecma_builtin_json_parse (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg2) /**< reviver argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (string,
|
||||
ecma_op_to_string (arg1),
|
||||
@@ -829,7 +829,7 @@ ecma_builtin_json_parse (ecma_value_t this_arg, /**< 'this' argument */
|
||||
if (token.type != end_token)
|
||||
{
|
||||
ecma_free_value (final_result);
|
||||
final_result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
final_result = ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -896,7 +896,7 @@ ecma_builtin_json_stringify (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg3) /**< space */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ecma_json_stringify_context_t context;
|
||||
|
||||
@@ -944,7 +944,7 @@ ecma_builtin_json_stringify (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ret_value);
|
||||
|
||||
/* 4.b.ii.1 */
|
||||
ecma_value_t item = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t item = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
/* 4.b.ii.2 */
|
||||
if (ecma_is_value_string (value))
|
||||
@@ -1311,7 +1311,7 @@ ecma_builtin_json_str (ecma_string_t *key_p, /**< property key*/
|
||||
ecma_object_t *holder_p, /**< the object*/
|
||||
ecma_json_stringify_context_t *context_p) /**< context*/
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (value,
|
||||
@@ -1475,7 +1475,7 @@ ecma_builtin_json_str (ecma_string_t *key_p, /**< property key*/
|
||||
else
|
||||
{
|
||||
/* 11. */
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_value = ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1506,7 +1506,7 @@ ecma_builtin_json_object (ecma_object_t *obj_p, /**< the object*/
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("The structure is cyclical."));
|
||||
}
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 2. */
|
||||
ecma_append_to_values_collection (context_p->occurence_stack_p, obj_value, true);
|
||||
@@ -1706,7 +1706,7 @@ ecma_builtin_json_array (ecma_object_t *obj_p, /**< the array object*/
|
||||
return ecma_raise_type_error (ECMA_ERR_MSG ("The structure is cyclical."));
|
||||
}
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 2. */
|
||||
ecma_append_to_values_collection (context_p->occurence_stack_p, obj_value, true);
|
||||
|
||||
@@ -224,7 +224,7 @@ ecma_builtin_number_prototype_object_to_string (ecma_value_t this_arg, /**< this
|
||||
const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (this_value, ecma_builtin_number_prototype_object_value_of (this_arg), ret_value);
|
||||
ecma_number_t this_arg_number = ecma_get_number_from_value (this_value);
|
||||
@@ -573,7 +573,7 @@ static ecma_value_t
|
||||
ecma_builtin_number_prototype_object_to_fixed (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (this_value, ecma_builtin_number_prototype_object_value_of (this_arg), ret_value);
|
||||
ecma_number_t this_num = ecma_get_number_from_value (this_value);
|
||||
@@ -713,7 +713,7 @@ static ecma_value_t
|
||||
ecma_builtin_number_prototype_object_to_exponential (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (this_value, ecma_builtin_number_prototype_object_value_of (this_arg), ret_value);
|
||||
@@ -859,7 +859,7 @@ static ecma_value_t
|
||||
ecma_builtin_number_prototype_object_to_precision (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (this_value, ecma_builtin_number_prototype_object_value_of (this_arg), ret_value);
|
||||
|
||||
@@ -55,7 +55,7 @@ ecma_builtin_number_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (arguments_list_len == 0)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ ecma_builtin_object_prototype_object_value_of (ecma_value_t this_arg) /**< this
|
||||
static ecma_value_t
|
||||
ecma_builtin_object_prototype_object_to_locale_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t return_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t return_value = ECMA_VALUE_EMPTY;
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (obj_val,
|
||||
ecma_op_to_object (this_arg),
|
||||
@@ -130,7 +130,7 @@ static ecma_value_t
|
||||
ecma_builtin_object_prototype_object_has_own_property (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< first argument */
|
||||
{
|
||||
ecma_value_t return_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t return_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (to_string_val,
|
||||
@@ -172,10 +172,10 @@ ecma_builtin_object_prototype_object_is_prototype_of (ecma_value_t this_arg, /**
|
||||
/* 1. Is the argument an object? */
|
||||
if (!ecma_is_value_object (arg))
|
||||
{
|
||||
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
|
||||
return ECMA_VALUE_FALSE;
|
||||
}
|
||||
|
||||
ecma_value_t return_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t return_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 2. ToObject(this) */
|
||||
ECMA_TRY_CATCH (obj_value,
|
||||
@@ -192,8 +192,7 @@ ecma_builtin_object_prototype_object_is_prototype_of (ecma_value_t this_arg, /**
|
||||
ecma_object_t *v_obj_p = ecma_get_object_from_value (v_obj_value);
|
||||
|
||||
bool is_prototype_of = ecma_op_object_is_prototype_of (obj_p, v_obj_p);
|
||||
return_value = ecma_make_simple_value (is_prototype_of ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
return_value = is_prototype_of ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;
|
||||
ECMA_FINALIZE (v_obj_value);
|
||||
|
||||
ECMA_FINALIZE (obj_value);
|
||||
@@ -214,7 +213,7 @@ static ecma_value_t
|
||||
ecma_builtin_object_prototype_object_property_is_enumerable (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's first argument */
|
||||
{
|
||||
ecma_value_t return_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t return_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (to_string_val,
|
||||
@@ -245,7 +244,7 @@ ecma_builtin_object_prototype_object_property_is_enumerable (ecma_value_t this_a
|
||||
}
|
||||
else
|
||||
{
|
||||
return_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
|
||||
return_value = ECMA_VALUE_FALSE;
|
||||
}
|
||||
|
||||
ECMA_FINALIZE (obj_val);
|
||||
|
||||
@@ -55,7 +55,7 @@ ecma_builtin_object_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (arguments_list_len == 0
|
||||
|| ecma_is_value_undefined (arguments_list_p[0])
|
||||
@@ -108,7 +108,7 @@ ecma_builtin_object_object_get_prototype_of (ecma_value_t this_arg, /**< 'this'
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg))
|
||||
@@ -128,7 +128,7 @@ ecma_builtin_object_object_get_prototype_of (ecma_value_t this_arg, /**< 'this'
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
ret_value = ECMA_VALUE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ ecma_builtin_object_object_set_prototype_of (ecma_value_t this_arg, /**< 'this'
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1., 2. */
|
||||
ECMA_TRY_CATCH (unused_value,
|
||||
@@ -270,7 +270,7 @@ ecma_builtin_object_object_get_own_property_names (ecma_value_t this_arg, /**< '
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (arg))
|
||||
{
|
||||
@@ -301,7 +301,7 @@ ecma_builtin_object_object_seal (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg))
|
||||
@@ -375,7 +375,7 @@ ecma_builtin_object_object_freeze (ecma_value_t this_arg, /**< 'this' argument *
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg))
|
||||
@@ -456,7 +456,7 @@ ecma_builtin_object_object_prevent_extensions (ecma_value_t this_arg, /**< 'this
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (arg))
|
||||
{
|
||||
@@ -487,7 +487,7 @@ ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argumen
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg))
|
||||
@@ -538,8 +538,7 @@ ecma_builtin_object_object_is_sealed (ecma_value_t this_arg, /**< 'this' argumen
|
||||
}
|
||||
|
||||
/* 4. */
|
||||
ret_value = ecma_make_simple_value (is_sealed ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
ret_value = is_sealed ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
@@ -559,7 +558,7 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argumen
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg))
|
||||
@@ -617,8 +616,7 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg, /**< 'this' argumen
|
||||
}
|
||||
|
||||
/* 4 */
|
||||
ret_value = ecma_make_simple_value (is_frozen ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
ret_value = is_frozen ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
@@ -638,7 +636,7 @@ ecma_builtin_object_object_is_extensible (ecma_value_t this_arg, /**< 'this' arg
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (arg))
|
||||
{
|
||||
@@ -650,8 +648,7 @@ ecma_builtin_object_object_is_extensible (ecma_value_t this_arg, /**< 'this' arg
|
||||
|
||||
bool extensible = ecma_get_object_extensible (obj_p);
|
||||
|
||||
ret_value = ecma_make_simple_value (extensible ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
ret_value = extensible ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;
|
||||
}
|
||||
|
||||
return ret_value;
|
||||
@@ -671,7 +668,7 @@ ecma_builtin_object_object_keys (ecma_value_t this_arg, /**< 'this' argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (arg))
|
||||
{
|
||||
@@ -703,7 +700,7 @@ ecma_builtin_object_object_get_own_property_descriptor (ecma_value_t this_arg, /
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg1))
|
||||
@@ -735,7 +732,7 @@ ecma_builtin_object_object_get_own_property_descriptor (ecma_value_t this_arg, /
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_value = ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
|
||||
ECMA_FINALIZE (name_str_value);
|
||||
@@ -757,7 +754,7 @@ 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_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg1) && !ecma_is_value_null (arg1))
|
||||
@@ -813,7 +810,7 @@ ecma_builtin_object_object_define_properties (ecma_value_t this_arg, /**< 'this'
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
if (!ecma_is_value_object (arg1))
|
||||
@@ -921,7 +918,7 @@ ecma_builtin_object_object_define_property (ecma_value_t this_arg, /**< 'this' a
|
||||
ecma_value_t arg3) /**< routine's third argument */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (arg1))
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ ecma_builtin_promise_prototype_catch (ecma_value_t this_arg, /**< this argument
|
||||
ecma_value_t on_rejected) /**< on_rejected function */
|
||||
{
|
||||
return ecma_promise_then (this_arg,
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
on_rejected);
|
||||
} /* ecma_builtin_promise_prototype_catch */
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ ecma_builtin_promise_reject_or_resolve (ecma_value_t this_arg, /**< "this" argum
|
||||
ecma_deref_ecma_string (str);
|
||||
|
||||
ecma_value_t call_ret = ecma_op_function_call (ecma_get_object_from_value (func),
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
&argument,
|
||||
1);
|
||||
|
||||
@@ -133,7 +133,7 @@ ecma_builtin_promise_reject_abrupt (ecma_value_t capability) /**< reject descrip
|
||||
ecma_deref_ecma_string (str_reject);
|
||||
|
||||
ecma_value_t call_ret = ecma_op_function_call (ecma_get_object_from_value (reject),
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
&reason,
|
||||
1);
|
||||
ecma_free_value (reject);
|
||||
@@ -204,7 +204,7 @@ ecma_builtin_promise_do_race (ecma_value_t array, /**< the array for race */
|
||||
JERRY_ASSERT (ecma_get_object_builtin_id (ecma_get_object_from_value (ctor)) == ECMA_BUILTIN_ID_PROMISE);
|
||||
JERRY_ASSERT (ecma_get_object_type (ecma_get_object_from_value (array)) == ECMA_OBJECT_TYPE_ARRAY);
|
||||
|
||||
ecma_value_t ret = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret = ECMA_VALUE_EMPTY;
|
||||
ecma_object_t *array_p = ecma_get_object_from_value (array);
|
||||
ecma_value_t len_value = ecma_op_object_get_by_magic_id (array_p, LIT_MAGIC_STRING_LENGTH);
|
||||
ecma_length_t len = (ecma_length_t) ecma_get_integer_from_value (len_value);
|
||||
@@ -320,7 +320,7 @@ ecma_builtin_promise_all_handler (const ecma_value_t function, /**< the function
|
||||
JERRY_UNUSED (this);
|
||||
JERRY_UNUSED (argc);
|
||||
|
||||
ecma_value_t ret = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t ret = ECMA_VALUE_UNDEFINED;
|
||||
/* 1. */
|
||||
ecma_object_t *function_p = ecma_get_object_from_value (function);
|
||||
ecma_string_t *str_already_called = ecma_new_ecma_string_from_uint32 (ECMA_PROMISE_PROPERTY_ALREADY_CALLED);
|
||||
@@ -373,7 +373,7 @@ ecma_builtin_promise_all_handler (const ecma_value_t function, /**< the function
|
||||
str_resolve);
|
||||
ecma_deref_ecma_string (str_resolve);
|
||||
ret = ecma_op_function_call (ecma_get_object_from_value (resolve),
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
&value_array,
|
||||
1);
|
||||
ecma_free_value (resolve);
|
||||
@@ -413,7 +413,7 @@ ecma_builtin_promise_do_all (ecma_value_t array, /**< the array for all */
|
||||
JERRY_ASSERT (ecma_get_object_builtin_id (ecma_get_object_from_value (ctor)) == ECMA_BUILTIN_ID_PROMISE);
|
||||
JERRY_ASSERT (ecma_get_object_type (ecma_get_object_from_value (array)) == ECMA_OBJECT_TYPE_ARRAY);
|
||||
|
||||
ecma_value_t ret = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret = ECMA_VALUE_EMPTY;
|
||||
ecma_object_t *array_p = ecma_get_object_from_value (array);
|
||||
ecma_value_t len_value = ecma_op_object_get_by_magic_id (array_p, LIT_MAGIC_STRING_LENGTH);
|
||||
ecma_length_t len = (ecma_length_t) ecma_get_integer_from_value (len_value);
|
||||
@@ -428,7 +428,7 @@ ecma_builtin_promise_do_all (ecma_value_t array, /**< the array for all */
|
||||
ecma_string_t *str_capability = ecma_new_ecma_string_from_uint32 (ECMA_PROMISE_PROPERTY_CAPABILITY);
|
||||
ecma_string_t *str_remaining = ecma_new_ecma_string_from_uint32 (ECMA_PROMISE_PROPERTY_REMAINING_ELEMENT);
|
||||
|
||||
ecma_value_t undefined_val = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t undefined_val = ECMA_VALUE_UNDEFINED;
|
||||
/* String '1' indicates [[Resolve]] and '2' indicates [[Reject]]. */
|
||||
ecma_value_t resolve = ecma_op_object_get (ecma_get_object_from_value (capability),
|
||||
str_resolve);
|
||||
@@ -455,7 +455,7 @@ ecma_builtin_promise_do_all (ecma_value_t array, /**< the array for all */
|
||||
{
|
||||
/* iii. */
|
||||
ecma_value_t resolve_ret = ecma_op_function_call (ecma_get_object_from_value (resolve),
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
&value_array,
|
||||
1);
|
||||
|
||||
@@ -581,7 +581,7 @@ ecma_builtin_promise_race_or_all (ecma_value_t this_arg, /**< 'this' argument */
|
||||
}
|
||||
|
||||
ecma_value_t capability = ecma_promise_new_capability ();
|
||||
ecma_value_t ret = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (array)
|
||||
|| ecma_get_object_type (ecma_get_object_from_value (array)) != ECMA_OBJECT_TYPE_ARRAY)
|
||||
|
||||
@@ -62,7 +62,7 @@ ecma_builtin_regexp_prototype_compile (ecma_value_t this_arg, /**< this argument
|
||||
ecma_value_t pattern_arg, /**< pattern or RegExp object */
|
||||
ecma_value_t flags_arg) /**< flags */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (this_arg)
|
||||
|| !ecma_object_class_is (ecma_get_object_from_value (this_arg), LIT_MAGIC_STRING_REGEXP_UL))
|
||||
@@ -152,7 +152,7 @@ ecma_builtin_regexp_prototype_compile (ecma_value_t this_arg, /**< this argument
|
||||
|
||||
re_initialize_props (this_obj_p, pattern_string_p, flags);
|
||||
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_value = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
ECMA_FINALIZE (obj_this);
|
||||
}
|
||||
@@ -222,7 +222,7 @@ ecma_builtin_regexp_prototype_compile (ecma_value_t this_arg, /**< this argument
|
||||
|
||||
ECMA_SET_INTERNAL_VALUE_POINTER (*bc_prop_p, new_bc_p);
|
||||
re_initialize_props (this_obj_p, pattern_string_p, flags);
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_value = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
ECMA_FINALIZE (bc_dummy);
|
||||
|
||||
@@ -256,7 +256,7 @@ static ecma_value_t
|
||||
ecma_builtin_regexp_prototype_exec (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (this_arg)
|
||||
|| !ecma_object_class_is (ecma_get_object_from_value (this_arg), LIT_MAGIC_STRING_REGEXP_UL))
|
||||
@@ -320,7 +320,7 @@ static ecma_value_t
|
||||
ecma_builtin_regexp_prototype_test (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (match_value,
|
||||
ecma_builtin_regexp_prototype_exec (this_arg, arg),
|
||||
@@ -345,7 +345,7 @@ ecma_builtin_regexp_prototype_test (ecma_value_t this_arg, /**< this argument */
|
||||
static ecma_value_t
|
||||
ecma_builtin_regexp_prototype_to_string (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (!ecma_is_value_object (this_arg)
|
||||
|| !ecma_object_class_is (ecma_get_object_from_value (this_arg), LIT_MAGIC_STRING_REGEXP_UL))
|
||||
|
||||
@@ -33,17 +33,17 @@ STRING_VALUE (LIT_MAGIC_STRING_SOURCE,
|
||||
|
||||
/* ECMA-262 v5, 15.10.7.2 */
|
||||
SIMPLE_VALUE (LIT_MAGIC_STRING_GLOBAL,
|
||||
ECMA_SIMPLE_VALUE_FALSE,
|
||||
ECMA_VALUE_FALSE,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
/* ECMA-262 v5, 15.10.7.3 */
|
||||
SIMPLE_VALUE (LIT_MAGIC_STRING_IGNORECASE_UL,
|
||||
ECMA_SIMPLE_VALUE_FALSE,
|
||||
ECMA_VALUE_FALSE,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
/* ECMA-262 v5, 15.10.7.4 */
|
||||
SIMPLE_VALUE (LIT_MAGIC_STRING_MULTILINE,
|
||||
ECMA_SIMPLE_VALUE_FALSE,
|
||||
ECMA_VALUE_FALSE,
|
||||
ECMA_PROPERTY_FIXED)
|
||||
|
||||
/* ECMA-262 v5, 15.10.7.5 */
|
||||
|
||||
@@ -64,9 +64,9 @@ ecma_value_t
|
||||
ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_list_len) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t pattern_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t flags_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_value_t pattern_value = ECMA_VALUE_UNDEFINED;
|
||||
ecma_value_t flags_value = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
if (arguments_list_len > 0)
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@ static ecma_value_t
|
||||
ecma_builtin_string_prototype_object_char_at (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1 */
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
@@ -169,7 +169,7 @@ static ecma_value_t
|
||||
ecma_builtin_string_prototype_object_char_code_at (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1 */
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
@@ -233,7 +233,7 @@ ecma_builtin_string_prototype_object_concat (ecma_value_t this_arg, /**< this ar
|
||||
const ecma_value_t *argument_list_p, /**< arguments list */
|
||||
ecma_length_t arguments_number) /**< number of arguments */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1 */
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
@@ -335,7 +335,7 @@ static ecma_value_t
|
||||
ecma_builtin_string_prototype_object_locale_compare (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (this_check_coercible_val,
|
||||
@@ -394,7 +394,7 @@ static ecma_value_t
|
||||
ecma_builtin_string_prototype_object_match (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (this_check_coercible_value,
|
||||
@@ -406,7 +406,7 @@ ecma_builtin_string_prototype_object_match (ecma_value_t this_arg, /**< this arg
|
||||
ecma_op_to_string (this_arg),
|
||||
ret_value);
|
||||
|
||||
ecma_value_t regexp_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t regexp_value = ECMA_VALUE_EMPTY;
|
||||
/* 3. */
|
||||
if (ecma_is_value_object (arg)
|
||||
&& ecma_object_class_is (ecma_get_object_from_value (arg), LIT_MAGIC_STRING_REGEXP_UL))
|
||||
@@ -563,7 +563,7 @@ ecma_builtin_string_prototype_object_match (ecma_value_t this_arg, /**< this arg
|
||||
if (n == 0)
|
||||
{
|
||||
/* 8.g. */
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
ret_value = ECMA_VALUE_NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -670,7 +670,7 @@ static ecma_value_t
|
||||
ecma_builtin_string_prototype_object_replace_match (ecma_builtin_replace_search_ctx_t *context_p) /**< search
|
||||
* context */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
context_p->match_start = 0;
|
||||
context_p->match_end = 0;
|
||||
@@ -723,7 +723,7 @@ ecma_builtin_string_prototype_object_replace_match (ecma_builtin_replace_search_
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
ret_value = ECMA_VALUE_NULL;
|
||||
}
|
||||
|
||||
ECMA_FINALIZE (match_value);
|
||||
@@ -752,7 +752,7 @@ ecma_builtin_string_prototype_object_replace_match (ecma_builtin_replace_search_
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
ret_value = ECMA_VALUE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -770,7 +770,7 @@ ecma_builtin_string_prototype_object_replace_get_string (ecma_builtin_replace_se
|
||||
* context */
|
||||
ecma_value_t match_value) /**< returned match value */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_object_t *match_object_p = ecma_get_object_from_value (match_value);
|
||||
|
||||
ECMA_TRY_CATCH (match_length_value,
|
||||
@@ -818,7 +818,7 @@ ecma_builtin_string_prototype_object_replace_get_string (ecma_builtin_replace_se
|
||||
|
||||
ECMA_TRY_CATCH (result_value,
|
||||
ecma_op_function_call (context_p->replace_function_p,
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
arguments_list,
|
||||
match_length + 2),
|
||||
ret_value);
|
||||
@@ -1058,7 +1058,7 @@ static ecma_value_t
|
||||
ecma_builtin_string_prototype_object_replace_loop (ecma_builtin_replace_search_ctx_t *context_p) /**< search
|
||||
* context */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_length_t previous_start = 0;
|
||||
bool continue_match = true;
|
||||
|
||||
@@ -1166,7 +1166,7 @@ ecma_builtin_string_prototype_object_replace_main (ecma_builtin_replace_search_c
|
||||
* context */
|
||||
ecma_value_t replace_value) /**< replacement for a match */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (ecma_op_is_callable (replace_value))
|
||||
{
|
||||
@@ -1236,7 +1236,7 @@ ecma_builtin_string_prototype_object_replace (ecma_value_t this_arg, /**< this a
|
||||
ecma_value_t search_value, /**< routine's first argument */
|
||||
ecma_value_t replace_value) /**< routine's second argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
@@ -1325,7 +1325,7 @@ static ecma_value_t
|
||||
ecma_builtin_string_prototype_object_search (ecma_value_t this_arg, /**< this argument */
|
||||
ecma_value_t regexp_arg) /**< routine's argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (check_coercible_value,
|
||||
@@ -1337,7 +1337,7 @@ ecma_builtin_string_prototype_object_search (ecma_value_t this_arg, /**< this ar
|
||||
ecma_op_to_string (this_arg),
|
||||
ret_value);
|
||||
|
||||
ecma_value_t regexp_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t regexp_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 3. */
|
||||
if (ecma_is_value_object (regexp_arg)
|
||||
@@ -1417,7 +1417,7 @@ ecma_builtin_string_prototype_object_slice (ecma_value_t this_arg, /**< this arg
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
@@ -1491,7 +1491,7 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
ecma_value_t arg1, /**< separator */
|
||||
ecma_value_t arg2) /**< limit */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (this_check_coercible_val,
|
||||
@@ -1547,7 +1547,7 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
else /* if (!ecma_is_value_undefined (arg1)) */
|
||||
{
|
||||
/* 8. */
|
||||
ecma_value_t separator = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t separator = ECMA_VALUE_EMPTY;
|
||||
|
||||
bool separator_is_regexp = false;
|
||||
|
||||
@@ -1641,7 +1641,7 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
|
||||
|
||||
while (curr_pos < string_length && !should_return && ecma_is_value_empty (ret_value))
|
||||
{
|
||||
ecma_value_t match_result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
|
||||
ecma_value_t match_result = ECMA_VALUE_NULL;
|
||||
|
||||
if (separator_is_regexp)
|
||||
{
|
||||
@@ -1898,7 +1898,7 @@ ecma_builtin_string_prototype_object_substring (ecma_value_t this_arg, /**< this
|
||||
ecma_value_t arg1, /**< routine's first argument */
|
||||
ecma_value_t arg2) /**< routine's second argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1 */
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
@@ -1974,7 +1974,7 @@ ecma_builtin_string_prototype_object_conversion_helper (ecma_value_t this_arg, /
|
||||
bool lower_case) /**< convert to lower (true)
|
||||
* or upper (false) case */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1. */
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
@@ -2153,7 +2153,7 @@ ecma_builtin_string_prototype_object_to_locale_upper_case (ecma_value_t this_arg
|
||||
static ecma_value_t
|
||||
ecma_builtin_string_prototype_object_trim (ecma_value_t this_arg) /**< this argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
/* 1 */
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
@@ -2192,7 +2192,7 @@ ecma_builtin_string_prototype_object_substr (ecma_value_t this_arg, /**< this ar
|
||||
ecma_value_t start, /**< routine's first argument */
|
||||
ecma_value_t length) /**< routine's second argument */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ECMA_TRY_CATCH (check_coercible_val,
|
||||
ecma_op_check_object_coercible (this_arg),
|
||||
|
||||
@@ -59,7 +59,7 @@ ecma_builtin_string_object_from_char_code (ecma_value_t this_arg, /**< 'this' ar
|
||||
ecma_length_t args_number) /**< number of arguments */
|
||||
{
|
||||
JERRY_UNUSED (this_arg);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_string_t *ret_string_p = NULL;
|
||||
|
||||
if (args_number == 0)
|
||||
@@ -119,7 +119,7 @@ ecma_builtin_string_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
|
||||
{
|
||||
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
if (arguments_list_len == 0)
|
||||
{
|
||||
|
||||
@@ -249,7 +249,7 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
|
||||
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;
|
||||
|
||||
ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_BOOLEAN_UL;
|
||||
ext_object_p->u.class_prop.u.value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
|
||||
ext_object_p->u.class_prop.u.value = ECMA_VALUE_FALSE;
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
@@ -541,7 +541,7 @@ ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object *
|
||||
|
||||
*bitset_p |= bit_for_index;
|
||||
|
||||
ecma_value_t value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t value = ECMA_VALUE_EMPTY;
|
||||
bool is_accessor = false;
|
||||
ecma_object_t *getter_p = NULL;
|
||||
ecma_object_t *setter_p = NULL;
|
||||
@@ -550,7 +550,7 @@ ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object *
|
||||
{
|
||||
case ECMA_BUILTIN_PROPERTY_SIMPLE:
|
||||
{
|
||||
value = ecma_make_simple_value (curr_property_p->value);
|
||||
value = curr_property_p->value;
|
||||
break;
|
||||
}
|
||||
case ECMA_BUILTIN_PROPERTY_NUMBER:
|
||||
@@ -836,7 +836,7 @@ ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */
|
||||
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION);
|
||||
JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;
|
||||
|
||||
if (ecma_builtin_function_is_routine (obj_p))
|
||||
@@ -898,7 +898,7 @@ ecma_builtin_dispatch_construct (ecma_object_t *obj_p, /**< built-in object */
|
||||
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION);
|
||||
JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));
|
||||
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ ecma_builtin_typedarray_prototype_exec_routine (ecma_value_t this_arg, /**< this
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);
|
||||
uint32_t len = ecma_typedarray_get_length (obj_p);
|
||||
ecma_object_t *func_object_p = ecma_get_object_from_value (cb_func_val);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
for (uint32_t index = 0; index < len && ecma_is_value_empty (ret_value); index++)
|
||||
{
|
||||
@@ -195,14 +195,14 @@ ecma_builtin_typedarray_prototype_exec_routine (ecma_value_t this_arg, /**< this
|
||||
{
|
||||
if (!ecma_op_to_boolean (call_value))
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
|
||||
ret_value = ECMA_VALUE_FALSE;
|
||||
}
|
||||
}
|
||||
else if (mode == TYPEDARRAY_ROUTINE_SOME)
|
||||
{
|
||||
if (ecma_op_to_boolean (call_value))
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
|
||||
ret_value = ECMA_VALUE_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,15 +216,15 @@ ecma_builtin_typedarray_prototype_exec_routine (ecma_value_t this_arg, /**< this
|
||||
{
|
||||
if (mode == TYPEDARRAY_ROUTINE_EVERY)
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
|
||||
ret_value = ECMA_VALUE_TRUE;
|
||||
}
|
||||
else if (mode == TYPEDARRAY_ROUTINE_SOME)
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
|
||||
ret_value = ECMA_VALUE_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_value = ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ ecma_builtin_typedarray_prototype_map (ecma_value_t this_arg, /**< this argument
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (this_arg);
|
||||
uint32_t len = ecma_typedarray_get_length (obj_p);
|
||||
ecma_object_t *func_object_p = ecma_get_object_from_value (cb_func_val);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
ecma_value_t new_typedarray = ecma_op_create_typedarray_with_type_and_length (obj_p, len);
|
||||
|
||||
@@ -400,7 +400,7 @@ ecma_builtin_typedarray_prototype_reduce_with_direction (ecma_value_t this_arg,
|
||||
|
||||
JERRY_ASSERT (len > 0);
|
||||
|
||||
ecma_value_t accumulator = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t accumulator = ECMA_VALUE_UNDEFINED;
|
||||
uint32_t index = is_right ? (len - 1) : 0;
|
||||
|
||||
if (ecma_is_value_undefined (initial_val))
|
||||
@@ -444,7 +444,7 @@ ecma_builtin_typedarray_prototype_reduce_with_direction (ecma_value_t this_arg,
|
||||
JERRY_ASSERT (ecma_is_value_number (get_value));
|
||||
|
||||
ecma_value_t call_value = ecma_op_function_call (func_object_p,
|
||||
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
ECMA_VALUE_UNDEFINED,
|
||||
call_args,
|
||||
4);
|
||||
|
||||
@@ -552,7 +552,7 @@ ecma_builtin_typedarray_prototype_filter (ecma_value_t this_arg, /**< this argum
|
||||
uint8_t shift = ecma_typedarray_get_element_size_shift (obj_p);
|
||||
uint8_t element_size = (uint8_t) (1 << shift);
|
||||
ecma_object_t *func_object_p = ecma_get_object_from_value (cb_func_val);
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
|
||||
|
||||
JMEM_DEFINE_LOCAL_ARRAY (pass_value_list_p, len * element_size, lit_utf8_byte_t);
|
||||
|
||||
@@ -674,7 +674,7 @@ ecma_builtin_typedarray_prototype_set (ecma_value_t this_arg, /**< this argument
|
||||
}
|
||||
|
||||
/* 6.~ 8. targetOffset */
|
||||
ecma_value_t ret_val = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
|
||||
ecma_value_t ret_val = ECMA_VALUE_EMPTY;
|
||||
ECMA_OP_TO_NUMBER_TRY_CATCH (target_offset_num, offset_val, ret_val);
|
||||
if (ecma_number_is_nan (target_offset_num))
|
||||
{
|
||||
@@ -761,7 +761,7 @@ ecma_builtin_typedarray_prototype_set (ecma_value_t this_arg, /**< this argument
|
||||
|
||||
if (ecma_is_value_empty (ret_val))
|
||||
{
|
||||
ret_val = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ret_val = ECMA_VALUE_UNDEFINED;
|
||||
}
|
||||
return ret_val;
|
||||
} /* ecma_builtin_typedarray_prototype_set */
|
||||
|
||||
@@ -64,8 +64,8 @@ ecma_builtin_typedarray_from (ecma_value_t this_arg, /**< 'this' argument */
|
||||
}
|
||||
|
||||
ecma_value_t source;
|
||||
ecma_value_t map_fn = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t this_in_fn = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
ecma_value_t map_fn = ECMA_VALUE_UNDEFINED;
|
||||
ecma_value_t this_in_fn = ECMA_VALUE_UNDEFINED;
|
||||
|
||||
if (arguments_list_len == 0)
|
||||
{
|
||||
@@ -200,7 +200,7 @@ ecma_builtin_typedarray_of (ecma_value_t this_arg, /**< 'this' argument */
|
||||
|
||||
/* TODO: implement 'of' */
|
||||
|
||||
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
return ECMA_VALUE_UNDEFINED;
|
||||
} /* ecma_builtin_typedarray_of */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user