Implement exponentiation operation. (#3692)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-04-27 11:43:35 +02:00
committed by GitHub
parent daeee77d63
commit 4e8dac8ce1
18 changed files with 319 additions and 32 deletions
+16
View File
@@ -2815,6 +2815,22 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
*stack_top_p++ = result;
goto free_both_values;
}
#if ENABLED (JERRY_ES2015)
case VM_OC_EXP:
{
result = do_number_arithmetic (NUMBER_ARITHMETIC_EXPONENTIATION,
left_value,
right_value);
if (ECMA_IS_VALUE_ERROR (result))
{
goto error;
}
*stack_top_p++ = result;
goto free_both_values;
}
#endif /* ENABLED (JERRY_ES2015) */
case VM_OC_EQUAL:
{
result = opfunc_equality (left_value, right_value);