Commit a0b1f09
Move Meta mixin methods to standalone fns in @ember/object/mixin
The `addMixin` / `hasMixin` / `forEachMixins` methods only existed on
`Meta` to be called by `@ember/object/mixin`. Keeping them on the class
forced a static reference from `Meta` (reachable from the renderer
through the property accessor / tag chain) into the classic `Mixin`
graph.
Move them out as standalone functions (`metaAddMixin` / `metaHasMixin` /
`metaForEachMixins`) in `mixin.ts` itself, poking at `Meta`'s public
`_mixins` and `parent` fields directly. With this split, bundles that
don't import `@ember/object/mixin` get a cleaner `Meta` class — in the
hello-world prod bundle the `addMixin` / `hasMixin` / `forEachMixins`
identifiers go from present to fully absent, and `Mixin` references
drop from 12 to 5.
The methods were `@internal` and only called from `mixin.ts`, so this
is a purely internal refactor.
Verified: lint clean, type-checks pass, hello-world builds at
134.19 KB / 42.94 KB gzip (unchanged), classic v2-app-template tests
1/1 pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 6899fa3 commit a0b1f09
2 files changed
Lines changed: 67 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
308 | 278 | | |
309 | 279 | | |
310 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
7 | 62 | | |
8 | 63 | | |
9 | 64 | | |
| |||
247 | 302 | | |
248 | 303 | | |
249 | 304 | | |
250 | | - | |
| 305 | + | |
251 | 306 | | |
252 | 307 | | |
253 | | - | |
| 308 | + | |
254 | 309 | | |
255 | 310 | | |
256 | 311 | | |
| |||
592 | 647 | | |
593 | 648 | | |
594 | 649 | | |
595 | | - | |
| 650 | + | |
596 | 651 | | |
597 | 652 | | |
598 | 653 | | |
| |||
664 | 719 | | |
665 | 720 | | |
666 | 721 | | |
667 | | - | |
| 722 | + | |
668 | 723 | | |
669 | 724 | | |
670 | 725 | | |
| |||
0 commit comments