-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[parser] don't explode on numbers > 2^32-1
Summary: js_of_ocaml's ints are 32-bit, and `int_of_string` throws when you give it a bigger number. floats are IEEE 754 double precision in both js_of_ocaml and ocaml, so they're fine. when parsing octal and binary numbers, we were using `int_of_string` because it supports `0o` and `0b` prefixes while `float_of_string` doesn't (but `float_of_string` does support `0x`, so large hex numbers were not affected). instead, if we use the `Int64` versions, it also works in js_of_ocaml. Fixes #3238 Reviewed By: gabelevi Differential Revision: D4448945 fbshipit-source-id: 26e5c956442819e03e199139582f9020d225072a
- Loading branch information
1 parent
bad78b1
commit 6ed6132
Showing
3 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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 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