about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/bytecode/mod.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-02-27T23·13+0200
committertazjin <mail@tazj.in>2021-02-28T11·14+0000
commit995d024f03d99726de5b22bdf5aaa04a88e00b4a (patch)
tree036adadc3ca8787e7b85c74a88e4eb7d8ea8b882 /users/tazjin/rlox/src/bytecode/mod.rs
parent0c9a7de5be0ac54f068a5f4db7eb400b3bd63282 (diff)
feat(tazjin/rlox): Wire up bytecode interpreter & print results r/2247
This makes the bytecode interpreter actually usable.

Change-Id: I24afc7ce461c6673dc42581378f6e14da7aece5c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2566
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/rlox/src/bytecode/mod.rs')
-rw-r--r--users/tazjin/rlox/src/bytecode/mod.rs11
1 files changed, 0 insertions, 11 deletions
diff --git a/users/tazjin/rlox/src/bytecode/mod.rs b/users/tazjin/rlox/src/bytecode/mod.rs
index 97316e66aa05..0776225bec91 100644
--- a/users/tazjin/rlox/src/bytecode/mod.rs
+++ b/users/tazjin/rlox/src/bytecode/mod.rs
@@ -28,14 +28,3 @@ impl crate::Lox for Interpreter {
         vm::interpret(chunk).map_err(|e| vec![e])
     }
 }
-
-// pub fn main() {
-//     let mut chunk: Chunk = Default::default();
-//     let constant = chunk.add_constant(1.2);
-//     chunk.add_op(OpCode::OpConstant(constant), 1);
-//     let constant = chunk.add_constant(2.0);
-//     chunk.add_op(OpCode::OpConstant(constant), 2);
-//     chunk.add_op(OpCode::OpAdd, 3);
-//     chunk.add_op(OpCode::OpReturn, 4);
-//     vm::interpret(chunk).expect("it should work");
-// }