diff options
| author | Alasdair Armstrong | 2018-09-28 17:19:13 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-09-28 17:21:27 +0100 |
| commit | 88b25e94c9266a481af6704423c321fb18f2ac31 (patch) | |
| tree | 4ffdd6c95bfe6ab972322678b73cd42127af5fdd /src/reporting_basic.ml | |
| parent | 645a5d90df9fc8f89ab9d6868c1a51f7429a890d (diff) | |
Fix optimisation bug for certain if statements
When converting to A-normal form I just used the type of the then
branch of if statements to get the type of the whole if statement -
usually they'd be the same, but with flow typing one of the branches
can have a false constraint, which then allows the optimizer to fit
any integer into a 64-bit integer causing an overflow. The fix is to
correctly use the type the typechecker gives for the whole if
statement.
Also add decimal_string_of_bits to the C output.
Rename is_reftyp to is_ref_typ to be more consistent with other
is_X_typ functions in Ast_util.
Diffstat (limited to 'src/reporting_basic.ml')
0 files changed, 0 insertions, 0 deletions
