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:
Robert Fancsik 2017-12-06 18:06:07 +01:00 committed by Dániel Bátyai
parent 1007b63024
commit e83de3accd
60 changed files with 470 additions and 482 deletions

View File

@ -766,7 +766,7 @@ jerry_exec_snapshot_at (const uint32_t *snapshot_p, /**< snapshot */
JERRY_UNUSED (func_index);
JERRY_UNUSED (copy_bytecode);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
#endif /* JERRY_ENABLE_SNAPSHOT_EXEC */
} /* jerry_exec_snapshot_at */
@ -797,7 +797,7 @@ jerry_exec_snapshot (const uint32_t *snapshot_p, /**< snapshot */
JERRY_UNUSED (snapshot_size);
JERRY_UNUSED (copy_bytecode);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
#endif /* JERRY_ENABLE_SNAPSHOT_EXEC */
} /* jerry_exec_snapshot */
@ -1536,6 +1536,6 @@ jerry_value_t jerry_load_function_snapshot_at (const uint32_t *function_snapshot
JERRY_UNUSED (func_index);
JERRY_UNUSED (copy_bytecode);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
#endif /* JERRY_ENABLE_SNAPSHOT_EXEC */
} /* jerry_load_function_snapshot_at */

View File

@ -595,7 +595,7 @@ jerry_run_all_enqueued_jobs (void)
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
return ecma_process_all_enqueued_jobs ();
#else /* CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
#endif /* CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
} /* jerry_run_all_enqueued_jobs */
@ -1205,7 +1205,7 @@ jerry_create_undefined (void)
{
jerry_assert_api_available ();
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
} /* jerry_create_undefined */
/**
@ -1218,7 +1218,7 @@ jerry_create_null (void)
{
jerry_assert_api_available ();
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
return ECMA_VALUE_NULL;
} /* jerry_create_null */
/**
@ -1252,7 +1252,7 @@ jerry_create_promise (void)
jerry_assert_api_available ();
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
return ecma_op_create_promise_object (ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY), ECMA_PROMISE_EXECUTOR_EMPTY);
return ecma_op_create_promise_object (ECMA_VALUE_EMPTY, ECMA_PROMISE_EXECUTOR_EMPTY);
#else /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
return jerry_throw (ecma_raise_type_error (ECMA_ERR_MSG ("Promise not supported.")));
#endif /* CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
@ -1829,7 +1829,7 @@ void
jerry_init_property_descriptor_fields (jerry_property_descriptor_t *prop_desc_p) /**< [out] property descriptor */
{
prop_desc_p->is_value_defined = false;
prop_desc_p->value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prop_desc_p->value = ECMA_VALUE_UNDEFINED;
prop_desc_p->is_writable_defined = false;
prop_desc_p->is_writable = false;
prop_desc_p->is_enumerable_defined = false;
@ -1837,9 +1837,9 @@ jerry_init_property_descriptor_fields (jerry_property_descriptor_t *prop_desc_p)
prop_desc_p->is_configurable_defined = false;
prop_desc_p->is_configurable = false;
prop_desc_p->is_get_defined = false;
prop_desc_p->getter = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prop_desc_p->getter = ECMA_VALUE_UNDEFINED;
prop_desc_p->is_set_defined = false;
prop_desc_p->setter = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prop_desc_p->setter = ECMA_VALUE_UNDEFINED;
} /* jerry_init_property_descriptor_fields */
/**
@ -1987,9 +1987,9 @@ jerry_get_own_property_descriptor (const jerry_value_t obj_val, /**< object val
prop_desc_p->is_get_defined = prop_desc.is_get_defined;
prop_desc_p->is_set_defined = prop_desc.is_set_defined;
prop_desc_p->value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prop_desc_p->getter = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prop_desc_p->setter = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prop_desc_p->value = ECMA_VALUE_UNDEFINED;
prop_desc_p->getter = ECMA_VALUE_UNDEFINED;
prop_desc_p->setter = ECMA_VALUE_UNDEFINED;
if (prop_desc.is_value_defined)
{
@ -2004,7 +2004,7 @@ jerry_get_own_property_descriptor (const jerry_value_t obj_val, /**< object val
}
else
{
prop_desc_p->getter = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
prop_desc_p->getter = ECMA_VALUE_NULL;
}
}
@ -2016,7 +2016,7 @@ jerry_get_own_property_descriptor (const jerry_value_t obj_val, /**< object val
}
else
{
prop_desc_p->setter = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
prop_desc_p->setter = ECMA_VALUE_NULL;
}
}
@ -2143,7 +2143,7 @@ jerry_construct_object (const jerry_value_t func_obj_val, /**< function object t
if (jerry_value_is_constructor (func_obj_val))
{
ecma_value_t this_val = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ecma_value_t this_val = ECMA_VALUE_UNDEFINED;
return jerry_invoke_function (true, func_obj_val, this_val, args_p, args_count);
}
@ -2196,7 +2196,7 @@ jerry_get_prototype (const jerry_value_t obj_val) /**< object value */
if (proto_obj_p == NULL)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
return ECMA_VALUE_NULL;
}
return ecma_make_object_value (proto_obj_p);
@ -2233,7 +2233,7 @@ jerry_set_prototype (const jerry_value_t obj_val, /**< object value */
ecma_get_object_from_value (proto_obj_val));
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
} /* jerry_set_prototype */
/**
@ -2408,7 +2408,7 @@ jerry_foreach_object_property (const jerry_value_t obj_val, /**< object value */
ecma_collection_header_t *names_p = ecma_op_object_get_property_names (object_p, false, true, true);
ecma_collection_iterator_init (&names_iter, names_p);
ecma_value_t property_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t property_value = ECMA_VALUE_EMPTY;
bool continuous = true;
@ -2463,7 +2463,7 @@ jerry_resolve_or_reject_promise (jerry_value_t promise, /**< the promise value *
ecma_value_t function = ecma_op_object_get_by_magic_id (ecma_get_object_from_value (promise), prop_name);
ecma_value_t ret = ecma_op_function_call (ecma_get_object_from_value (function),
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
ECMA_VALUE_UNDEFINED,
&argument,
1);

View File

@ -77,29 +77,6 @@ typedef enum
ECMA_TYPE___MAX = ECMA_TYPE_ERROR /** highest value for ecma types */
} ecma_type_t;
/**
* Simple ecma values
*/
typedef enum
{
/**
* Empty value is implementation defined value, used for representing:
* - empty (uninitialized) values
* - immutable binding values
* - special register or stack values for vm
*/
ECMA_SIMPLE_VALUE_EMPTY, /**< uninitialized value */
ECMA_SIMPLE_VALUE_ERROR, /**< an error is currently thrown */
ECMA_SIMPLE_VALUE_FALSE, /**< boolean false */
ECMA_SIMPLE_VALUE_TRUE, /**< boolean true */
ECMA_SIMPLE_VALUE_UNDEFINED, /**< undefined value */
ECMA_SIMPLE_VALUE_NULL, /**< null value */
ECMA_SIMPLE_VALUE_ARRAY_HOLE, /**< array hole, used for initialization of an array literal */
ECMA_SIMPLE_VALUE_NOT_FOUND, /**< a special value returned by ecma_op_object_find */
ECMA_SIMPLE_VALUE_REGISTER_REF, /**< register reference, a special "base" value for vm */
ECMA_SIMPLE_VALUE__COUNT /** count of simple ecma values */
} ecma_simple_value_t;
/**
* Description of an ecma value
*
@ -151,6 +128,35 @@ typedef int32_t ecma_integer_value_t;
*/
#define ECMA_DIRECT_SHIFT 4
/* ECMA make simple value */
#define ECMA_MAKE_VALUE(value) \
((((ecma_value_t) (value)) << ECMA_DIRECT_SHIFT) | ECMA_DIRECT_TYPE_SIMPLE_VALUE)
/**
* Simple ecma values
*/
enum
{
/**
* Empty value is implementation defined value, used for representing:
* - empty (uninitialized) values
* - immutable binding values
* - special register or stack values for vm
*/
ECMA_VALUE_EMPTY = ECMA_MAKE_VALUE (0), /**< uninitialized value */
ECMA_VALUE_ERROR = ECMA_MAKE_VALUE (1), /**< an error is currently thrown */
ECMA_VALUE_FALSE = ECMA_MAKE_VALUE (2), /**< boolean false */
ECMA_VALUE_TRUE = ECMA_MAKE_VALUE (3), /**< boolean true */
ECMA_VALUE_UNDEFINED = ECMA_MAKE_VALUE (4), /**< undefined value */
ECMA_VALUE_NULL = ECMA_MAKE_VALUE (5), /**< null value */
ECMA_VALUE_ARRAY_HOLE = ECMA_MAKE_VALUE (6), /**< array hole, used for
* initialization of an array literal */
ECMA_VALUE_NOT_FOUND = ECMA_MAKE_VALUE (7), /**< a special value returned by
* ecma_op_object_find */
ECMA_VALUE_REGISTER_REF = ECMA_MAKE_VALUE (8), /**< register reference,
* a special "base" value for vm */
};
/**
* Maximum integer number for an ecma value
*/
@ -196,7 +202,7 @@ typedef int32_t ecma_integer_value_t;
* Checks whether the error flag is set.
*/
#define ECMA_IS_VALUE_ERROR(value) \
(unlikely ((value) == ecma_make_simple_value (ECMA_SIMPLE_VALUE_ERROR)))
(unlikely ((value) == ECMA_VALUE_ERROR))
/**
* Representation for native external pointer

View File

@ -52,8 +52,8 @@ JERRY_STATIC_ASSERT (sizeof (uintptr_t) > sizeof (ecma_value_t),
#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */
JERRY_STATIC_ASSERT ((ECMA_SIMPLE_VALUE_FALSE | 0x1) == ECMA_SIMPLE_VALUE_TRUE
&& ECMA_SIMPLE_VALUE_FALSE != ECMA_SIMPLE_VALUE_TRUE,
JERRY_STATIC_ASSERT ((ECMA_VALUE_FALSE | (1 << ECMA_DIRECT_SHIFT)) == ECMA_VALUE_TRUE
&& ECMA_VALUE_FALSE != ECMA_VALUE_TRUE,
only_the_lowest_bit_must_be_different_for_simple_value_true_and_false);
/**
@ -138,9 +138,9 @@ ecma_is_value_simple (ecma_value_t value) /**< ecma value */
*/
static inline bool __attr_const___ __attr_always_inline___
ecma_is_value_equal_to_simple_value (ecma_value_t value, /**< ecma value */
ecma_simple_value_t simple_value) /**< simple value */
ecma_value_t simple_value) /**< simple value */
{
return value == ecma_make_simple_value (simple_value);
return value == simple_value;
} /* ecma_is_value_equal_to_simple_value */
/**
@ -152,7 +152,7 @@ ecma_is_value_equal_to_simple_value (ecma_value_t value, /**< ecma value */
inline bool __attr_const___ __attr_always_inline___
ecma_is_value_empty (ecma_value_t value) /**< ecma value */
{
return ecma_is_value_equal_to_simple_value (value, ECMA_SIMPLE_VALUE_EMPTY);
return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_EMPTY);
} /* ecma_is_value_empty */
/**
@ -164,7 +164,7 @@ ecma_is_value_empty (ecma_value_t value) /**< ecma value */
inline bool __attr_const___ __attr_always_inline___
ecma_is_value_undefined (ecma_value_t value) /**< ecma value */
{
return ecma_is_value_equal_to_simple_value (value, ECMA_SIMPLE_VALUE_UNDEFINED);
return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_UNDEFINED);
} /* ecma_is_value_undefined */
/**
@ -176,7 +176,7 @@ ecma_is_value_undefined (ecma_value_t value) /**< ecma value */
inline bool __attr_const___ __attr_always_inline___
ecma_is_value_null (ecma_value_t value) /**< ecma value */
{
return ecma_is_value_equal_to_simple_value (value, ECMA_SIMPLE_VALUE_NULL);
return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_NULL);
} /* ecma_is_value_null */
/**
@ -200,7 +200,7 @@ ecma_is_value_boolean (ecma_value_t value) /**< ecma value */
inline bool __attr_const___ __attr_always_inline___
ecma_is_value_true (ecma_value_t value) /**< ecma value */
{
return ecma_is_value_equal_to_simple_value (value, ECMA_SIMPLE_VALUE_TRUE);
return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_TRUE);
} /* ecma_is_value_true */
/**
@ -212,7 +212,7 @@ ecma_is_value_true (ecma_value_t value) /**< ecma value */
inline bool __attr_const___ __attr_always_inline___
ecma_is_value_false (ecma_value_t value) /**< ecma value */
{
return ecma_is_value_equal_to_simple_value (value, ECMA_SIMPLE_VALUE_FALSE);
return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_FALSE);
} /* ecma_is_value_false */
/**
@ -224,7 +224,7 @@ ecma_is_value_false (ecma_value_t value) /**< ecma value */
inline bool __attr_const___ __attr_always_inline___
ecma_is_value_found (ecma_value_t value) /**< ecma value */
{
return value != ecma_make_simple_value (ECMA_SIMPLE_VALUE_NOT_FOUND);
return value != ECMA_VALUE_NOT_FOUND;
} /* ecma_is_value_found */
/**
@ -236,7 +236,7 @@ ecma_is_value_found (ecma_value_t value) /**< ecma value */
inline bool __attr_const___ __attr_always_inline___
ecma_is_value_array_hole (ecma_value_t value) /**< ecma value */
{
return ecma_is_value_equal_to_simple_value (value, ECMA_SIMPLE_VALUE_ARRAY_HOLE);
return ecma_is_value_equal_to_simple_value (value, ECMA_VALUE_ARRAY_HOLE);
} /* ecma_is_value_array_hole */
/**
@ -343,15 +343,6 @@ ecma_check_value_type_is_spec_defined (ecma_value_t value) /**< ecma value */
|| ecma_is_value_object (value));
} /* ecma_check_value_type_is_spec_defined */
/**
* Simple value constructor
*/
inline ecma_value_t __attr_const___ __attr_always_inline___
ecma_make_simple_value (const ecma_simple_value_t simple_value) /**< simple value */
{
return (((ecma_value_t) (simple_value)) << ECMA_DIRECT_SHIFT) | ECMA_DIRECT_TYPE_SIMPLE_VALUE;
} /* ecma_make_simple_value */
/**
* Creates an ecma value from the given raw boolean.
*
@ -360,8 +351,7 @@ ecma_make_simple_value (const ecma_simple_value_t simple_value) /**< simple valu
inline ecma_value_t __attr_const___ __attr_always_inline___
ecma_make_boolean_value (bool boolean_value) /**< raw bool value from which the ecma value will be created */
{
return ecma_make_simple_value (boolean_value ? ECMA_SIMPLE_VALUE_TRUE
: ECMA_SIMPLE_VALUE_FALSE);
return boolean_value ? ECMA_VALUE_TRUE : ECMA_VALUE_FALSE;
} /* ecma_make_boolean_value */
/**
@ -644,7 +634,7 @@ ecma_copy_value (ecma_value_t value) /**< value description */
default:
{
JERRY_UNREACHABLE ();
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
}
} /* ecma_copy_value */

View File

@ -548,7 +548,7 @@ ecma_create_named_data_property (ecma_object_t *object_p, /**< object */
uint8_t type_and_flags = ECMA_PROPERTY_TYPE_NAMEDDATA | prop_attributes;
ecma_property_value_t value;
value.value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
value.value = ECMA_VALUE_UNDEFINED;
return ecma_create_property (object_p, name_p, type_and_flags, value, out_prop_p);
} /* ecma_create_named_data_property */
@ -1278,7 +1278,7 @@ ecma_make_empty_property_descriptor (void)
ecma_property_descriptor_t prop_desc;
prop_desc.is_value_defined = false;
prop_desc.value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prop_desc.value = ECMA_VALUE_UNDEFINED;
prop_desc.is_writable_defined = false;
prop_desc.is_writable = false;
prop_desc.is_enumerable_defined = false;

View File

@ -132,7 +132,6 @@ bool ecma_is_value_error_reference (ecma_value_t value) __attr_const___;
void ecma_check_value_type_is_spec_defined (ecma_value_t value);
ecma_value_t ecma_make_simple_value (const ecma_simple_value_t value) __attr_const___;
ecma_value_t ecma_make_boolean_value (bool boolean_value) __attr_const___;
ecma_value_t ecma_make_integer_value (ecma_integer_value_t integer_value) __attr_const___;
ecma_value_t ecma_make_nan_value (void);

View File

@ -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);

View File

@ -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 */
/**

View File

@ -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,

View File

@ -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),

View File

@ -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
{

View File

@ -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);

View File

@ -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);

View File

@ -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))

View File

@ -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 */
/**

View File

@ -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);

View File

@ -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:

View File

@ -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]),

View File

@ -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,

View File

@ -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)

View File

@ -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);

View File

@ -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);

View File

@ -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)
{

View File

@ -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);

View File

@ -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))
{

View File

@ -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 */

View File

@ -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)

View File

@ -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))

View File

@ -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 */

View File

@ -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)
{

View File

@ -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),

View File

@ -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)
{

View File

@ -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;

View File

@ -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 */

View File

@ -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 */
/**

View File

@ -202,7 +202,7 @@ ecma_op_array_object_set_length (ecma_object_t *object_p, /**< the array object
return ecma_reject (is_throw);
}
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
else if (!ecma_is_property_writable (ext_object_p->u.array.length_prop))
{
@ -227,7 +227,7 @@ ecma_op_array_object_set_length (ecma_object_t *object_p, /**< the array object
if (current_len_uint32 == new_len_uint32)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
return ecma_reject (is_throw);
} /* ecma_op_array_object_set_length */
@ -326,7 +326,7 @@ ecma_op_array_object_define_own_property (ecma_object_t *object_p, /**< the arra
ext_object_p->u.array.length = index + 1;
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
} /* ecma_op_array_object_define_own_property */
/**

View File

@ -40,13 +40,13 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
{
if (x == y)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
if (ecma_are_values_integer_numbers (x, y))
{
/* Note: the (x == y) comparison captures the true case. */
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
}
if (ecma_is_value_number (x))
@ -131,7 +131,7 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
{
/* 1., e. */
/* Note: the (x == y) comparison captures the true case. */
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
}
/* 7. */
@ -159,7 +159,7 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
/* 1., f. */
/* Note: the (x == y) comparison captures the true case. */
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
}
if (ecma_is_value_boolean (x))
@ -178,7 +178,7 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
return ecma_make_boolean_value (is_equal);
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
} /* ecma_op_abstract_equality_compare */
/**
@ -283,7 +283,7 @@ ecma_op_abstract_relational_compare (ecma_value_t x, /**< first operand */
ecma_value_t y, /**< second operand */
bool left_first) /**< 'LeftFirst' flag */
{
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 (prim_first_converted_value,
@ -312,7 +312,7 @@ ecma_op_abstract_relational_compare (ecma_value_t x, /**< first operand */
|| ecma_number_is_nan (ny))
{
/* c., d. */
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ret_value = ECMA_VALUE_UNDEFINED;
}
else
{

View File

@ -60,7 +60,7 @@ ecma_op_check_object_coercible (ecma_value_t value) /**< ecma value */
}
else
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
return ECMA_VALUE_EMPTY;
}
} /* ecma_op_check_object_coercible */
@ -258,7 +258,7 @@ ecma_op_to_number (ecma_value_t value) /**< ecma value */
}
else if (ecma_is_value_object (value))
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
ECMA_TRY_CATCH (primitive_value,
ecma_op_to_primitive (value, ECMA_PREFERRED_TYPE_NUMBER),
@ -316,7 +316,7 @@ ecma_op_to_string (ecma_value_t value) /**< ecma value */
if (unlikely (ecma_is_value_object (value)))
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
ECMA_TRY_CATCH (prim_value,
ecma_op_to_primitive (value, ECMA_PREFERRED_TYPE_STRING),
@ -490,7 +490,7 @@ ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_des
/* a. */
if (src_prop_desc_p->get_p == NULL)
{
prop_desc.value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prop_desc.value = ECMA_VALUE_UNDEFINED;
}
else
{
@ -508,7 +508,7 @@ ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_des
/* b. */
if (src_prop_desc_p->set_p == NULL)
{
prop_desc.value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prop_desc.value = ECMA_VALUE_UNDEFINED;
}
else
{
@ -564,7 +564,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
if return value is normal
empty completion value */
{
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 (obj_value))

View File

@ -49,7 +49,7 @@ ecma_op_eval (ecma_string_t *code_p, /**< code string */
lit_utf8_size_t chars_num = ecma_string_get_size (code_p);
if (chars_num == 0)
{
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ret_value = ECMA_VALUE_UNDEFINED;
}
else
{

View File

@ -157,7 +157,7 @@ ecma_raise_standard_error (ecma_standard_error_t error_type, /**< error type */
}
JERRY_CONTEXT (error_value) = ecma_make_object_value (error_obj_p);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_ERROR);
return ECMA_VALUE_ERROR;
} /* ecma_raise_standard_error */
#ifdef JERRY_ENABLE_ERROR_MESSAGES
@ -246,7 +246,7 @@ ecma_raise_standard_error_with_format (ecma_standard_error_t error_type, /**< er
ecma_deref_ecma_string (error_msg_p);
JERRY_CONTEXT (error_value) = ecma_make_object_value (error_obj_p);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_ERROR);
return ECMA_VALUE_ERROR;
} /* ecma_raise_standard_error_with_format */
#endif /* JERRY_ENABLE_ERROR_MESSAGES */

View File

@ -269,7 +269,7 @@ ecma_op_function_has_instance (ecma_object_t *func_obj_p, /**< Function object *
if (!ecma_is_value_object (value))
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
}
ecma_object_t *v_obj_p = ecma_get_object_from_value (value);
@ -332,7 +332,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
&& !ecma_is_lexical_environment (func_obj_p));
JERRY_ASSERT (ecma_op_is_callable (ecma_make_object_value (func_obj_p)));
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
if (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_FUNCTION)
{
@ -470,7 +470,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
if (unlikely (ecma_is_value_error_reference (ret_value)))
{
JERRY_CONTEXT (error_value) = ecma_clear_error_reference (ret_value);
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_ERROR);
ret_value = ECMA_VALUE_ERROR;
}
}
else
@ -554,7 +554,7 @@ ecma_op_function_construct_simple_or_external (ecma_object_t *func_obj_p, /**< F
JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_FUNCTION
|| ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION);
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
/* 5. */
ECMA_TRY_CATCH (func_obj_prototype_prop_value,
@ -637,7 +637,7 @@ ecma_op_function_construct (ecma_object_t *func_obj_p, /**< Function object */
&& !ecma_is_lexical_environment (func_obj_p));
JERRY_ASSERT (ecma_is_constructor (ecma_make_object_value (func_obj_p)));
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
if (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_FUNCTION)
{
@ -828,7 +828,7 @@ ecma_op_external_function_try_to_lazy_instantiate_property (ecma_object_t *objec
ECMA_PROPERTY_FLAG_WRITABLE,
&prototype_prop_p);
prototype_prop_value_p->value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
prototype_prop_value_p->value = ECMA_VALUE_UNDEFINED;
return prototype_prop_p;
}

View File

@ -98,7 +98,7 @@ ecma_op_get_value_object_base (ecma_value_t base_value, /**< base value */
|| ecma_is_value_number (base_value)
|| ecma_is_value_string (base_value));
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
ECMA_TRY_CATCH (object_base, ecma_op_to_object (base_value), ret_value);
@ -106,7 +106,7 @@ ecma_op_get_value_object_base (ecma_value_t base_value, /**< base value */
JERRY_ASSERT (object_p != NULL
&& !ecma_is_lexical_environment (object_p));
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ret_value = ECMA_VALUE_UNDEFINED;
/* Circular reference is possible in JavaScript and testing it is complicated. */
int max_depth = ECMA_PROPERTY_SEARCH_DEPTH_LIMIT;
@ -181,7 +181,7 @@ ecma_op_put_value_lex_env_base (ecma_object_t *ref_base_lex_env_p, /**< referenc
JERRY_ASSERT (ecma_is_value_boolean (completion));
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
return ECMA_VALUE_EMPTY;
}
}

View File

@ -168,7 +168,7 @@ ecma_process_promise_reaction_job (void *obj_p) /**< the job to be operated */
{
/* 6. */
handler_result = ecma_op_function_call (ecma_get_object_from_value (handler),
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
ECMA_VALUE_UNDEFINED,
&(job_p->argument),
1);
}
@ -188,7 +188,7 @@ ecma_process_promise_reaction_job (void *obj_p) /**< the job to be operated */
JERRY_ASSERT (ecma_op_is_callable (reject));
status = ecma_op_function_call (ecma_get_object_from_value (reject),
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
ECMA_VALUE_UNDEFINED,
&handler_result,
1);
ecma_free_value (reject);
@ -201,7 +201,7 @@ ecma_process_promise_reaction_job (void *obj_p) /**< the job to be operated */
JERRY_ASSERT (ecma_op_is_callable (resolve));
status = ecma_op_function_call (ecma_get_object_from_value (resolve),
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
ECMA_VALUE_UNDEFINED,
&handler_result,
1);
ecma_free_value (resolve);
@ -259,7 +259,7 @@ ecma_process_promise_resolve_thenable_job (void *obj_p) /**< the job to be opera
then_call_result = JERRY_CONTEXT (error_value);
ret = ecma_op_function_call (ecma_get_object_from_value (funcs->reject),
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
ECMA_VALUE_UNDEFINED,
&then_call_result,
1);
@ -331,7 +331,7 @@ ecma_enqueue_promise_resolve_thenable_job (ecma_value_t promise, /**< promise to
ecma_value_t
ecma_process_all_enqueued_jobs (void)
{
ecma_value_t ret = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ecma_value_t ret = ECMA_VALUE_UNDEFINED;
while (JERRY_CONTEXT (job_queue_head_p) != NULL && !ECMA_IS_VALUE_ERROR (ret))
{

View File

@ -148,12 +148,12 @@ ecma_op_create_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environme
ecma_value_t completion;
if (!ecma_get_object_extensible (binding_obj_p))
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
return ECMA_VALUE_EMPTY;
}
completion = ecma_builtin_helper_def_prop (binding_obj_p,
name_p,
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
ECMA_VALUE_UNDEFINED,
true, /* Writable */
true, /* Enumerable */
is_deletable, /* Configurable */
@ -169,7 +169,7 @@ ecma_op_create_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environme
}
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
return ECMA_VALUE_EMPTY;
} /* ecma_op_create_mutable_binding */
/**
@ -228,7 +228,7 @@ ecma_op_set_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environment
}
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
return ECMA_VALUE_EMPTY;
} /* ecma_op_set_mutable_binding */
/**
@ -271,7 +271,7 @@ ecma_op_get_binding_value (ecma_object_t *lex_env_p, /**< lexical environment */
}
else
{
result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
result = ECMA_VALUE_UNDEFINED;
}
}
@ -300,11 +300,11 @@ ecma_op_delete_binding (ecma_object_t *lex_env_p, /**< lexical environment */
if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)
{
ecma_property_t *prop_p = ecma_find_named_property (lex_env_p, name_p);
ecma_simple_value_t ret_val;
ecma_value_t ret_val;
if (prop_p == NULL)
{
ret_val = ECMA_SIMPLE_VALUE_TRUE;
ret_val = ECMA_VALUE_TRUE;
}
else
{
@ -312,17 +312,17 @@ ecma_op_delete_binding (ecma_object_t *lex_env_p, /**< lexical environment */
if (!ecma_is_property_configurable (*prop_p))
{
ret_val = ECMA_SIMPLE_VALUE_FALSE;
ret_val = ECMA_VALUE_FALSE;
}
else
{
ecma_delete_property (lex_env_p, ECMA_PROPERTY_VALUE_PTR (prop_p));
ret_val = ECMA_SIMPLE_VALUE_TRUE;
ret_val = ECMA_VALUE_TRUE;
}
}
return ecma_make_simple_value (ret_val);
return ret_val;
}
else
{
@ -351,7 +351,7 @@ ecma_op_implicit_this_value (ecma_object_t *lex_env_p) /**< lexical environment
if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
else
{
@ -367,7 +367,7 @@ ecma_op_implicit_this_value (ecma_object_t *lex_env_p) /**< lexical environment
}
else
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
}
} /* ecma_op_implicit_this_value */

View File

@ -358,7 +358,7 @@ ecma_op_arguments_object_delete (ecma_object_t *object_p, /**< the object */
}
}
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
ret_value = ECMA_VALUE_TRUE;
}
return ret_value;

View File

@ -45,7 +45,7 @@ ecma_reject (bool is_throw) /**< Throw flag */
}
else
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
}
} /* ecma_reject */
@ -157,7 +157,7 @@ ecma_op_general_object_delete (ecma_object_t *obj_p, /**< the object */
/* 2. */
if (property == ECMA_PROPERTY_TYPE_NOT_FOUND || property == ECMA_PROPERTY_TYPE_NOT_FOUND_AND_STOP)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
/* 3. */
@ -167,7 +167,7 @@ ecma_op_general_object_delete (ecma_object_t *obj_p, /**< the object */
ecma_delete_property (obj_p, property_ref.value_p);
/* b. */
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
else if (is_throw)
{
@ -177,7 +177,7 @@ ecma_op_general_object_delete (ecma_object_t *obj_p, /**< the object */
else
{
/* 5. */
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
return ECMA_VALUE_FALSE;
}
JERRY_UNREACHABLE ();
@ -233,7 +233,7 @@ ecma_op_general_object_default_value (ecma_object_t *obj_p, /**< the object */
return function_value;
}
ecma_value_t call_completion = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t call_completion = ECMA_VALUE_EMPTY;
if (ecma_op_is_callable (function_value))
{
@ -383,7 +383,7 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
NULL);
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
/* 6. */
@ -411,7 +411,7 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
{
JERRY_ASSERT (!is_current_configurable && !ecma_is_property_writable (current_prop));
ecma_value_t result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
ecma_value_t result = ECMA_VALUE_TRUE;
if (property_desc_type == ECMA_PROPERTY_TYPE_NAMEDACCESSOR
|| property_desc_p->is_writable
@ -502,7 +502,7 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
value_p->getter_setter_pair_cp);
jmem_pools_free (getter_setter_pair_p, sizeof (ecma_getter_setter_pointers_t));
#endif /* JERRY_CPOINTER_32_BIT */
value_p->value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
value_p->value = ECMA_VALUE_UNDEFINED;
}
/* Update flags */
@ -558,7 +558,7 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
ecma_set_property_configurable_attr (ext_property_ref.property_p, property_desc_p->is_configurable);
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
} /* ecma_op_general_object_define_own_property */
#undef ECMA_PROPERTY_TYPE_GENERIC

View File

@ -390,7 +390,7 @@ ecma_op_object_has_property (ecma_object_t *object_p, /**< the object */
* Note: search includes prototypes
*
* @return ecma value if property is found
* ECMA_SIMPLE_VALUE_NOT_FOUND if property is not found
* ECMA_VALUE_NOT_FOUND if property is not found
* Returned value must be freed with ecma_free_value
*/
ecma_value_t
@ -496,7 +496,7 @@ ecma_op_object_find_own (ecma_value_t base_value, /**< base value */
{
ecma_deref_ecma_string (num_to_str);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
ecma_deref_ecma_string (num_to_str);
@ -574,7 +574,7 @@ ecma_op_object_find_own (ecma_value_t base_value, /**< base value */
if (property_p == NULL)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_NOT_FOUND);
return ECMA_VALUE_NOT_FOUND;
}
}
@ -591,7 +591,7 @@ ecma_op_object_find_own (ecma_value_t base_value, /**< base value */
if (getter_p == NULL)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
return ecma_op_function_call (getter_p, base_value, NULL, 0);
@ -603,7 +603,7 @@ ecma_op_object_find_own (ecma_value_t base_value, /**< base value */
* Note: search includes prototypes
*
* @return ecma value if property is found
* ECMA_SIMPLE_VALUE_NOT_FOUND if property is not found
* ECMA_VALUE_NOT_FOUND if property is not found
* Returned value must be freed with ecma_free_value
*/
ecma_value_t
@ -632,7 +632,7 @@ ecma_op_object_find (ecma_object_t *object_p, /**< the object */
}
while (object_p != NULL);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_NOT_FOUND);
return ECMA_VALUE_NOT_FOUND;
} /* ecma_op_object_find */
/**
@ -705,7 +705,7 @@ ecma_op_object_get (ecma_object_t *object_p, /**< the object */
}
while (object_p != NULL);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
} /* ecma_op_object_get */
/**
@ -751,7 +751,7 @@ ecma_op_object_get_by_magic_id (ecma_object_t *object_p, /**< the object */
}
while (object_p != NULL);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
} /* ecma_op_object_get_by_magic_id */
/**
@ -765,9 +765,9 @@ ecma_op_object_get_by_magic_id (ecma_object_t *object_p, /**< the object */
* @return ecma value
* The returned value must be freed with ecma_free_value.
*
* Returns with ECMA_SIMPLE_VALUE_TRUE if the operation is
* Returns with ECMA_VALUE_TRUE if the operation is
* successful. Otherwise it returns with an error object
* or ECMA_SIMPLE_VALUE_FALSE.
* or ECMA_VALUE_FALSE.
*
* Note: even if is_throw is false, the setter can throw an
* error, and this function returns with that error.
@ -828,7 +828,7 @@ ecma_op_object_put (ecma_object_t *object_p, /**< the object */
&& ecma_is_lexical_environment (lex_env_p));
ecma_op_set_mutable_binding (lex_env_p, arg_name_p, value, true);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
}
}
@ -843,7 +843,7 @@ ecma_op_object_put (ecma_object_t *object_p, /**< the object */
if (set_status)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
return ecma_reject (is_throw);
@ -930,7 +930,7 @@ ecma_op_object_put (ecma_object_t *object_p, /**< the object */
ecma_named_data_property_assign_value (object_p,
ECMA_PROPERTY_VALUE_PTR (property_p),
value);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
}
else
@ -1016,7 +1016,7 @@ ecma_op_object_put (ecma_object_t *object_p, /**< the object */
JERRY_ASSERT (ecma_is_value_undefined (new_prop_value_p->value));
new_prop_value_p->value = ecma_copy_value_if_not_object (value);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
}
@ -1033,7 +1033,7 @@ ecma_op_object_put (ecma_object_t *object_p, /**< the object */
if (!ECMA_IS_VALUE_ERROR (ret_value))
{
ecma_fast_free_value (ret_value);
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
ret_value = ECMA_VALUE_TRUE;
}
return ret_value;
@ -1187,7 +1187,7 @@ ecma_op_object_define_own_property (ecma_object_t *obj_p, /**< the object */
if (define_status)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
}
return ecma_reject (is_throw);
@ -1888,7 +1888,7 @@ ecma_object_get_class_name (ecma_object_t *obj_p) /**< object */
* Get value of an object if the class matches
*
* @return value of the object if the class matches
* ECMA_SIMPLE_VALUE_NOT_FOUND otherwise
* ECMA_VALUE_NOT_FOUND otherwise
*/
inline bool __attr_always_inline___
ecma_object_class_is (ecma_object_t *object_p, /**< object */

View File

@ -74,7 +74,7 @@ ecma_promise_set_result (ecma_object_t *obj_p, /**< points to promise object */
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;
JERRY_ASSERT (ext_object_p->u.class_prop.u.value == ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED));
JERRY_ASSERT (ext_object_p->u.class_prop.u.value == ECMA_VALUE_UNDEFINED);
ext_object_p->u.class_prop.u.value = result;
} /* ecma_promise_set_result */
@ -237,18 +237,18 @@ ecma_promise_reject_handler (const ecma_value_t function, /**< the function itse
{
ecma_free_value (promise);
ecma_free_value (already_resolved);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
/* 5. */
ecma_set_already_resolved_value (already_resolved, true);
/* 6. */
ecma_value_t reject_value = (argc == 0) ? ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED) : argv[0];
ecma_value_t reject_value = (argc == 0) ? ECMA_VALUE_UNDEFINED : argv[0];
ecma_reject_promise (promise, reject_value);
ecma_free_value (promise);
ecma_free_value (already_resolved);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
} /* ecma_promise_reject_handler */
/**
@ -290,7 +290,7 @@ ecma_promise_resolve_handler (const ecma_value_t function, /**< the function its
/* If the argc is 0, then fulfill the `undefined`. */
if (argc == 0)
{
ecma_fulfill_promise (promise, ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED));
ecma_fulfill_promise (promise, ECMA_VALUE_UNDEFINED);
goto end_of_resolve_function;
}
@ -336,7 +336,7 @@ ecma_promise_resolve_handler (const ecma_value_t function, /**< the function its
end_of_resolve_function:
ecma_free_value (promise);
ecma_free_value (already_resolved);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
} /* ecma_promise_resolve_handler */
/**
@ -361,7 +361,7 @@ ecma_call_builtin_executor (ecma_object_t *executor_p, /**< the executor object
/* 3. */
ecma_value_t resolve = ecma_op_object_get (ecma_get_object_from_value (capability), str_resolve);
if (resolve != ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED))
if (resolve != ECMA_VALUE_UNDEFINED)
{
ecma_free_value (resolve);
ecma_free_value (capability);
@ -375,7 +375,7 @@ ecma_call_builtin_executor (ecma_object_t *executor_p, /**< the executor object
/* 4. */
ecma_value_t reject = ecma_op_object_get (ecma_get_object_from_value (capability), str_reject);
if (reject != ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED))
if (reject != ECMA_VALUE_UNDEFINED)
{
ecma_free_value (reject);
ecma_free_value (capability);
@ -402,7 +402,7 @@ ecma_call_builtin_executor (ecma_object_t *executor_p, /**< the executor object
ecma_deref_ecma_string (str_resolve);
ecma_deref_ecma_string (str_reject);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
} /* ecma_call_builtin_executor */
/**
@ -491,7 +491,7 @@ ecma_op_create_promise_object (ecma_value_t executor, /**< the executor function
ecma_deref_object (prototype_obj_p);
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;
ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_PROMISE_UL;
ext_object_p->u.class_prop.u.value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ext_object_p->u.class_prop.u.value = ECMA_VALUE_UNDEFINED;
ecma_promise_object_t *promise_object_p = (ecma_promise_object_t *) object_p;
promise_object_p->fulfill_reactions = NULL;
promise_object_p->reject_reactions = NULL;
@ -517,7 +517,7 @@ ecma_op_create_promise_object (ecma_value_t executor, /**< the executor function
false);
/* 9. */
ecma_value_t completion = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ecma_value_t completion = ECMA_VALUE_UNDEFINED;
if (type == ECMA_PROMISE_EXECUTOR_FUNCTION)
{
@ -525,7 +525,7 @@ ecma_op_create_promise_object (ecma_value_t executor, /**< the executor function
ecma_value_t argv[] = { funcs->resolve, funcs->reject };
completion = ecma_op_function_call (ecma_get_object_from_value (executor),
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
ECMA_VALUE_UNDEFINED,
argv,
2);
}
@ -543,14 +543,14 @@ ecma_op_create_promise_object (ecma_value_t executor, /**< the executor function
JERRY_UNUSED (executor);
}
ecma_value_t status = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t status = ECMA_VALUE_EMPTY;
if (ECMA_IS_VALUE_ERROR (completion))
{
/* 10.a. */
completion = JERRY_CONTEXT (error_value);
status = ecma_op_function_call (ecma_get_object_from_value (funcs->reject),
ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED),
ECMA_VALUE_UNDEFINED,
&completion,
1);
}

View File

@ -105,7 +105,7 @@ ecma_op_resolve_reference_value (ecma_object_t *lex_env_p, /**< starting lexical
if (getter_p == NULL)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
ecma_value_t base_value = ecma_make_object_value (binding_obj_p);

View File

@ -73,7 +73,7 @@ ecma_value_t
re_parse_regexp_flags (ecma_string_t *flags_str_p, /**< Input string with flags */
uint16_t *flags_p) /**< [out] parsed flag bits */
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
ECMA_STRING_TO_UTF8_STRING (flags_str_p, flags_start_p, flags_start_size);
@ -260,7 +260,7 @@ ecma_op_create_regexp_object (ecma_string_t *pattern_p, /**< input pattern */
ecma_string_t *flags_str_p) /**< flags */
{
JERRY_ASSERT (pattern_p != NULL);
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
uint16_t flags = 0;
if (flags_str_p != NULL)
@ -372,7 +372,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
const lit_utf8_byte_t *str_p, /**< input string pointer */
const lit_utf8_byte_t **out_str_p) /**< [out] matching substring iterator */
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
re_opcode_t op;
const lit_utf8_byte_t *str_curr_p = str_p;
@ -385,14 +385,14 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
{
JERRY_TRACE_MSG ("Execute RE_OP_MATCH: match\n");
*out_str_p = str_curr_p;
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
ret_value = ECMA_VALUE_TRUE;
return ret_value; /* match */
}
case RE_OP_CHAR:
{
if (str_curr_p >= re_ctx_p->input_end_p)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
bool is_ignorecase = re_ctx_p->flags & RE_FLAG_IGNORE_CASE;
@ -403,7 +403,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (ch1 != ch2)
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
JERRY_TRACE_MSG ("match\n");
@ -414,7 +414,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
{
if (str_curr_p >= re_ctx_p->input_end_p)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
ecma_char_t ch = lit_utf8_read_next (&str_curr_p);
@ -423,7 +423,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (lit_char_is_line_terminator (ch))
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
JERRY_TRACE_MSG ("match\n");
@ -442,7 +442,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (!(re_ctx_p->flags & RE_FLAG_MULTILINE))
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
if (lit_char_is_line_terminator (lit_utf8_peek_prev (str_curr_p)))
@ -452,7 +452,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
}
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
case RE_OP_ASSERT_END:
{
@ -467,7 +467,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (!(re_ctx_p->flags & RE_FLAG_MULTILINE))
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
if (lit_char_is_line_terminator (lit_utf8_peek_next (str_curr_p)))
@ -477,7 +477,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
}
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
case RE_OP_ASSERT_WORD_BOUNDARY:
case RE_OP_ASSERT_NOT_WORD_BOUNDARY:
@ -508,7 +508,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (is_wordchar_left == is_wordchar_right)
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
}
else
@ -519,7 +519,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (is_wordchar_left != is_wordchar_right)
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
}
@ -529,7 +529,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
case RE_OP_LOOKAHEAD_POS:
case RE_OP_LOOKAHEAD_NEG:
{
ecma_value_t match_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t match_value = ECMA_VALUE_EMPTY;
const lit_utf8_byte_t *sub_str_p = NULL;
uint32_t array_size = re_ctx_p->num_of_captures + re_ctx_p->num_of_non_captures;
@ -567,7 +567,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
else
{
JERRY_TRACE_MSG ("fail\n");
match_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
match_value = ECMA_VALUE_FALSE; /* fail */
}
}
@ -598,7 +598,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (str_curr_p >= re_ctx_p->input_end_p)
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
bool is_ignorecase = re_ctx_p->flags & RE_FLAG_IGNORE_CASE;
@ -628,7 +628,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (!is_match)
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
}
else
@ -637,7 +637,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (is_match)
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
}
JERRY_TRACE_MSG ("match\n");
@ -667,7 +667,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (str_curr_p >= re_ctx_p->input_end_p)
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
ch1 = lit_utf8_read_next (&sub_str_p);
@ -676,7 +676,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (ch1 != ch2)
{
JERRY_TRACE_MSG ("fail\n");
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
}
JERRY_TRACE_MSG ("match\n");
@ -713,14 +713,14 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
bc_p = old_bc_p;
re_ctx_p->saved_p[RE_GLOBAL_START_IDX] = old_start_p;
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
case RE_OP_SAVE_AND_MATCH:
{
JERRY_TRACE_MSG ("End of pattern is reached: match\n");
re_ctx_p->saved_p[RE_GLOBAL_END_IDX] = str_curr_p;
*out_str_p = str_curr_p;
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE); /* match */
return ECMA_VALUE_TRUE; /* match */
}
case RE_OP_ALTERNATIVE:
{
@ -875,7 +875,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
}
re_ctx_p->saved_p[start_idx] = old_start_p;
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
case RE_OP_CAPTURE_NON_GREEDY_GROUP_END:
case RE_OP_NON_CAPTURE_NON_GREEDY_GROUP_END:
@ -968,7 +968,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (re_ctx_p->num_of_iterations_p[iter_idx] >= min
&& str_curr_p== re_ctx_p->saved_p[start_idx])
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
re_ctx_p->num_of_iterations_p[iter_idx]++;
@ -1045,7 +1045,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
/* restore if fails */
re_ctx_p->saved_p[end_idx] = old_end_p;
re_ctx_p->num_of_iterations_p[iter_idx]--;
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
case RE_OP_NON_GREEDY_ITERATOR:
{
@ -1092,7 +1092,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
str_curr_p = sub_str_p;
num_of_iter++;
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
case RE_OP_GREEDY_ITERATOR:
{
@ -1148,7 +1148,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
lit_utf8_read_prev (&str_curr_p);
num_of_iter--;
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
}
default:
{
@ -1159,7 +1159,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
}
JERRY_UNREACHABLE ();
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE); /* fail */
return ECMA_VALUE_FALSE; /* fail */
} /* re_match_regexp */
/**
@ -1231,7 +1231,7 @@ ecma_regexp_exec_helper (ecma_value_t regexp_value, /**< RegExp object */
ecma_value_t input_string, /**< input string */
bool ignore_global) /**< ignore global flag */
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
JERRY_ASSERT (ecma_is_value_object (regexp_value));
JERRY_ASSERT (ecma_is_value_string (input_string));
@ -1402,7 +1402,7 @@ ecma_regexp_exec_helper (ecma_value_t regexp_value, /**< RegExp object */
for (uint32_t i = 0; i < re_ctx.num_of_captures; i += 2)
{
ecma_string_t *index_str_p = ecma_new_ecma_string_from_uint32 (i / 2);
ecma_value_t capture_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ecma_value_t capture_value = ECMA_VALUE_UNDEFINED;
if (((re_ctx.saved_p[i] && re_ctx.saved_p[i + 1])
&& re_ctx.saved_p[i + 1] >= re_ctx.saved_p[i]))
@ -1438,7 +1438,7 @@ ecma_regexp_exec_helper (ecma_value_t regexp_value, /**< RegExp object */
}
else
{
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
ret_value = ECMA_VALUE_NULL;
}
}

View File

@ -30,7 +30,7 @@
* statement with same argument as corresponding ECMA_TRY_CATCH's first argument.
*/
#define ECMA_TRY_CATCH(var, op, return_value) \
JERRY_ASSERT (return_value == ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY)); \
JERRY_ASSERT (return_value == ECMA_VALUE_EMPTY); \
ecma_value_t var ## _completion = op; \
if (ECMA_IS_VALUE_ERROR (var ## _completion)) \
{ \
@ -65,7 +65,7 @@
* statement with same argument as corresponding ECMA_OP_TO_NUMBER_TRY_CATCH's first argument.
*/
#define ECMA_OP_TO_NUMBER_TRY_CATCH(num_var, value, return_value) \
JERRY_ASSERT (return_value == ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY)); \
JERRY_ASSERT (return_value == ECMA_VALUE_EMPTY); \
ecma_number_t num_var = ecma_number_make_nan (); \
if (ecma_is_value_number (value)) \
{ \

View File

@ -379,7 +379,7 @@ ecma_op_typedarray_from (ecma_value_t items_val, /**< the source array-like obje
uint8_t element_size_shift, /**< the size shift of the element length */
lit_magic_string_id_t class_id) /**< class name of the typedarray */
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
/* 3 */
JERRY_ASSERT (ecma_op_is_callable (map_fn_val) || ecma_is_value_undefined (map_fn_val));
@ -596,7 +596,7 @@ ecma_op_create_typedarray (const ecma_value_t *arguments_list_p, /**< the arg li
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
ecma_value_t ret = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret = ECMA_VALUE_EMPTY;
if (arguments_list_len == 0)
{
@ -645,10 +645,10 @@ ecma_op_create_typedarray (const ecma_value_t *arguments_list_p, /**< the arg li
/* 22.2.1.5 */
ecma_object_t *arraybuffer_p = ecma_get_object_from_value (arguments_list_p[0]);
ecma_value_t arg2 = ((arguments_list_len > 1) ? arguments_list_p[1]
: ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED));
: ECMA_VALUE_UNDEFINED);
ecma_value_t arg3 = ((arguments_list_len > 2) ? arguments_list_p[2]
: ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED));
: ECMA_VALUE_UNDEFINED);
ECMA_OP_TO_NUMBER_TRY_CATCH (num2, arg2, ret);
@ -718,7 +718,7 @@ ecma_op_create_typedarray (const ecma_value_t *arguments_list_p, /**< the arg li
else
{
/* 22.2.1.4 */
ecma_value_t undef = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ecma_value_t undef = ECMA_VALUE_UNDEFINED;
ret = ecma_op_typedarray_from (arguments_list_p[0],
undef,
undef,
@ -800,7 +800,7 @@ ecma_op_typedarray_get_index_prop (ecma_object_t *obj_p, /**< a TypedArray objec
if (index >= array_length)
{
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
ecma_object_t *arraybuffer_p = ecma_typedarray_get_arraybuffer (obj_p);
@ -878,7 +878,7 @@ ecma_op_typedarray_set_index_prop (ecma_object_t *obj_p, /**< a TypedArray objec
return false;
}
ecma_value_t error = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t error = ECMA_VALUE_EMPTY;
ECMA_OP_TO_NUMBER_TRY_CATCH (value_num, value, error);

View File

@ -2729,8 +2729,8 @@ parser_parse_script (const uint8_t *arg_list_p, /**< function argument list */
{
/* It is unlikely that memory can be allocated in an out-of-memory
* situation. However, a simple value can still be thrown. */
JERRY_CONTEXT (error_value) = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_ERROR);
JERRY_CONTEXT (error_value) = ECMA_VALUE_NULL;
return ECMA_VALUE_ERROR;
}
#ifdef JERRY_ENABLE_ERROR_MESSAGES
const lit_utf8_byte_t *err_bytes_p = (const lit_utf8_byte_t *) parser_error_to_string (parser_error.error);
@ -2756,7 +2756,7 @@ parser_parse_script (const uint8_t *arg_list_p, /**< function argument list */
return ecma_raise_syntax_error ("");
#endif /* JERRY_ENABLE_ERROR_MESSAGES */
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
return ECMA_VALUE_TRUE;
#else /* JERRY_DISABLE_JS_PARSER */
JERRY_UNUSED (arg_list_p);
JERRY_UNUSED (arg_list_size);

View File

@ -217,7 +217,7 @@ re_parse_alternative (re_compiler_ctx_t *re_ctx_p, /**< RegExp compiler context
{
uint32_t idx;
re_bytecode_ctx_t *bc_ctx_p = re_ctx_p->bytecode_ctx_p;
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
uint32_t alterantive_offset = re_get_bytecode_length (re_ctx_p->bytecode_ctx_p);
bool should_loop = true;
@ -517,7 +517,7 @@ re_compile_bytecode (const re_compiled_code_t **out_bytecode_p, /**< [out] point
ecma_string_t *pattern_str_p, /**< pattern */
uint16_t flags) /**< flags */
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
uint8_t cache_idx = re_find_bytecode_in_cache (pattern_str_p, flags);
if (cache_idx < RE_CACHE_SIZE)

View File

@ -113,7 +113,7 @@ static ecma_value_t
re_parse_iterator (re_parser_ctx_t *parser_ctx_p, /**< RegExp parser context */
re_token_t *re_token_p) /**< [out] output token */
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
re_token_p->qmin = 1;
re_token_p->qmax = 1;
@ -561,7 +561,7 @@ ecma_value_t
re_parse_next_token (re_parser_ctx_t *parser_ctx_p, /**< RegExp parser context */
re_token_t *out_token_p) /**< [out] output token */
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
if (parser_ctx_p->input_curr_p >= parser_ctx_p->input_end_p)
{

View File

@ -45,7 +45,7 @@ do_number_arithmetic (number_arithmetic_op op, /**< number arithmetic operation
ecma_value_t left_value, /**< left value */
ecma_value_t right_value) /**< right value */
{
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 (num_left, left_value, ret_value);
ECMA_OP_TO_NUMBER_TRY_CATCH (num_right, right_value, ret_value);
@ -127,7 +127,7 @@ opfunc_addition (ecma_value_t left_value, /**< left value */
}
}
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_string (left_value)
|| ecma_is_value_string (right_value))
@ -181,7 +181,7 @@ ecma_value_t
opfunc_unary_operation (ecma_value_t left_value, /**< left value */
bool is_plus) /**< unary plus flag */
{
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 (num_var_value,
left_value,

View File

@ -45,7 +45,7 @@ do_number_bitwise_logic (number_bitwise_logic_op op, /**< number bitwise logic o
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (left_value)
&& !ECMA_IS_VALUE_ERROR (right_value));
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 (num_left, left_value, ret_value);
ECMA_OP_TO_NUMBER_TRY_CATCH (num_right, right_value, ret_value);

View File

@ -77,7 +77,7 @@ opfunc_relation (ecma_value_t left_value, /**< left value */
if (ecma_is_value_undefined (ret_value))
{
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
ret_value = ECMA_VALUE_FALSE;
}
else
{
@ -104,7 +104,7 @@ ecma_value_t
opfunc_instanceof (ecma_value_t left_value, /**< left value */
ecma_value_t right_value) /**< right value */
{
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 (right_value))
{
@ -138,7 +138,7 @@ ecma_value_t
opfunc_in (ecma_value_t left_value, /**< left value */
ecma_value_t right_value) /**< right value */
{
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 (right_value))
{

View File

@ -64,7 +64,7 @@ vm_var_decl (vm_frame_ctx_t *frame_ctx_p, /**< interpreter context */
var_name_str_p,
vm_is_strict_mode ())));
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
return ECMA_VALUE_EMPTY;
} /* vm_var_decl */
/**
@ -92,7 +92,7 @@ opfunc_logical_not (ecma_value_t left_value) /**< left value */
ecma_value_t
opfunc_typeof (ecma_value_t left_value) /**< left value */
{
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
ecma_string_t *type_str_p = NULL;
@ -208,15 +208,15 @@ vm_op_delete_prop (ecma_value_t object, /**< base object */
ecma_value_t property, /**< property name */
bool is_strict) /**< strict mode */
{
ecma_value_t completion_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t completion_value = ECMA_VALUE_EMPTY;
if (ecma_is_value_undefined (object))
{
completion_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
completion_value = ECMA_VALUE_TRUE;
}
else
{
completion_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
completion_value = ECMA_VALUE_EMPTY;
ECMA_TRY_CATCH (check_coercible_ret,
ecma_op_check_object_coercible (object),
@ -259,7 +259,7 @@ ecma_value_t
vm_op_delete_var (jmem_cpointer_t name_literal, /**< name literal */
ecma_object_t *lex_env_p) /**< lexical environment */
{
ecma_value_t completion_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t completion_value = ECMA_VALUE_EMPTY;
ecma_string_t *var_name_str_p = JMEM_CP_GET_NON_NULL_POINTER (ecma_string_t, name_literal);
@ -267,7 +267,7 @@ vm_op_delete_var (jmem_cpointer_t name_literal, /**< name literal */
if (ref_base_lex_env_p == NULL)
{
completion_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
completion_value = ECMA_VALUE_TRUE;
}
else
{
@ -292,7 +292,7 @@ ecma_collection_header_t *
opfunc_for_in (ecma_value_t left_value, /**< left value */
ecma_value_t *result_obj_p) /**< expression object */
{
ecma_value_t compl_val = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t compl_val = ECMA_VALUE_EMPTY;
ecma_collection_header_t *prop_names_p = NULL;
/* 3. */

View File

@ -180,7 +180,7 @@ vm_op_set_value (ecma_value_t object, /**< base object */
ecma_object_t *object_p = ecma_get_object_from_value (object);
ecma_string_t *property_p = ecma_get_string_from_value (property);
ecma_value_t completion_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t completion_value = ECMA_VALUE_EMPTY;
if (!ecma_is_lexical_environment (object_p))
{
@ -333,7 +333,7 @@ vm_construct_literal_object (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
if (ECMA_IS_VALUE_ERROR (ret_value))
{
/* TODO: throw exception instead of define an 'undefined' value. */
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
return ret_value;
@ -391,18 +391,18 @@ opfunc_call (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
bool is_call_prop = ((opcode - CBC_CALL) % 6) >= 3;
ecma_value_t this_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ecma_value_t this_value = ECMA_VALUE_UNDEFINED;
ecma_value_t *stack_top_p = frame_ctx_p->stack_top_p - arguments_list_len;
if (is_call_prop)
{
this_value = stack_top_p[-3];
if (this_value == ecma_make_simple_value (ECMA_SIMPLE_VALUE_REGISTER_REF))
if (this_value == ECMA_VALUE_REGISTER_REF)
{
/* Lexical environment cannot be 'this' value. */
stack_top_p[-2] = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
this_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
stack_top_p[-2] = ECMA_VALUE_UNDEFINED;
this_value = ECMA_VALUE_UNDEFINED;
}
else if (vm_get_implicit_this_value (&this_value))
{
@ -742,8 +742,8 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
uint8_t branch_offset_length = 0;
ecma_value_t left_value;
ecma_value_t right_value;
ecma_value_t result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY);
ecma_value_t block_result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ecma_value_t result = ECMA_VALUE_EMPTY;
ecma_value_t block_result = ECMA_VALUE_UNDEFINED;
bool is_strict = ((frame_ctx_p->bytecode_header_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE) != 0);
/* Prepare for byte code execution. */
@ -793,8 +793,8 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
opcode_data = vm_decode_table[opcode_data];
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
right_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
right_value = ECMA_VALUE_UNDEFINED;
uint32_t operands = VM_OC_GET_ARGS_INDEX (opcode_data);
@ -890,7 +890,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
JERRY_CONTEXT (error_value) = ecma_clear_error_reference (result);
}
result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_ERROR);
result = ECMA_VALUE_ERROR;
goto error;
}
}
@ -935,7 +935,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
uint16_t literal_index;
*stack_top_p++ = left_value;
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
READ_LITERAL_INDEX (literal_index);
READ_LITERAL (literal_index, left_value);
@ -946,22 +946,22 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
case VM_OC_PUSH_UNDEFINED:
{
*stack_top_p++ = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
*stack_top_p++ = ECMA_VALUE_UNDEFINED;
continue;
}
case VM_OC_PUSH_TRUE:
{
*stack_top_p++ = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
*stack_top_p++ = ECMA_VALUE_TRUE;
continue;
}
case VM_OC_PUSH_FALSE:
{
*stack_top_p++ = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
*stack_top_p++ = ECMA_VALUE_FALSE;
continue;
}
case VM_OC_PUSH_NULL:
{
*stack_top_p++ = ecma_make_simple_value (ECMA_SIMPLE_VALUE_NULL);
*stack_top_p++ = ECMA_VALUE_NULL;
continue;
}
case VM_OC_PUSH_THIS:
@ -1075,7 +1075,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
case VM_OC_PUSH_ELISON:
{
*stack_top_p++ = ecma_make_simple_value (ECMA_SIMPLE_VALUE_ARRAY_HOLE);
*stack_top_p++ = ECMA_VALUE_ARRAY_HOLE;
continue;
}
case VM_OC_APPEND_ARRAY:
@ -1124,7 +1124,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
case VM_OC_PUSH_UNDEFINED_BASE:
{
stack_top_p[0] = stack_top_p[-1];
stack_top_p[-1] = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
stack_top_p[-1] = ECMA_VALUE_UNDEFINED;
stack_top_p++;
continue;
}
@ -1138,7 +1138,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (literal_index < register_end)
{
*stack_top_p++ = ecma_make_simple_value (ECMA_SIMPLE_VALUE_REGISTER_REF);
*stack_top_p++ = ECMA_VALUE_REGISTER_REF;
*stack_top_p++ = literal_index;
*stack_top_p++ = ecma_fast_copy_value (frame_ctx_p->registers_p[literal_index]);
}
@ -1205,8 +1205,8 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
if (opcode >= CBC_PUSH_PROP_REFERENCE && opcode < CBC_PRE_INCR)
{
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
right_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
right_value = ECMA_VALUE_UNDEFINED;
}
goto error;
}
@ -1215,15 +1215,15 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
if (opcode >= CBC_PUSH_PROP_REFERENCE)
{
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
right_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
right_value = ECMA_VALUE_UNDEFINED;
}
break;
}
stack_top_p += 2;
left_value = result;
right_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
right_value = ECMA_VALUE_UNDEFINED;
/* FALLTHRU */
}
case VM_OC_PRE_INCR:
@ -1238,7 +1238,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (ecma_is_value_integer_number (left_value))
{
result = left_value;
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
ecma_integer_value_t int_value = (ecma_integer_value_t) result;
ecma_integer_value_t int_increase = 0;
@ -1299,7 +1299,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
else if (ecma_is_value_float_number (left_value))
{
result = left_value;
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
}
else
{
@ -1368,14 +1368,14 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
case VM_OC_ASSIGN:
{
result = left_value;
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
break;
}
case VM_OC_ASSIGN_PROP:
{
result = stack_top_p[-1];
stack_top_p[-1] = left_value;
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
break;
}
case VM_OC_ASSIGN_PROP_THIS:
@ -1383,7 +1383,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
result = stack_top_p[-1];
stack_top_p[-1] = ecma_copy_value (frame_ctx_p->this_binding);
*stack_top_p++ = left_value;
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
break;
}
case VM_OC_RET:
@ -1395,18 +1395,18 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (opcode == CBC_RETURN_WITH_BLOCK)
{
left_value = block_result;
block_result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
block_result = ECMA_VALUE_UNDEFINED;
}
result = left_value;
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
goto error;
}
case VM_OC_THROW:
{
JERRY_CONTEXT (error_value) = left_value;
result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_ERROR);
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
result = ECMA_VALUE_ERROR;
left_value = ECMA_VALUE_UNDEFINED;
goto error;
}
case VM_OC_THROW_REFERENCE_ERROR:
@ -1428,7 +1428,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
frame_ctx_p->byte_code_p = byte_code_start_p;
frame_ctx_p->stack_top_p = stack_top_p;
frame_ctx_p->call_block_result = block_result;
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
if (opcode < CBC_CALL0)
@ -1469,7 +1469,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
frame_ctx_p->byte_code_p = byte_code_start_p;
frame_ctx_p->stack_top_p = stack_top_p;
frame_ctx_p->call_block_result = block_result;
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
return ECMA_VALUE_UNDEFINED;
}
if (opcode < CBC_NEW0)
@ -1512,7 +1512,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (literal_index < register_end)
{
*stack_top_p++ = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
*stack_top_p++ = ECMA_VALUE_FALSE;
continue;
}
@ -1627,7 +1627,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
case VM_OC_VOID:
{
*stack_top_p++ = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
*stack_top_p++ = ECMA_VALUE_UNDEFINED;
goto free_left_value;
}
case VM_OC_TYPEOF_IDENT:
@ -1652,7 +1652,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
if (ref_base_lex_env_p == NULL)
{
result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
result = ECMA_VALUE_UNDEFINED;
}
else
{
@ -1700,7 +1700,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
ecma_get_number_from_value (right_value));
result = ecma_update_float_number (left_value, new_value);
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
break;
}
@ -1711,7 +1711,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
ecma_get_float_from_value (right_value));
result = ecma_update_float_number (right_value, new_value);
right_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
right_value = ECMA_VALUE_UNDEFINED;
break;
}
@ -1747,7 +1747,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
ecma_get_number_from_value (right_value));
result = ecma_update_float_number (left_value, new_value);
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
break;
}
@ -1758,7 +1758,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
ecma_get_float_from_value (right_value));
result = ecma_update_float_number (right_value, new_value);
right_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
right_value = ECMA_VALUE_UNDEFINED;
break;
}
@ -1810,7 +1810,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
ecma_get_number_from_value (right_value));
result = ecma_update_float_number (left_value, new_value);
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
break;
}
@ -1821,7 +1821,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
ecma_get_float_from_value (right_value));
result = ecma_update_float_number (right_value, new_value);
right_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
right_value = ECMA_VALUE_UNDEFINED;
break;
}
@ -2274,7 +2274,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
JERRY_ASSERT (frame_ctx_p->registers_p + register_end + frame_ctx_p->context_depth == stack_top_p);
ecma_value_t expr_obj_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
ecma_value_t expr_obj_value = ECMA_VALUE_UNDEFINED;
ecma_collection_header_t *header_p = opfunc_for_in (value, &expr_obj_value);
ecma_free_value (value);
@ -2424,7 +2424,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
VM_MINUS_EQUAL_U16 (frame_ctx_p->context_depth,
PARSER_TRY_CONTEXT_STACK_ALLOCATION);
stack_top_p -= PARSER_TRY_CONTEXT_STACK_ALLOCATION;
result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_ERROR);
result = ECMA_VALUE_ERROR;
goto error;
}
case VM_CONTEXT_FINALLY_RETURN:
@ -2586,7 +2586,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
ecma_value_t property = *(--stack_top_p);
ecma_value_t object = *(--stack_top_p);
if (object == ecma_make_simple_value (ECMA_SIMPLE_VALUE_REGISTER_REF))
if (object == ECMA_VALUE_REGISTER_REF)
{
ecma_fast_free_value (frame_ctx_p->registers_p[property]);
@ -2648,7 +2648,7 @@ error:
vm_stack_p < stack_top_p;
vm_stack_p++)
{
if (*vm_stack_p == ecma_make_simple_value (ECMA_SIMPLE_VALUE_REGISTER_REF))
if (*vm_stack_p == ECMA_VALUE_REGISTER_REF)
{
JERRY_ASSERT (vm_stack_p < stack_top_p);
vm_stack_p++;
@ -2759,8 +2759,8 @@ error:
{
JERRY_CONTEXT (vm_exec_stop_counter) = 1;
left_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
right_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
left_value = ECMA_VALUE_UNDEFINED;
right_value = ECMA_VALUE_UNDEFINED;
if (!ecma_is_value_error_reference (result))
{
@ -2770,7 +2770,7 @@ error:
{
JERRY_CONTEXT (error_value) = ecma_clear_error_reference (result);
}
result = ecma_make_simple_value (ECMA_SIMPLE_VALUE_ERROR);
result = ECMA_VALUE_ERROR;
goto error;
}
}
@ -2838,7 +2838,7 @@ vm_execute (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
for (uint32_t i = arg_list_len; i < register_end; i++)
{
*stack_p++ = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
*stack_p++ = ECMA_VALUE_UNDEFINED;
}
}