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-01-17T18·05+0300
committertazjin <mail@tazj.in>2021-01-17T21·17+0000
commitc26915d0120e8577cd684eb9c4f2694e1727cb4a (patch)
tree4c1dc612c126e06a2cfca9cb4f22345fe3315a51 /users/tazjin/rlox/src/bytecode/mod.rs
parent49c4cc6c56048dbf35dbe5d87837d47b80d90f82 (diff)
feat(tazjin/rlox): Track source lines along with bytecode r/2125
Change-Id: I272e73b9b1c9571fbfe4fa983fb4283ddee02bd4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2414
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.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/tazjin/rlox/src/bytecode/mod.rs b/users/tazjin/rlox/src/bytecode/mod.rs
index a58f610417fd..922b3bef4484 100644
--- a/users/tazjin/rlox/src/bytecode/mod.rs
+++ b/users/tazjin/rlox/src/bytecode/mod.rs
@@ -13,8 +13,8 @@ pub fn main() {
     let mut chunk: Chunk = Default::default();
 
     let constant = chunk.add_constant(1.2);
-    chunk.add_op(OpCode::OpConstant(constant));
-    chunk.add_op(OpCode::OpReturn);
+    chunk.add_op(OpCode::OpConstant(constant), 1);
+    chunk.add_op(OpCode::OpReturn, 1);
 
     chunk::disassemble(&chunk, "test chunk");
 }