Remove ecma_simple_value_t and refactor ecma_make_simple_value (#2135)
This patch removes all ecma_make_simple_value calls to make the code more easy to understand. Also removes the type ecma_simple_value_t which improves the performance in related code paths by calculating the value of new ecma_value_t is no longer needed. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
Dániel Bátyai
parent
1007b63024
commit
e83de3accd
@@ -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)) \
|
||||
{ \
|
||||
|
||||
Reference in New Issue
Block a user