Skip to content

Remove CONFIG_BIGNUM, always enable BigInt #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bnoordhuis opened this issue Nov 5, 2023 · 5 comments · Fixed by #34
Closed

Remove CONFIG_BIGNUM, always enable BigInt #17

bnoordhuis opened this issue Nov 5, 2023 · 5 comments · Fixed by #34
Labels
enhancement New feature or request

Comments

@bnoordhuis
Copy link
Contributor

BigInt is part of the spec and IMO should always be enabled.

I personally don't care much for BigFloat1 or BigDecimal2 and prefer removing them unless there are really compelling reasons to keep them around.

1 non-standard
2 based on a dead stage 1 proposal: https://github.com/tc39/proposal-decimal

@bnoordhuis bnoordhuis added the enhancement New feature or request label Nov 5, 2023
@saghul
Copy link
Contributor

saghul commented Nov 5, 2023

I once built a small project which didn't need it (njk here in GH) just to brag about the size of the resulting executable :-P

I'd say yeah let's enable it always and remove some ifdef dance. I also have never used the extensions either.

@bnoordhuis
Copy link
Contributor Author

For completeness sake: quickjs implements bignum math in terms of https://github.com/tc39/proposal-operator-overloading but that's another abandoned proposal that I would like to remove. Standard features only.

(I'm willing to make an exception for Error.prepareStackTrace. That's implemented by at least one other engine.)

I'm going to tackle this in steps because it's quite a big change, likely > 10k lines deleted. The end goal is to keep only BigInt and remove libbf. That should also get the executable size down again. :-)

@saghul
Copy link
Contributor

saghul commented Nov 6, 2023

Sounds like a plan!

bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Nov 8, 2023
bnoordhuis added a commit that referenced this issue Nov 8, 2023
bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Nov 8, 2023
bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Nov 8, 2023
bnoordhuis added a commit that referenced this issue Nov 8, 2023
@saghul
Copy link
Contributor

saghul commented Nov 8, 2023

Awesome progress! All that's missing now is to remove operator overloading and then the the whole ifdef-ing, right?

@bnoordhuis
Copy link
Contributor Author

Yep, that's right. I hope to get around to that either tonight or tomorrow.

bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Nov 9, 2023
bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Nov 10, 2023
bnoordhuis added a commit that referenced this issue Nov 10, 2023
bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Nov 10, 2023
bnoordhuis added a commit that referenced this issue Nov 10, 2023
bluesky950520 pushed a commit to bluesky950520/quickjs that referenced this issue Mar 14, 2025
bluesky950520 pushed a commit to bluesky950520/quickjs that referenced this issue Mar 14, 2025
bluesky950520 pushed a commit to bluesky950520/quickjs that referenced this issue Mar 14, 2025
bluesky950520 pushed a commit to bluesky950520/quickjs that referenced this issue Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants