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:
Zoltan Herczeg
2020-08-11 11:25:01 +02:00
committed by GitHub
parent 286e515f9f
commit f761427a3e
13 changed files with 409 additions and 138 deletions
+1 -5
View File
@@ -1271,11 +1271,7 @@ ecma_deref_bigint (ecma_extended_primitive_t *bigint_p) /**< bigint value */
uint32_t size = ECMA_BIGINT_GET_SIZE (bigint_p);
if (size == 0)
{
jmem_pools_free (bigint_p, sizeof (ecma_extended_primitive_t));
return;
}
JERRY_ASSERT (size > 0);
size_t mem_size = ECMA_BIGINT_GET_BYTE_SIZE (size) + sizeof (ecma_extended_primitive_t);
jmem_heap_free_block (bigint_p, mem_size);