-
-
Notifications
You must be signed in to change notification settings - Fork 672
ParseInt Implementation #8
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
Closed
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
d4c218c
ParseInt Implementation
MaxGraey 52ca2d1
Move constans out of function
MaxGraey 2dc07c6
Drop charCodeAt for char constant and use immediate values
MaxGraey d6b31e5
Fix tests
MaxGraey 115c9d5
Explicit u16 type for constants
MaxGraey 50062f8
Some simplifications
MaxGraey e73009f
Rename index -> pos
MaxGraey 0f61d48
Some type hints
MaxGraey e918e20
Use break from loop instead early return with NaN
MaxGraey 3966f36
break instead NaN other range checking
MaxGraey ed1c0a5
Manage '+' & '-' only signs without digits
MaxGraey 2ef3491
Father optimizations
MaxGraey a7e5786
Fix some issues with partially valid numbers
MaxGraey 2af303b
Additional fixes
MaxGraey 3b83121
Minor fix
MaxGraey 40103c6
Simplification
MaxGraey 8c30dc0
Minor fixes
MaxGraey c5df495
Basic test peparations
MaxGraey a7a3416
Merge branch 'master' into std/implement-parse-int
MaxGraey 95fb2c3
/implement-parse-int: Auto stash before merge of "std/implement-parse…
MaxGraey b2aaa41
Remove @global from parseInt
MaxGraey eaff433
Merge branch 'master' into std/implement-parse-int
MaxGraey d8cb0c3
Fix tests
MaxGraey 3a841a8
Merge branch 'master' into std/implement-parse-int
MaxGraey e4e0880
Merge branch 'master' into std/implement-parse-int
MaxGraey 02d0ba7
Replace var -> let
MaxGraey 56f434a
Revert "Replace var -> let"
MaxGraey ece3ff7
Fix tests
MaxGraey d1f7d96
Merge branch 'master' into std/implement-parse-int
MaxGraey 61da223
Update
MaxGraey eefade5
Merge branch 'master' into std/implement-parse-int
MaxGraey fb455f2
Update test fixture
MaxGraey 142c201
Add tests for parseInt
MaxGraey f4b7706
Minor fixes
MaxGraey b42d894
Merge branch 'master' into std/implement-parse-int
MaxGraey 37b6288
Update tests
MaxGraey 309e232
Update u32 -> i32 in parseInt
MaxGraey 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
Empty file.
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
Oops, something went wrong.
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.
Wouldn't this be sufficiently covered by a
radix: i32 = 10
parameter above?Uh oh!
There was an error while loading. Please reload this page.
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.
These are fully justified changes. You can try in js:
It's clear. But what about specified radix with hex prefix?
So radix with zero or unspecified value mean actually auto radix
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.
I see, makes sense.