Commit fe88b47
authored
Unify imported and non-imported things (#1678)
Fixes #1649
This moves us to a single object for functions, which can be imported or nor, and likewise for globals (as a result, GetGlobals do not need to check if the global is imported or not, etc.). All imported things now inherit from Importable, which has the module and base of the import, and if they are set then it is an import.
For convenient iteration, there are a few helpers like
ModuleUtils::iterDefinedGlobals(wasm, [&](Global* global) {
.. use global ..
});
as often iteration only cares about imported or defined (non-imported) things.1 parent a53356a commit fe88b47
File tree
314 files changed
+2141
-2534
lines changed- bin
- scripts
- src
- ir
- js
- passes
- tools
- wasm
- test
- binaryen.js
- ctor-eval
- example
- lld
- merge
- metadce
- passes
- reduce
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
314 files changed
+2141
-2534
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | 193 | | |
195 | 194 | | |
196 | 195 | | |
| |||
373 | 372 | | |
374 | 373 | | |
375 | 374 | | |
376 | | - | |
377 | 375 | | |
378 | 376 | | |
379 | 377 | | |
| |||
434 | 432 | | |
435 | 433 | | |
436 | 434 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | 435 | | |
443 | 436 | | |
444 | 437 | | |
| |||
546 | 539 | | |
547 | 540 | | |
548 | 541 | | |
549 | | - | |
550 | 542 | | |
551 | 543 | | |
552 | 544 | | |
| |||
594 | 586 | | |
595 | 587 | | |
596 | 588 | | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
603 | 593 | | |
604 | 594 | | |
605 | 595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
0 commit comments