Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Add wasm reference/pointers translation. #1073

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

yurydelendik
Copy link
Collaborator

cranelift-wasm is missing conversion of wasm reftypes to cranelift IR. The PR adds capability to translate ref params and locals to IR.

Example: https://gist.github.com/yurydelendik/47b51002f998bccbcad86ace5b62d3d4

/cc @fitzgen

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

cranelift-wasm/src/environ/spec.rs Outdated Show resolved Hide resolved
cranelift-wasm/src/environ/spec.rs Outdated Show resolved Hide resolved
@bnjbvr
Copy link
Member

bnjbvr commented Sep 25, 2019

Thanks for working on this. Just to make sure to understand how this moves the needle: this only translates from wasm to clif (obviously), but since enable_safepoints is still a thing, embedders need to explicitly enable it, which means implementing more on their side. Is that right? (I am just checking that this won't break e.g. all of Spidermonkey testing.0)

@yurydelendik
Copy link
Collaborator Author

since enable_safepoints is still a thing, embedders need to explicitly enable it, which means implementing more on their side

Correct, this patch mostly prepares cranelift API surface to add wasmtime anyref tests and, for me, to continue wasmtime-api work. You need to specify --set enable_safepoints=true in the clif-util.

@bnjbvr
Copy link
Member

bnjbvr commented Dec 2, 2019

Hey @yurydelendik, no pressure here, just wanted to check in what the status of this PR is, and if there's a way we can help?`

@yurydelendik
Copy link
Collaborator Author

just wanted to check in what the status of this PR is, and if there's a way we can help?

I'm seeking the initial feedback, and if I'm close to the "target" I'll rebase that in timely manner. Either way #1176 is the related issue and might influence this PR.

Copy link
Member

@sunfishcode sunfishcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slow review here, but this looks good to me, modulo a rebase at this point.

@yurydelendik yurydelendik merged commit c4762e5 into bytecodealliance:master Dec 6, 2019
@yurydelendik yurydelendik deleted the refsupport branch December 6, 2019 23:46
abrown added a commit to abrown/wasmtime that referenced this pull request Dec 13, 2019
Cranelift changes to FuncEnvironment, TargetEnvironment, and GlobalInit (see bytecodealliance/cranelift#1073) require these changes to compile wasmtime.
abrown added a commit to abrown/wasmtime that referenced this pull request Dec 13, 2019
Cranelift changes to FuncEnvironment, TargetEnvironment, and GlobalInit (see bytecodealliance/cranelift#1073) require these changes to compile wasmtime.
abrown added a commit to abrown/wasmtime that referenced this pull request Dec 18, 2019
Cranelift changes to FuncEnvironment, TargetEnvironment, and GlobalInit (see bytecodealliance/cranelift#1073) require these changes to compile wasmtime.
abrown added a commit to abrown/wasmtime that referenced this pull request Dec 22, 2019
Cranelift changes to FuncEnvironment, TargetEnvironment, and GlobalInit (see bytecodealliance/cranelift#1073) require these changes to compile wasmtime.
abrown added a commit to abrown/wasmtime that referenced this pull request Dec 22, 2019
Cranelift changes to FuncEnvironment, TargetEnvironment, and GlobalInit (see bytecodealliance/cranelift#1073) require these changes to compile wasmtime.
yurydelendik pushed a commit to abrown/wasmtime that referenced this pull request Dec 31, 2019
Cranelift changes to FuncEnvironment, TargetEnvironment, and GlobalInit (see bytecodealliance/cranelift#1073) require these changes to compile wasmtime.
yurydelendik pushed a commit to bytecodealliance/wasmtime that referenced this pull request Dec 31, 2019
* Add unimplemented stubs for Cranelift interfaces

Cranelift changes to FuncEnvironment, TargetEnvironment, and GlobalInit (see bytecodealliance/cranelift#1073) require these changes to compile wasmtime.

* Upgrade Cranelift to 0.52.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants