Optimize conditional jumps.
The ecma_op_to_boolean return value is changed to bool for faster evaluation, and no need to swap operandos of relational compare. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -80,9 +80,8 @@ ecma_value_t
|
||||
opfunc_logical_not (ecma_value_t left_value) /**< left value */
|
||||
{
|
||||
ecma_value_t ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
|
||||
ecma_value_t to_bool_value = ecma_op_to_boolean (left_value);
|
||||
|
||||
if (ecma_is_value_true (to_bool_value))
|
||||
if (ecma_op_to_boolean (left_value))
|
||||
{
|
||||
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user