-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ext/gmp: Improve parsing of parameters #16685
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
10f5161
ext/gmp: Split out non-existent inverse modulo cases
Girgias 5b5af60
ext/gmp: Use Fast ZPP for GMP functions
Girgias 4181a1e
Inline gmp_unary_opl() as it was only used once
Girgias 282142f
ext/gmp: Create custom Fast ZPP specifier to parse into mpz_ptr
Girgias 5441972
ext/gmp: Use new custom ZPP specifier
Girgias 76033e1
ext/gmp: Refactor generation of unary GMP functions
Girgias 602dd27
ext/gmp: Refactor generation of some binary GMP functions
Girgias de20a29
ext/gmp: Use new specifier for gmp_cmp()
Girgias 4278aee
ext/gmp: Refactor gmp_random_range() to use new ZPP specifier
Girgias 69c835a
ext/gmp: Refactor gmp_div_qr() to use new ZPP specifier
Girgias 440e9fd
ext/gmp: Refactor gmp_div_(q|r)() to use new ZPP specifier
Girgias fd21bb4
ext/gmp: Refactor gmp_divexact() and gmp_mod() to use custom ZPP spec…
Girgias da912d2
ext/gmp: Remove now unused FETCH_GMP_ZVAL_DEP_DEP macro
Girgias 18a16db
ext/gmp: Refactor gmp_fact() to use new ZPP specifier
Girgias 84c4114
ext/gmp: Start refactoring operator overloading to use new parsing me…
Girgias 80407a8
ext/gmp: Convert GMP operator overloading to new parsing mechanism
Girgias fc66ec2
ext/gmp: Add weak mode support for parsing
Girgias 29a167c
ext/gmp: Use new parsing API in shift helper
Girgias f15f78e
ext/gmp: Use new parsing mechanism in comparison operator overloading
Girgias 837c04d
ext/gmp: Refactor gmp_cmp() test
Girgias ff1eed3
Normalize gmp_cmp() to -1/0/+1
Girgias 1b89878
ext/gmp: Remove redundant parenthesis
Girgias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to cause a test failure on some CI jobs, so something more is going on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation of GMP says:
So probably we shouldn't be using the output of the values directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, reading source codes, seems mpir and gmp differ with mpz_gmp. The former can return the values -1, >= 0, GMP it is only -1, 0, 1 (if this is what you meant by "normalization" in your gmp_cmp commit).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find! I guess PHP should normalize such that the two libs have the same behaviour