Commit bef10cc
committed
[Fizz] Share code between inline and external runtime (#33066)
Stacked on #33065.
The runtime is about to be a lot more complicated so we need to start
sharing some more code.
The problem with sharing code is that we want the inline runtime to as
much as possible be isolated in its scope using only a few global
variables to refer across runtimes.
A problem with Closure Compiler is that it refuses to inline functions
if they have closures inside of them. Which makes sense because of how
VMs work it can cause memory leaks. However, in our cases this doesn't
matter and code size matters more. So we can't use many clever tricks.
So this just favors writing the source in the inline form. Then we add
an extra compiler pass to turn those global variables into local
variables in the external runtime.
DiffTrain build for [bb57fa7](bb57fa7)1 parent 51eae11 commit bef10cc
File tree
37 files changed
+182
-178
lines changed- compiled/facebook-www
37 files changed
+182
-178
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1538 | 1538 | | |
1539 | 1539 | | |
1540 | 1540 | | |
1541 | | - | |
| 1541 | + | |
1542 | 1542 | | |
1543 | 1543 | | |
1544 | 1544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1538 | 1538 | | |
1539 | 1539 | | |
1540 | 1540 | | |
1541 | | - | |
| 1541 | + | |
1542 | 1542 | | |
1543 | 1543 | | |
1544 | 1544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
639 | | - | |
| 639 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
639 | | - | |
| 639 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
643 | | - | |
| 643 | + | |
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
643 | | - | |
| 643 | + | |
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19014 | 19014 | | |
19015 | 19015 | | |
19016 | 19016 | | |
19017 | | - | |
| 19017 | + | |
19018 | 19018 | | |
19019 | 19019 | | |
19020 | | - | |
| 19020 | + | |
19021 | 19021 | | |
19022 | 19022 | | |
19023 | 19023 | | |
| |||
19051 | 19051 | | |
19052 | 19052 | | |
19053 | 19053 | | |
19054 | | - | |
| 19054 | + | |
19055 | 19055 | | |
19056 | 19056 | | |
19057 | 19057 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18786 | 18786 | | |
18787 | 18787 | | |
18788 | 18788 | | |
18789 | | - | |
| 18789 | + | |
18790 | 18790 | | |
18791 | 18791 | | |
18792 | | - | |
| 18792 | + | |
18793 | 18793 | | |
18794 | 18794 | | |
18795 | 18795 | | |
| |||
18823 | 18823 | | |
18824 | 18824 | | |
18825 | 18825 | | |
18826 | | - | |
| 18826 | + | |
18827 | 18827 | | |
18828 | 18828 | | |
18829 | 18829 | | |
| |||
0 commit comments