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

Fix regular expression construction #3338

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

HalidOdat
Copy link
Member

The previous implementation used the global RegExp, which caused errors when the RegExp was overwritten.

@HalidOdat HalidOdat added bug Something isn't working execution Issues or PRs related to code execution labels Oct 2, 2023
@HalidOdat HalidOdat added this to the v0.18.0 milestone Oct 2, 2023
@HalidOdat HalidOdat requested a review from a team October 2, 2023 15:05
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Test262 conformance changes

Test result main count PR count difference
Total 95,574 95,574 0
Passed 75,201 75,201 0
Ignored 19,482 19,482 0
Failed 891 891 0
Panics 0 0 0
Conformance 78.68% 78.68% 0.00%

The previous implementation regular expression (e.g. /abc/) used the global `RegExp`,
which caused errors when the `RegExp` was overwritten.
@HalidOdat HalidOdat force-pushed the fix/regexp-expression-construction branch from c160e0b to b7a16aa Compare October 2, 2023 15:23
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Attention: 25 lines in your changes are missing coverage. Please review.

Comparison is base (e54609e) 49.42% compared to head (b7a16aa) 49.45%.
Report is 3 commits behind head on main.

❗ Current head b7a16aa differs from pull request most recent head 01fa079. Consider uploading reports for the commit 01fa079 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3338      +/-   ##
==========================================
+ Coverage   49.42%   49.45%   +0.03%     
==========================================
  Files         445      446       +1     
  Lines       43891    43948      +57     
==========================================
+ Hits        21691    21733      +42     
- Misses      22200    22215      +15     
Files Coverage Δ
boa_engine/src/bytecompiler/expression/mod.rs 58.21% <100.00%> (+1.63%) ⬆️
boa_engine/src/vm/opcode/mod.rs 5.32% <ø> (ø)
boa_ast/src/expression/mod.rs 62.96% <66.66%> (+0.08%) ⬆️
boa_engine/src/vm/flowgraph/mod.rs 0.00% <0.00%> (ø)
boa_parser/src/parser/expression/primary/mod.rs 54.38% <50.00%> (+0.05%) ⬆️
boa_ast/src/visitor.rs 20.87% <0.00%> (-0.21%) ⬇️
boa_ast/src/expression/regexp.rs 76.47% <76.47%> (ø)
boa_engine/src/vm/code_block.rs 51.55% <0.00%> (-0.52%) ⬇️
boa_engine/src/vm/opcode/push/literal.rs 64.51% <54.54%> (-12.41%) ⬇️

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Nice fix! Some small nitpicks that don't block merging.

boa_ast/src/expression/mod.rs Outdated Show resolved Hide resolved
boa_ast/src/expression/regexp.rs Outdated 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.

Nice work 😄

@HalidOdat HalidOdat enabled auto-merge October 2, 2023 20:16
@HalidOdat HalidOdat added this pull request to the merge queue Oct 2, 2023
Merged via the queue into main with commit 4bdb6c6 Oct 2, 2023
@HalidOdat HalidOdat deleted the fix/regexp-expression-construction branch October 28, 2023 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants