summaryrefslogtreecommitdiff
path: root/src/bytecode_util.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-08-23 18:46:15 +0100
committerAlasdair Armstrong2018-08-23 18:53:16 +0100
commitb4e66ec5a79f7602567a29de5581b88e6053b758 (patch)
tree68280e1e29add0945fe7cf52a9c5a37a71b8ff89 /src/bytecode_util.ml
parente6b4776f43e99ce121d167fa42b80dfe090cf752 (diff)
Fix interpreter after re-writer change
Interpreter used a re-write (vector concat removal) that is dependent on the vector_string_to_bit_list rewriting pass. This fixes the interpreter to work without either vector concat removal, or turning bitstrings into vector literals like [bitzero, bitzero, bitone]. This has the upside of reducing the number of steps the interpreter needs for working with bitvectors so should improve interpreter performance. We also now test all the C compilation tests behave the same using the interpreter. Currently the real number tests fail due to limitations of Lem's rational library (this must be fixed in Lem). This required supporting configuration registers in the interpreter. As such the interpreter was refactored to more cleanly process registers when building an initial global state. The functions are also collected into the global state, which removes the need to search for them in the AST every time a function call happens. This should not only improve performance, but also removes the need to pass an AST into the interpretation functions.
Diffstat (limited to 'src/bytecode_util.ml')
0 files changed, 0 insertions, 0 deletions