about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/bytecode/mod.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-02-27 r/2238 chore(tazjin/rlox): Set up some scaffolding for panic modeVincent Ambo1-1/+4
This lets us suppress reporting of additional errors from the compiler until a synchronisation point is reached. Change-Id: Iacf90949f868fbdb4349750065b5e458cf74d32a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2557 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-02-27 r/2237 feat(tazjin/rlox): Bootstrap rough shape of bytecode compilerVincent Ambo1-1/+2
This one necessarily has to diverge more from the book than the treewalk interpreter did, so some of this is expected to change, but I'm happy with the rough shape. Since we're reusing the old scanner, the compiler/parser struct owns an iterator over all tokens with which the pull-scanner from the bytecode chapters is simulated. Change-Id: Icfa0bd4729d9df786e08f7e49a25cba1b9989a91 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2556 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-02-27 r/2234 chore(tazjin/rlox): Implement From<ScannerError> for bytecode errorsVincent Ambo1-1/+1
Change-Id: I446c6e38cf239a132882d37df156884d319ca111 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2553 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-01-18 r/2129 refactor(tazjin/rlox): Add Interpreter trait for switching implsVincent Ambo1-12/+22
Change-Id: Iae28d64ce879014c5e5d7e145c536c1f16ad307d Reviewed-on: https://cl.tvl.fyi/c/depot/+/2418 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-17 r/2128 feat(tazjin/rlox): Implement simple arithmetic operatorsVincent Ambo1-1/+6
Change-Id: I9873bcd281053f4e9820a5119f5992a0b8cb8cfc Reviewed-on: https://cl.tvl.fyi/c/depot/+/2417 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-01-17 r/2127 feat(tazjin/rlox): Bootstrap VM for Lox bytecodeVincent Ambo1-1/+3
Change-Id: I479e20bf2087e5c4aa20e31b364c57ed0d961bcf Reviewed-on: https://cl.tvl.fyi/c/depot/+/2416 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-01-17 r/2125 feat(tazjin/rlox): Track source lines along with bytecodeVincent Ambo1-2/+2
Change-Id: I272e73b9b1c9571fbfe4fa983fb4283ddee02bd4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2414 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-17 r/2124 feat(tazjin/rlox): Initial bytecode representationVincent Ambo1-1/+14
This is significantly simplified from the version in the book, since I'm using Rust's Vec and not implementing dynamic arrays manually. We'll see if I run into issues with that ... Change-Id: Ie3446ac3884b850f3ba73a4b1a6ca14e68054188 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2413 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-01-17 r/2123 refactor(tazjin/rlox): Move entrypoints into interpretersVincent Ambo1-0/+7
Right now this introduces a simple mechanism to flip between the interpreters. Change-Id: I92ee920c53d76ab6b664ac671993a6d6426af61a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2412 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI