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

TLA #28

Merged
merged 11 commits into from
Apr 19, 2024
Merged

TLA #28

merged 11 commits into from
Apr 19, 2024

Conversation

guybedford
Copy link
Contributor

@guybedford guybedford commented Apr 15, 2024

Adds initial support for TLA with some basic tests, resolving #14.

There is still work to do on improving errors and unhandled rejections.

Also expands the test suite to better support error output testing to enable these follow-ups.

Note, this requires #25 to land first for CI to pass.

.gitignore Outdated Show resolved Hide resolved
tests/cases/syntax-err/syntax-err.js Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
runtime/engine.cpp Outdated Show resolved Hide resolved
runtime/engine.cpp Outdated Show resolved Hide resolved
@tschneidereit
Copy link
Member

Oops, hit the button without leaving a comment. This looks really great, thank you!

I requested a few changes, but I think they should all be fairly minor.

Copy link
Member

@tschneidereit tschneidereit left a comment

Choose a reason for hiding this comment

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

Very nice, thank you!

.gitignore Show resolved Hide resolved
runtime/js.cpp Outdated
@@ -42,16 +42,16 @@ bool initialize(const char *filename) {

RootedValue result(engine.cx());
bool success = engine.eval_toplevel(filename, &result);
success = success && engine.run_event_loop(&result);
success = success && engine.run_event_loop();
Copy link
Member

Choose a reason for hiding this comment

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

This turns out to be redundant, because eval_toplevel always spins the event loop (with or without this PR), so let's just remove it.

Suggested change
success = success && engine.run_event_loop();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, nice to clean this up. Done.

@guybedford guybedford merged commit 60c2468 into bytecodealliance:main Apr 19, 2024
1 check passed
@guybedford guybedford deleted the tla branch April 19, 2024 17:38
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.

2 participants