Implement BigInt asIntN and asUintN methods (#5165)

The following methods were implemented:
- BigInt.asIntN
- BigInt.asUintN

Custom dispatcher also added to builtin_bigint.

The implementation is based on PR #4736, only applied the requested changes.

Co-authored-by: Daniel Batiz batizjob@gmail.com
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
This commit is contained in:
Gergo Csizi
2024-11-22 09:33:08 +01:00
committed by GitHub
parent a7e24fe89a
commit 00d12c0265
8 changed files with 557 additions and 26 deletions
+2
View File
@@ -144,6 +144,8 @@ LIT_MAGIC_STRING_THROW = "throw"
LIT_MAGIC_STRING_TRUNC = "trunc"
LIT_MAGIC_STRING_VALUE = "value"
LIT_MAGIC_STRING_SOURCE_NAME_EVAL = "<eval>"
LIT_MAGIC_STRING_AS_INT_N = "asIntN"
LIT_MAGIC_STRING_AS_U_INT_N = "asUintN"
LIT_MAGIC_STRING_BIGINT_UL = "BigInt"
LIT_MAGIC_STRING_ERRORS_UL = "errors"
LIT_MAGIC_STRING_HAS_OWN_UL = "hasOwn"