Improve BigInt support (#4118)
This patch adds several small features: - Support right shift with negative numbers - Support exponentation operator - BigInts can be enabled in ES5.1 mode - Remove dead code from ecma_deref_bigint - Support longer BigInt literals in the parser - Fix various BigInt comparison issues - Do not discard unary plus for BigInt constants JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -134,11 +134,13 @@ do_number_arithmetic (number_arithmetic_op op, /**< number arithmetic operation
|
||||
ret_value = ecma_bigint_div_mod (left_value, right_value, true);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
case NUMBER_ARITHMETIC_EXPONENTIATION:
|
||||
{
|
||||
ret_value = ecma_raise_common_error (ECMA_ERR_MSG ("Not supported BigInt operation"));
|
||||
ret_value = ecma_bigint_pow (left_value, right_value);
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
}
|
||||
|
||||
ecma_free_value (left_value);
|
||||
|
||||
Reference in New Issue
Block a user