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:
Zoltan Herczeg
2016-05-30 05:56:22 -07:00
parent 08c312bc55
commit f24be95f89
12 changed files with 149 additions and 193 deletions
@@ -66,7 +66,8 @@ ecma_builtin_boolean_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
arg_value = arguments_list_p[0];
}
return ecma_op_to_boolean (arg_value);
return ecma_make_simple_value (ecma_op_to_boolean (arg_value) ? ECMA_SIMPLE_VALUE_TRUE
: ECMA_SIMPLE_VALUE_FALSE);
} /* ecma_builtin_boolean_dispatch_call */
/**