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] - Adjust compile and execute to avoid clones #1778

Closed
wants to merge 3 commits into from

Conversation

raskad
Copy link
Member

@raskad raskad commented Jan 12, 2022

It changes the following:

  • Adjust the context methods compile and execute to avoid clones on StatementList and CodeBlock

@raskad raskad added enhancement New feature or request API vm Issues and PRs related to the Boa Virtual Machine. labels Jan 12, 2022
@raskad raskad added this to the v0.14.0 milestone Jan 12, 2022
@github-actions
Copy link

github-actions bot commented Jan 12, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 87,200 87,200 0
Passed 40,828 40,828 0
Ignored 19,493 19,493 0
Failed 26,879 26,879 0
Panics 0 0 0
Conformance 46.82% 46.82% 0.00%

@codecov
Copy link

codecov bot commented Jan 12, 2022

Codecov Report

Merging #1778 (d75a715) into main (48185f3) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1778      +/-   ##
==========================================
- Coverage   55.72%   55.72%   -0.01%     
==========================================
  Files         201      201              
  Lines       17336    17336              
==========================================
- Hits         9661     9660       -1     
- Misses       7675     7676       +1     
Impacted Files Coverage Δ
boa/src/context.rs 40.80% <100.00%> (-0.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48185f3...d75a715. Read the comment docs.

Copy link
Member

@RageKnify RageKnify left a comment

Choose a reason for hiding this comment

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

Maybe we should document somewhere that if the library users would like to execute a CodeBlock more than once they should clone the Gc instead of passing it to execute directly.

@Razican
Copy link
Member

Razican commented Jan 21, 2022

Maybe we should document somewhere that if the library users would like to execute a CodeBlock more than once they should clone the Gc instead of passing it to execute directly.

I guess this can be added to the documentation of CodeBlock, or to the function that executes it. As soon as that gets written we should merge this.

@Razican
Copy link
Member

Razican commented Jan 23, 2022

Maybe we should document somewhere that if the library users would like to execute a CodeBlock more than once they should clone the Gc instead of passing it to execute directly.

I guess this can be added to the documentation of CodeBlock, or to the function that executes it. As soon as that gets written we should merge this.

I added the relevant documentation, LGTM :)

@raskad
Copy link
Member Author

raskad commented Jan 23, 2022

Fixed a typos in the docs. Looks good to merge.

@Razican
Copy link
Member

Razican commented Jan 23, 2022

bors r+

bors bot pushed a commit that referenced this pull request Jan 23, 2022
It changes the following:

- Adjust the `context` methods `compile` and `execute` to avoid clones on `StatementList` and `CodeBlock`



Co-authored-by: raskad <[email protected]>
@bors
Copy link

bors bot commented Jan 23, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Adjust compile and execute to avoid clones [Merged by Bors] - Adjust compile and execute to avoid clones Jan 23, 2022
@bors bors bot closed this Jan 23, 2022
@raskad raskad deleted the adjust-compile-api branch January 26, 2022 00:01
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 vm Issues and PRs related to the Boa Virtual Machine.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants