Commit c37509b
Enable $SHBuiltin.moduleFactory optimisation via custom transform option
Summary:
When the custom transform option `unstable_staticHermesOptimizedRequire` is truthy, wrap module factories in
```javascript
$SHBuiltin.moduleFactory(moduleId, factory)
```
This enables a Static Hermes-only optimisation for experimentation.
Changelog:
```javascript
- **[Experimental]**: Opt-in SHBuiltin module factory optimisation
```
Reviewed By: motiz88
Differential Revision: D73510634
fbshipit-source-id: 2ac94b08d13e453d87abdaae33d9ea0403a7b9e51 parent e0714b6 commit c37509b
File tree
2 files changed
+60
-10
lines changed- packages
- metro-transform-worker/src
- metro/src/ModuleGraph/worker
2 files changed
+60
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
429 | 430 | | |
430 | 431 | | |
431 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
432 | 439 | | |
433 | 440 | | |
434 | 441 | | |
| |||
572 | 579 | | |
573 | 580 | | |
574 | 581 | | |
575 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
576 | 590 | | |
577 | 591 | | |
578 | 592 | | |
| |||
654 | 668 | | |
655 | 669 | | |
656 | 670 | | |
657 | | - | |
658 | | - | |
659 | | - | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
660 | 683 | | |
661 | 684 | | |
662 | 685 | | |
663 | | - | |
| 686 | + | |
664 | 687 | | |
665 | 688 | | |
666 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
47 | 62 | | |
48 | 63 | | |
49 | 64 | | |
| |||
64 | 79 | | |
65 | 80 | | |
66 | 81 | | |
67 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
68 | 87 | | |
69 | 88 | | |
70 | 89 | | |
71 | 90 | | |
72 | 91 | | |
73 | 92 | | |
74 | 93 | | |
75 | | - | |
76 | | - | |
| 94 | + | |
| 95 | + | |
77 | 96 | | |
78 | | - | |
| 97 | + | |
79 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
80 | 107 | | |
81 | 108 | | |
82 | 109 | | |
| |||
0 commit comments