-
Notifications
You must be signed in to change notification settings - Fork 50
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
[interpreter] Fix registry to be per-thread #219
base: upstream-rebuild
Are you sure you want to change the base?
Conversation
None of the tests are really able to use |
I think it was adopted by relaxed SIMD tests, so I don't want to lose its correct integration with the threading implementation. |
@@ -606,8 +628,8 @@ let of_command mods cmd = | |||
of_assertion' mods act "run" [] None ^ "\n" | |||
| Assertion ass -> | |||
of_assertion mods ass ^ "\n" | |||
| Thread _ -> failwith "JS translation of Thread is NYI" | |||
| Wait _ -> failwith "JS translation of Wait is NYI" | |||
| Thread _ -> "" (* TODO: failwith "JS translation of Thread is NYI" *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to have been slow to iterate on this PR. Is this behaviour preferable to having the failwith
behaviour? My understanding is that this effectively causes garbled JS tests to be silently spat out instead of the translation explicitly failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The practical problem is that as is, this makes the test runner fail, which also breaks CI. The conceptual problem is that the current assumption is that every core test can be converted to JS. If we want to exempt some tests, we'll need additional infrastructure for that. But what would that imply for the role of the test suite?
Is there truly no way to transform the thread construct to JS faithfully?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is - it would have to be a follow-up PR though. I'm just trying to clarify if generating garbled tests would be a preferable behaviour in the meantime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we at least turn the thread and wait constructs into some kind of dynamic "assert false" instead?
EDIT: maybe something like "assert_malformed <obviously malformed module>" with a comment that this is caused by a NYI construct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. The idea of opening an issue for it was to do it separately. Adding a "correct" temporary work-around probably is more work than is worthwhile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(The thread construct is in a completely different category than the arguments of assertions, so we cannot simply wrap it into one.)
Also:
thread.wast
test to check thread scripting featureseither
patterns from main that got lost on upstream-rebuildAlso, I noticed that the JS translation still can't handle the
thread
feature of test scripts. I opened #218.