Repository navigation
Commit 4580794
Samson radu
deps: v8: cherrypick e540e1161b02 b69a1a1d8613 19e7a57bce3e d315af3d83cf
Fixes nodejs#66277
Original commits:
[regexp] Fix modifiers for ChoiceNodes during Analysis
During the analysis pass we didn't reset flags after visiting
alternatives of a ChoiceNode, which is required as the sub-graph of an
alternative might modify the flags.
Fixed: 510487690
Change-Id: I6b2660a98b34cd12740538af4ce61685609934a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7826630
Commit-Queue: Patrick Thier <[email protected]>
Auto-Submit: Patrick Thier <[email protected]>
Reviewed-by: Jakob Linke <[email protected]>
Commit-Queue: Jakob Linke <[email protected]>
Cr-Commit-Position: refs/heads/main@{#107120}
-----------------------------------------------------------------------
[regexp] Record flags on deferred worklist items
ActionNode::Emit for MODIFY_FLAGS was previously changed to restore
outer_flags on the way out to avoid leaking inner flags to trailing
deferred nodes. However, this caused nodes deferred from within the
modifier group to be compiled with the outer flags when processed by
Compiler::Assemble.
Instead of restoring flags in ActionNode::Emit, record the active flags
at the point where a node is deferred in Compiler::AddWork, and restore
them from the work-list item before emitting it.
This partially reverts
https://chromium-review.googlesource.com/c/v8/v8/+/8174589.
Change-Id: I3a552f9223b88ba99889e4375b8d1ea761257b94
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8213283
Reviewed-by: Patrick Thier <[email protected]>
Auto-Submit: Jakob Linke <[email protected]>
Commit-Queue: Patrick Thier <[email protected]>
Cr-Commit-Position: refs/heads/main@{#109102}
-----------------------------------------------------------------------
[regexp] Reset flags after resetting state in Parser
When restoring the previous state after parsing a closing parenthesis
we also need to restore flags explicitly from the restored state.
Fixed: 523687962
Change-Id: I63a5bd9fec2f9b7f6fb43b6893027c3c3d0755f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7950157
Auto-Submit: Patrick Thier <[email protected]>
Commit-Queue: Jakob Linke <[email protected]>
Reviewed-by: Jakob Linke <[email protected]>
Cr-Commit-Position: refs/heads/main@{#108021}
-----------------------------------------------------------------------
[regexp] Reset compiler flags between word boundary branches
When compiling \b and \B word boundary checks in AssertionNode where the
succeeding character type is unknown, two code paths (before_non_word and
before_word) are generated sequentially.
If the boundary assertion is placed inside a modifier group (e.g.
(?i:\.|\bNULL)), emitting the first branch traverses through on_success
and reaches the ActionNode that restores outer flags at group exit.
This mutates flags without restoring it when returning to emit the
second branch. Consequently, subsequent nodes in the second branch
(before_word) were incorrectly compiled with outer flags instead
of the modifier group's flags.
This CL saves compiler->flags() and restores them before emitting the
before_word branch in AssertionNode::EmitBoundaryCheck.
TAG=agy
Fixed: 544575761
Change-Id: I7f08bcb99c749d5e22636c8bd6eb44bd1d3e2e39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8257209
Reviewed-by: Victor Gomes <[email protected]>
Commit-Queue: Patrick Thier <[email protected]>
Cr-Commit-Position: refs/heads/main@{#109236}
-----------------------------------------------------------------------1 parent 458a0a8 commit 4580794
4 files changed
Lines changed: 49 additions & 5 deletions
File tree
- deps/v8
- src/regexp
- test/mjsunit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
| 361 | + | |
361 | 362 | | |
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
| 366 | + | |
365 | 367 | | |
366 | 368 | | |
367 | 369 | | |
| |||
2132 | 2134 | | |
2133 | 2135 | | |
2134 | 2136 | | |
| 2137 | + | |
2135 | 2138 | | |
2136 | 2139 | | |
2137 | 2140 | | |
| |||
2145 | 2148 | | |
2146 | 2149 | | |
2147 | 2150 | | |
| 2151 | + | |
2148 | 2152 | | |
2149 | 2153 | | |
2150 | 2154 | | |
| |||
3841 | 3845 | | |
3842 | 3846 | | |
3843 | 3847 | | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
3844 | 3852 | | |
3845 | 3853 | | |
| 3854 | + | |
3846 | 3855 | | |
3847 | 3856 | | |
3848 | 3857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
573 | 578 | | |
574 | 579 | | |
575 | 580 | | |
576 | | - | |
| 581 | + | |
577 | 582 | | |
578 | 583 | | |
579 | 584 | | |
| |||
644 | 649 | | |
645 | 650 | | |
646 | 651 | | |
647 | | - | |
| 652 | + | |
648 | 653 | | |
649 | 654 | | |
650 | 655 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
988 | 988 | | |
989 | 989 | | |
990 | 990 | | |
991 | | - | |
| 991 | + | |
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
0 commit comments