Commit d205267
Compile out RuntimeScheduler_Legacy under RCT_REMOVE_LEGACY_ARCH (#57116)
Summary:
Pull Request resolved: #57116
## Changelog:
[General][Breaking] Compile out RuntimeScheduler_Legacy under RCT_REMOVE_LEGACY_ARCH
Guard the legacy RuntimeScheduler implementation behind the `RCT_REMOVE_LEGACY_ARCH` macro instead of deleting it. `RuntimeScheduler_Legacy.h`/`.cpp` remain in the tree, but their contents — along with the feature-flag-based selection between the legacy and modern schedulers in `RuntimeScheduler.cpp`, `NativeMutationObserver.cpp`, and `Task.h` — are wrapped in `#ifndef RCT_REMOVE_LEGACY_ARCH`. When the macro is defined, the legacy code is compiled out and `RuntimeScheduler` unconditionally instantiates `RuntimeScheduler_Modern`; when it is not defined, behavior is unchanged.
The C++ API snapshots are updated to drop the `RuntimeScheduler_Legacy` symbols from the new-arch surface, and the parameterized scheduler test (`RuntimeSchedulerTest`) only runs the modern configuration when the legacy arch is compiled out.
Reviewed By: rubennorte
Differential Revision: D107777881
fbshipit-source-id: 2b50711ab3af182edc45a87fd232d96a0f8798371 parent 4adca58 commit d205267
9 files changed
Lines changed: 30 additions & 73 deletions
File tree
- packages/react-native/ReactCommon/react
- nativemodule/mutationobserver
- renderer/runtimescheduler
- tests
- scripts/cxx-api/api-snapshots
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
| 148 | + | |
147 | 149 | | |
| 150 | + | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
| |||
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
| 160 | + | |
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
14 | 17 | | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| 30 | + | |
26 | 31 | | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
| 288 | + | |
| 289 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| 177 | + | |
| 178 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
32 | 35 | | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
1434 | 1437 | | |
| 1438 | + | |
1435 | 1439 | | |
1436 | 1440 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4264 | 4264 | | |
4265 | 4265 | | |
4266 | 4266 | | |
4267 | | - | |
4268 | | - | |
4269 | | - | |
4270 | | - | |
4271 | | - | |
4272 | | - | |
4273 | | - | |
4274 | | - | |
4275 | | - | |
4276 | | - | |
4277 | | - | |
4278 | | - | |
4279 | | - | |
4280 | | - | |
4281 | | - | |
4282 | | - | |
4283 | | - | |
4284 | | - | |
4285 | | - | |
4286 | | - | |
4287 | | - | |
4288 | | - | |
4289 | | - | |
4290 | | - | |
4291 | 4267 | | |
4292 | 4268 | | |
4293 | 4269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6495 | 6495 | | |
6496 | 6496 | | |
6497 | 6497 | | |
6498 | | - | |
6499 | | - | |
6500 | | - | |
6501 | | - | |
6502 | | - | |
6503 | | - | |
6504 | | - | |
6505 | | - | |
6506 | | - | |
6507 | | - | |
6508 | | - | |
6509 | | - | |
6510 | | - | |
6511 | | - | |
6512 | | - | |
6513 | | - | |
6514 | | - | |
6515 | | - | |
6516 | | - | |
6517 | | - | |
6518 | | - | |
6519 | | - | |
6520 | | - | |
6521 | | - | |
6522 | 6498 | | |
6523 | 6499 | | |
6524 | 6500 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2871 | 2871 | | |
2872 | 2872 | | |
2873 | 2873 | | |
2874 | | - | |
2875 | | - | |
2876 | | - | |
2877 | | - | |
2878 | | - | |
2879 | | - | |
2880 | | - | |
2881 | | - | |
2882 | | - | |
2883 | | - | |
2884 | | - | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
2888 | | - | |
2889 | | - | |
2890 | | - | |
2891 | | - | |
2892 | | - | |
2893 | | - | |
2894 | | - | |
2895 | | - | |
2896 | | - | |
2897 | | - | |
2898 | 2874 | | |
2899 | 2875 | | |
2900 | 2876 | | |
| |||
0 commit comments