Skip to content
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

Remove cranelift-codegen-shared #6773

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bjorn3
Copy link
Contributor

@bjorn3 bjorn3 commented Jul 25, 2023

Based on #6772

@bjorn3 bjorn3 requested review from a team as code owners July 25, 2023 19:55
@bjorn3 bjorn3 requested review from abrown and removed request for a team July 25, 2023 19:55
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:meta Everything related to the meta-language. labels Jul 25, 2023
@elliottt elliottt requested a review from jameysharp July 25, 2023 21:24
Copy link
Contributor

@jameysharp jameysharp left a comment

Choose a reason for hiding this comment

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

I discussed this today with @cfallin and @fitzgen and we're in favor of these changes. Reducing the time it takes to build Cranelift is super helpful. I was a little uncomfortable with adding more strings we have to emit from codegen-meta but the change is well-motivated and you've done a great job making the result as easy to maintain as possible. Thanks!

I think one further change is necessary before we can merge this: don't we need to remove cranelift-codegen-shared from both lists in scripts/publish.rs? I think the verify-publish CI job would have caught this but it was skipped.

Thanks also to @elliottt for reminding me that I hadn't responded to this PR yet.

Comment on lines +54 to +73
fmtln!(
fmt,
"pub const LANE_BASE: u16 = {:#X};\n",
constants::LANE_BASE
);
fmtln!(
fmt,
"pub const REFERENCE_BASE: u16 = {:#X};\n",
constants::REFERENCE_BASE
);
fmtln!(
fmt,
"pub const VECTOR_BASE: u16 = {:#X};\n",
constants::VECTOR_BASE
);
fmtln!(
fmt,
"pub const DYNAMIC_VECTOR_BASE: u16 = {:#X};\n",
constants::DYNAMIC_VECTOR_BASE
);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't feel strongly about this, but I'd be tempted to use a macro here to ensure that the name of the constant is always the same in the generated source as it is in the meta crate. Something like constants!(fmt, LANE_BASE, REFERENCE_BASE, ...) I guess.

I'm happy to merge this as-is, but I thought I'd mention it since I think publish.rs needs to be fixed anyway. Let me know whether you want to change this too.

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 Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants