Implement relational operators for BigInts (#4087)

Improve BigInt constructor as well

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-08-03 13:46:34 +02:00
committed by GitHub
parent f1eba9f826
commit cfd69d3b70
12 changed files with 941 additions and 112 deletions
+15 -2
View File
@@ -196,14 +196,26 @@ typedef enum
/**
* JERRY_ASSERT compatible macro for checking whether the given ecma-value is symbol
*/
#define ECMA_ASSERT_VALUE_IS_SYMBOL(value) (ecma_is_value_symbol ((value)))
#define ECMA_CHECK_SYMBOL_IN_ASSERT(value) (ecma_is_value_symbol ((value)))
#else /* !ENABLED (JERRY_ESNEXT) */
/**
* JERRY_ASSERT compatible macro for checking whether the given ecma-value is symbol
*/
#define ECMA_ASSERT_VALUE_IS_SYMBOL(value) (false)
#define ECMA_CHECK_SYMBOL_IN_ASSERT(value) (false)
#endif /* ENABLED (JERRY_ESNEXT) */
#if ENABLED (JERRY_BUILTIN_BIGINT)
/**
* JERRY_ASSERT compatible macro for checking whether the given ecma-value is bigint
*/
#define ECMA_CHECK_BIGINT_IN_ASSERT(value) ecma_is_value_bigint(value)
#else /* !ENABLED (JERRY_BUILTIN_BIGINT) */
/**
* JERRY_ASSERT compatible macro for checking whether the given ecma-value is bigint
*/
#define ECMA_CHECK_BIGINT_IN_ASSERT(value) false
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
/**
* Check whether the given type is ECMA_OBJECT_TYPE_PROXY
*
@@ -414,6 +426,7 @@ ecma_string_t *ecma_stringbuilder_finalize (ecma_stringbuilder_t *builder_p);
void ecma_stringbuilder_destroy (ecma_stringbuilder_t *builder_p);
/* ecma-helpers-number.c */
void ecma_number_unpack (ecma_number_t num, bool *sign_p, uint32_t *biased_exp_p, uint64_t *fraction_p);
ecma_number_t ecma_number_make_nan (void);
ecma_number_t ecma_number_make_infinity (bool sign);
bool ecma_number_is_nan (ecma_number_t num);