Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Wasm backend: ensure correct translation of Wasm_ir.global_(get|set) #157

Open
pkel opened this issue May 25, 2021 · 0 comments
Open

Wasm backend: ensure correct translation of Wasm_ir.global_(get|set) #157

pkel opened this issue May 25, 2021 · 0 comments
Assignees

Comments

@pkel
Copy link
Collaborator

pkel commented May 25, 2021

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.

@pkel pkel self-assigned this May 25, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant