While working on a different issue, I skimmed the following lines. The use of LocalGet / LocalSet where we want to handle global variables is almost certainly a bug.
|
let local_get i _ = GetLocal (Int32.of_int i @@ no_region) |
|
let local_set i _ = SetLocal (Int32.of_int i @@ no_region) |
|
let local_tee i _ = TeeLocal (Int32.of_int i @@ no_region) |
|
let global_get x ctx = GetLocal (global_to_spec ctx x) |
|
let global_set x ctx = SetLocal (global_to_spec ctx x) |
I want to add tests and fix the bug.