Commit 73da478
[regexp] Remove function pointer in TextEmitPass
TextEmitPass uses a function pointer to determine which pass to
call. This function pointer is only assigned inside TextEmitPass, and
can easily be eliminated by moving the calls to each possible target
inside the switch statement that assigns the function pointer.
I made this change because SpiderMonkey uses a static analysis pass to
verify that everything is rooted properly across calls that might GC,
and that analysis is conservative when calling function pointers. We
can white-list function pointers that are known to be safe, but the
code being called through this function pointer is complex enough
(and the function pointer is unnecessary enough) that it seemed best
to just remove the function pointer entirely.
R=jgruber@chromium.org
Bug: v8:10303
Change-Id: I5fbb0df290a2288c4d3db6d43a563385337162ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2091398
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66672}1 parent 025319b commit 73da478
1 file changed
Lines changed: 13 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
865 | | - | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | 865 | | |
870 | 866 | | |
871 | 867 | | |
| |||
2314 | 2310 | | |
2315 | 2311 | | |
2316 | 2312 | | |
2317 | | - | |
2318 | 2313 | | |
2319 | 2314 | | |
2320 | 2315 | | |
2321 | 2316 | | |
2322 | 2317 | | |
2323 | 2318 | | |
2324 | 2319 | | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
2325 | 2323 | | |
2326 | 2324 | | |
2327 | 2325 | | |
| |||
2331 | 2329 | | |
2332 | 2330 | | |
2333 | 2331 | | |
2334 | | - | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
2335 | 2335 | | |
2336 | 2336 | | |
2337 | | - | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
2338 | 2340 | | |
2339 | 2341 | | |
2340 | | - | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
2341 | 2345 | | |
2342 | 2346 | | |
2343 | 2347 | | |
2344 | 2348 | | |
2345 | | - | |
2346 | | - | |
2347 | | - | |
2348 | | - | |
2349 | | - | |
2350 | | - | |
2351 | | - | |
| 2349 | + | |
2352 | 2350 | | |
2353 | 2351 | | |
2354 | 2352 | | |
| |||
0 commit comments