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

[Merged by Bors] - Cleanup Context APIs #2504

Closed
wants to merge 5 commits into from
Closed

[Merged by Bors] - Cleanup Context APIs #2504

wants to merge 5 commits into from

Conversation

jedel1043
Copy link
Member

Just a general cleanup of the APIs of our Context.

  • Reordered the pub and pub(crate)/fn methods to have a clear separation between our public and private APIs.
  • Removed the call method and added it to JsValue instead, which semantically makes a bit more sense.
  • Removed the construct_object method, and added an utility method new to JsObject instead.
  • Rewrote some patterns I found while rewriting the calls of the removed function.

@jedel1043 jedel1043 added enhancement New feature or request API labels Dec 22, 2022
@jedel1043 jedel1043 added this to the v0.17.0 milestone Dec 22, 2022
@jedel1043 jedel1043 changed the title Context api Cleanup Context APIs Dec 22, 2022
@github-actions
Copy link

github-actions bot commented Dec 22, 2022

Test262 conformance changes

Test result main count PR count difference
Total 94,188 94,188 0
Passed 70,164 70,164 0
Ignored 18,605 18,605 0
Failed 5,419 5,419 0
Panics 0 0 0
Conformance 74.49% 74.49% 0.00%

@jedel1043
Copy link
Member Author

Oof, the engine didn't like the adjustments I did to the String builtin. I'll fix this tomorrow.

@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Merging #2504 (8e17229) into main (ab2e6e1) will increase coverage by 0.18%.
The diff coverage is 56.73%.

@@            Coverage Diff             @@
##             main    #2504      +/-   ##
==========================================
+ Coverage   51.27%   51.46%   +0.18%     
==========================================
  Files         356      356              
  Lines       35864    35678     -186     
==========================================
- Hits        18391    18361      -30     
+ Misses      17473    17317     -156     
Impacted Files Coverage Δ
boa_engine/src/builtins/array_buffer/mod.rs 8.84% <0.00%> (+0.02%) ⬆️
boa_engine/src/builtins/proxy/mod.rs 14.06% <0.00%> (ø)
...src/builtins/typed_array/integer_indexed_object.rs 0.00% <ø> (ø)
boa_engine/src/builtins/typed_array/mod.rs 7.19% <0.00%> (ø)
boa_engine/src/object/builtins/jsarraybuffer.rs 0.00% <0.00%> (ø)
boa_engine/src/object/builtins/jsproxy.rs 0.00% <0.00%> (ø)
boa_engine/src/object/internal_methods/global.rs 32.58% <0.00%> (ø)
boa_engine/src/vm/opcode/generator/mod.rs 0.00% <0.00%> (ø)
boa_engine/src/vm/opcode/get/name.rs 69.11% <0.00%> (ø)
boa_engine/src/builtins/array/mod.rs 74.57% <3.84%> (+0.06%) ⬆️
... and 37 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

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

This looks awesome! Had a couple questions/potential suggestions.

boa_engine/src/object/jsobject.rs Outdated Show resolved Hide resolved
boa_engine/src/object/jsobject.rs Show resolved Hide resolved
Copy link
Member

@nekevss nekevss left a 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 😄

Copy link
Member

@HalidOdat HalidOdat left a 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! :)

@jedel1043
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Dec 27, 2022
Just a general cleanup of the APIs of our `Context`.

- Reordered the `pub` and `pub(crate)/fn` methods to have a clear separation between our public and private APIs.
- Removed the call method and added it to `JsValue` instead, which semantically makes a bit more sense.
- Removed the `construct_object` method, and added an utility method `new` to `JsObject` instead.
- Rewrote some patterns I found while rewriting the calls of the removed function.
@bors
Copy link

bors bot commented Dec 27, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Cleanup Context APIs [Merged by Bors] - Cleanup Context APIs Dec 27, 2022
@bors bors bot closed this Dec 27, 2022
@bors bors bot deleted the context-api branch December 27, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants