From 70144e08c73a2b33935e2eee036591042addd2af Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Thu, 5 Sep 2024 11:50:16 -0400 Subject: [PATCH] Change to max 256 thread locals --- vm/src/vm.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vm/src/vm.rs b/vm/src/vm.rs index cba3619..73956ec 100644 --- a/vm/src/vm.rs +++ b/vm/src/vm.rs @@ -217,11 +217,11 @@ pub enum Op */ // Set thread-local variable - // thread_set (val) + // thread_set (val) thread_set, // Get thread-local variable - // thread_get + // thread_get thread_get, // NOTE: may want to wait for this because it's not RISC, @@ -1443,7 +1443,7 @@ impl Thread } Op::thread_set => { - let idx = self.code.read_pc::(&mut pc) as usize; + let idx = self.code.read_pc::(&mut pc) as usize; let val = self.pop(); if idx >= self.locals.len() { @@ -1454,7 +1454,7 @@ impl Thread } Op::thread_get => { - let idx = self.code.read_pc::(&mut pc) as usize; + let idx = self.code.read_pc::(&mut pc) as usize; if idx >= self.locals.len() { self.push(Value::from(0));