Skip to content

Generalize "global values" to "templates". #1267

New issue

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

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

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

sunfishcode
Copy link
Member

Rename "global values" to "templates", to better describe their role as
expressions which can be provided by frontends and expanded by the code
generator as needed. And, start to generalize them, by introducing
Call and IfElse templates.

This is a step towards generalizing templates into a form that can be
independent of Cranelift, and allow embedding environments to provide a
single description of their data structures which is independent of any
specific JIT. And, it's a step toward being able to use templates to
describe GC barrier instruction sequences.

This also helps avoid some confusion between Cranelift IR global values,
wasm global variables, global variable data objects, and "global"
variables in regalloc.

This is a continuation of bytecodealliance/cranelift#1299, rebased on trunk.

Rename "global values" to "templates", to better describe their role as
expressions which can be provided by frontends and expanded by the code
generator as needed. And, start to generalize them, by introducing
`Call` and `IfElse` templates.

This is a step towards generalizing templates into a form that can be
independent of Cranelift, and allow embedding environments to provide a
single description of their data structures which is independent of any
specific JIT. And, it's a step toward being able to use templates to
describe GC barrier instruction sequences.

This also helps avoid some confusion between Cranelift IR global values,
wasm global variables, global variable data objects, and "global"
variables in regalloc.
@github-actions github-actions bot added cranelift:docs cranelift Issues related to the Cranelift code generator cranelift:meta Everything related to the meta-language. cranelift:module labels Mar 11, 2020
@github-actions
Copy link

Subscribe to Label Action

This issue or pull request has been labeled: "cranelift", "cranelift:docs", "cranelift:meta", "cranelift:module"

Users Subscribed to "cranelift"

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@bnjbvr
Copy link
Member

bnjbvr commented Mar 17, 2020

Note I had questions left unanswered in bytecodealliance/cranelift#1299 (review) and bytecodealliance/cranelift#1299 (comment), and it would be nice to address them before review.

@bytecodealliance bytecodealliance deleted a comment from github-actions bot Apr 10, 2020
@bytecodealliance bytecodealliance deleted a comment from github-actions bot Apr 10, 2020
@alexcrichton alexcrichton changed the base branch from master to main June 25, 2020 18:46
@sunfishcode
Copy link
Member Author

I still think something along the lines of this PR are an interesting idea to pursue, but the actual code here is fairly out of date for now, so I'll close this PR now.

@sunfishcode
Copy link
Member Author

The code is now here.

@sunfishcode sunfishcode deleted the cranelift-templates branch May 21, 2021 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:meta Everything related to the meta-language. cranelift:module cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants