Fix lists
This commit is contained in:
parent
c1eccf049f
commit
85241c04b9
@ -101,9 +101,11 @@ impl Vm {
|
|||||||
}
|
}
|
||||||
Operation::LoadList => {
|
Operation::LoadList => {
|
||||||
let to_register = instruction.destination();
|
let to_register = instruction.destination();
|
||||||
let length = instruction.first_argument();
|
let first_register = instruction.first_argument();
|
||||||
let first_register = to_register - length - 1;
|
let length = instruction.second_argument();
|
||||||
let last_register = to_register - 1;
|
let last_register = first_register + length + 1;
|
||||||
|
|
||||||
|
println!("{first_register}..={last_register}");
|
||||||
|
|
||||||
let mut list = Vec::with_capacity(length as usize);
|
let mut list = Vec::with_capacity(length as usize);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user