Commit bf52815
committed
[js-compiler] Remove special handling for JS library aliases. NFC
This change remove some special casing in `addFromLibrary` which
simplifies the code, and also lays the groundwork for #25441 which
explicitly allows JS symbol to alias native ones.
This special handling was added in #19046 in order to deal with case
where `glXXX` symbols were simultaneously aliased by `emscripten_glXX`
and exported (in the case of MAIN_MODULE=1).
However, this work is no longer needed since in #21785 we stopped
stopped included symbol exported due to `MAIN_MODULE=1` as part of
WASM_EXPORT (the symbols are only exported to side modules, not to
JS).
In original problem was that `emscripten_glXX` should always points to
the original JS implementation, even if a native version is exported.
Just in case somebody is explicitly exporting these symbols this change
also flips the aliases such that the `glXX` functions are now aliases of
`emscripten_glXX` and not the other way around. This means that
exporting `glXXX` will replace/override the alias, but will not effect
`emscripten_glXX`.1 parent 8262f2a commit bf52815
4 files changed
Lines changed: 46 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
| 517 | + | |
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
643 | 642 | | |
644 | 643 | | |
645 | 644 | | |
| |||
659 | 658 | | |
660 | 659 | | |
661 | 660 | | |
662 | | - | |
| 661 | + | |
663 | 662 | | |
664 | 663 | | |
665 | 664 | | |
| |||
690 | 689 | | |
691 | 690 | | |
692 | 691 | | |
693 | | - | |
| 692 | + | |
694 | 693 | | |
695 | 694 | | |
696 | 695 | | |
| |||
777 | 776 | | |
778 | 777 | | |
779 | 778 | | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | 779 | | |
785 | 780 | | |
786 | 781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4346 | 4346 | | |
4347 | 4347 | | |
4348 | 4348 | | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
| 4352 | + | |
| 4353 | + | |
| 4354 | + | |
| 4355 | + | |
| 4356 | + | |
| 4357 | + | |
| 4358 | + | |
| 4359 | + | |
| 4360 | + | |
| 4361 | + | |
4349 | 4362 | | |
4350 | 4363 | | |
4351 | 4364 | | |
4352 | 4365 | | |
| 4366 | + | |
| 4367 | + | |
| 4368 | + | |
| 4369 | + | |
| 4370 | + | |
| 4371 | + | |
4353 | 4372 | | |
4354 | 4373 | | |
4355 | | - | |
4356 | | - | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
4357 | 4377 | | |
4358 | 4378 | | |
4359 | | - | |
| 4379 | + | |
4360 | 4380 | | |
4361 | 4381 | | |
4362 | 4382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
202 | 217 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| |||
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| 334 | + | |
333 | 335 | | |
334 | 336 | | |
335 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments