-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
[Merged by Bors] - Split Node
into Statement
, Expression
and Declaration
#2319
Conversation
Test262 conformance changesVM implementation
Fixed tests (148):
Broken tests (1):
|
Codecov Report
@@ Coverage Diff @@
## main #2319 +/- ##
==========================================
- Coverage 40.68% 40.14% -0.55%
==========================================
Files 241 241
Lines 22811 22966 +155
==========================================
- Hits 9281 9219 -62
- Misses 13530 13747 +217
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Benchmark for e04c7d0Click to view benchmark
|
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.
Impressive work!
I saw some structs and methods missing docs, but I would definitley be fine merging this as-is to prevent needing to rebase it later.
Benchmark for 2e66299Click to view benchmark
|
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.
Impressive work! This is a great addition. I still didn't have the time to look over everything (150 files left :O) But it's looking very good.
I'd like to have your thoughts about boxing all expressions. It makes sense from a space perspective, but might be less efficient. It might make sense to box them at the Node
level only.
7260aa4
to
b934346
Compare
Benchmark for e8bd7d3Click to view benchmark
|
b934346
to
8542913
Compare
Benchmark for 76a0d2bClick to view benchmark
|
8542913
to
34b00b0
Compare
Benchmark for d63a871Click to view benchmark
|
Node
into Statement
and Expression
Node
into Statement
, Expression
and Declaration
Had to split |
Benchmark for ab9193aClick to view benchmark
|
Benchmark for 8d25bf6Click to view benchmark
|
67ccd78
to
bb101f7
Compare
Benchmark for 4c72bdaClick to view benchmark
|
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.
Really cool change, definitely appreciate differentiating things more by having expressions and statements not be variants of the same thing.
This is missing a lot of documentation, but I'll merge this as it is, since the number of changes is pretty massive and I wouldn't like to add more changes on top of that. I'll follow up with two PRs that implement bors r+ |
This Pull Request fixes #1371. And yeah, the number of file changes is real... It changes the following: - Split the ast `Node` into `Statement` and `Expression`. - Rewrite the parser and bytecompiler to conform to this change. - Refactor some ast nodes into reusable structures. - Rewrite `contains_arguments` and `contains` to ease the transition into a future ast visitor. List of things that were apparently fixed by this refactor?: - Implement read-assign operation for private accessors (e.g. `this.#field ||= 5`). - `var await` declaration now allowed outside `async` functions and inside functions nested in async functions. - Reject redeclarations of variables declared in the init list of a for loop. Still missing some documentation adjustments, will try to do it ASAP.
Pull request successfully merged into main. Build succeeded:
|
Node
into Statement
, Expression
and Declaration
Node
into Statement
, Expression
and Declaration
As promised in #2319 (comment). There are still some style inconsistencies (which require a bit more time and effort), but having the whole module documented is a lot better for clarity.
This Pull Request fixes #1371. And yeah, the number of file changes is real...
It changes the following:
Node
intoStatement
andExpression
.contains_arguments
andcontains
to ease the transition into a future ast visitor.List of things that were apparently fixed by this refactor?:
this.#field ||= 5
).var await
declaration now allowed outsideasync
functions and inside functions nested in async functions.Still missing some documentation adjustments, will try to do it ASAP.