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

Parsing and validation of atomic instructions. #466

Merged
merged 22 commits into from
May 24, 2024

Conversation

resulknad
Copy link
Collaborator

Looking for early feedback on general direction, content and style. Thank you.

Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good so far. I didn't review in details though, I'll do so once it's closer to mergeable.

I'm not sure what's the best solution for the tests is. I think the simplest (I think that's what I did in my dev branch when I wrote the interpreter initially), is to add #[ignore] on the tests that fail, like atomic, and just remove the #[ignore] locally to know where you are, and remove it definitely once the full test passes. This way you don't need to modify the tests and can use them directly from the wasm/threads repo. You can always modify them there locally for testing purposes.

crates/cli-tools/src/action.rs Outdated Show resolved Hide resolved
crates/cli-tools/src/action.rs Outdated Show resolved Hide resolved
crates/cli-tools/src/action.rs Outdated Show resolved Hide resolved
crates/interpreter/Cargo.toml Outdated Show resolved Hide resolved
crates/interpreter/src/error.rs Outdated Show resolved Hide resolved
crates/interpreter/src/exec.rs Show resolved Hide resolved
crates/interpreter/src/valid.rs Show resolved Hide resolved
crates/interpreter/src/valid.rs Show resolved Hide resolved
crates/interpreter/src/valid.rs Outdated Show resolved Hide resolved
crates/interpreter/tests/spec.rs Outdated Show resolved Hide resolved
@ia0
Copy link
Member

ia0 commented May 14, 2024

I've merge #467 which let's you write test!("threads", atomic); or actually test!(#[ignore] "threads", atomic); initially.

.gitmodules Outdated Show resolved Hide resolved
Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

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

I didn't review in details because the PR is not up-to-date with the branch (let's merge the submodule PR first). Once done, I'll do a thorough review. But from a quick glance over the PR I'd say the overall approach is sound, so it's just about me checking the spec on one side and the PR on the other.

crates/interpreter/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

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

Thanks! It seems almost there.

crates/cli-tools/src/action.rs Outdated Show resolved Hide resolved
crates/cli-tools/src/action.rs Show resolved Hide resolved
crates/interpreter/src/syntax.rs Show resolved Hide resolved
crates/interpreter/src/syntax.rs Outdated Show resolved Hide resolved
crates/interpreter/src/syntax.rs Outdated Show resolved Hide resolved
crates/interpreter/src/parser.rs Outdated Show resolved Hide resolved
crates/interpreter/src/valid.rs Show resolved Hide resolved
crates/interpreter/src/valid.rs Show resolved Hide resolved
crates/interpreter/src/valid.rs Outdated Show resolved Hide resolved
crates/interpreter/test.sh Outdated Show resolved Hide resolved
Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

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

Thanks!

crates/interpreter/src/parser.rs Outdated Show resolved Hide resolved
crates/interpreter/src/syntax.rs Show resolved Hide resolved
crates/interpreter/src/valid.rs Show resolved Hide resolved
Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good enough to merge. The details can be handled when we'll merge this branch into main.

crates/interpreter/CHANGELOG.md Show resolved Hide resolved
crates/interpreter/src/syntax.rs Show resolved Hide resolved
crates/scheduler/CHANGELOG.md Show resolved Hide resolved
@ia0
Copy link
Member

ia0 commented May 24, 2024

The changelog test is a bit noisy for a dev branch, let me remove it in #479.

@ia0 ia0 merged commit de491a9 into google:dev/wasm-threads May 24, 2024
18 checks passed
@ia0
Copy link
Member

ia0 commented May 24, 2024

I've resolved the comments, but 2 things you could do in main are:

  • Always enable the mutable globals since we always support them.
  • Move the FC parsing to a parse_instr_fc similar to the _fe you just did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants