diff options
| author | Alasdair Armstrong | 2018-06-04 20:49:49 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-06-04 20:59:50 +0100 |
| commit | a5491d52d32aa1a15b7f904035fe2e45760bf2f3 (patch) | |
| tree | 904ee1bc444bbf003c130493dbe7089428e5093a /src/bytecode_util.ml | |
| parent | 80384aeee9482b481b7c1d23a3155098c5d90d28 (diff) | |
Fix an issue with riscv_platform involving flow typing
- Refactor the flow typing implementation in the type-checker. This
should fix an issue involving riscv_platform. Specifically it should
now work better when an if statement contains multiple conditions
combined with and/or, only some of which imply constraints at the
type level. This change also simplifies the implementation of flow
typing, and removes some obscure features that were hardly used -
specifically, flow typing could modify types, but this was fairly
obscure and doesn't seem to affect any of our specifications. More
testing is needed to ensure that this change hasn't inadvertantly
broken anything, but it does pass all our tests and continue to
typecheck arm, riscv and cheri.
- Also adds a option for generating faster undefined functions for
enum and variant types. Previously I tried to optimise away such
functions in the C backend, because they could be slow and cause
considerable uneccessary allocation, however this was error prone
and it turns out a much simpler solution is to simply make the
functions themselves much faster, at the cost of hard-coding certain
decisions about what undefined means for these types at compile tile
(which is fine for fast emulation). This almost doubles the
performance of the generated C code.
- Add a wrapper for right shift to avoid UB when shifting by 64 or
more places.
Diffstat (limited to 'src/bytecode_util.ml')
0 files changed, 0 insertions, 0 deletions
