-
-
Notifications
You must be signed in to change notification settings - Fork 406
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] - Implement with
and object environments
#2692
Conversation
Test262 conformance changes
Fixed tests (197):
|
Codecov Report
@@ Coverage Diff @@
## main #2692 +/- ##
==========================================
+ Coverage 49.36% 50.36% +1.00%
==========================================
Files 397 392 -5
Lines 39568 38897 -671
==========================================
+ Hits 19533 19591 +58
+ Misses 20035 19306 -729
... and 14 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Looks good! Great work @raskad
Just some small improvement suggestions
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.
Looks good to me! :)
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.
Looks perfect!
bors r+ |
This Pull Request changes the following: - Implement `with` statement parsing, ast node, compilation and excution. - Implement object environments that are used in the `with` statement excution. The implementation of object environments can probably be optimized further by using more compile-time information about when object environments can exist. Maybe there could also be a separate environment stack for object environments to reduce the filtering and iteration that is needed with the current implementation. This does not fix all tests in the `test/language/statements/with` suite yet. But for most failing tests that I have looked at we are missing other features / have bugs elsewhere. As a note for the review: The functions in the `impl Context` block in `boa_engine/src/environments/runtime.rs` are mostly copied / moved from the existing functions. The only change there should be the addition of the object environment logic. They had to be moved to `Context` because of borrow semantics.
Pull request successfully merged into main. Build succeeded: |
with
and object environmentswith
and object environments
This Pull Request changes the following:
with
statement parsing, ast node, compilation and excution.with
statement excution.The implementation of object environments can probably be optimized further by using more compile-time information about when object environments can exist. Maybe there could also be a separate environment stack for object environments to reduce the filtering and iteration that is needed with the current implementation.
This does not fix all tests in the
test/language/statements/with
suite yet. But for most failing tests that I have looked at we are missing other features / have bugs elsewhere.As a note for the review:
The functions in the
impl Context
block inboa_engine/src/environments/runtime.rs
are mostly copied / moved from the existing functions. The only change there should be the addition of the object environment logic. They had to be moved toContext
because of borrow semantics.