Commit 555585c
committed
feat: Add per-class identityMode via @js macro parameter
Add identityMode: Bool parameter to @js macro. When set to true on a class,
that class uses pointer identity caching. When false or not set, the class
uses the bridge-js.config.json default.
Identity is resolved entirely at codegen time - no runtime option. Classes
with identity mode get static __identityCache passed to __wrap. Classes
without it pass null. No runtime branching in __construct.
Resolution: @js(identityMode: true/false) > bridge-js.config.json > default (off).1 parent f562fcb commit 555585c
108 files changed
Lines changed: 1673 additions & 364 deletions
File tree
- Plugins
- BridgeJS
- Sources
- BridgeJSCore
- BridgeJSLink
- BridgeJSSkeleton
- Tests/BridgeJSToolTests
- Inputs/MacroSwift
- __Snapshots__
- BridgeJSCodegenTests
- BridgeJSLinkTests
- PackageToJS/Templates
- Sources/JavaScriptKit
- Tests/JavaScriptEventLoopTests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1197 | 1197 | | |
1198 | 1198 | | |
1199 | 1199 | | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
1200 | 1208 | | |
1201 | 1209 | | |
1202 | 1210 | | |
| |||
1384 | 1392 | | |
1385 | 1393 | | |
1386 | 1394 | | |
| 1395 | + | |
1387 | 1396 | | |
1388 | 1397 | | |
1389 | 1398 | | |
1390 | 1399 | | |
1391 | 1400 | | |
1392 | 1401 | | |
1393 | 1402 | | |
1394 | | - | |
| 1403 | + | |
| 1404 | + | |
1395 | 1405 | | |
1396 | 1406 | | |
1397 | 1407 | | |
| |||
Lines changed: 31 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
28 | 43 | | |
29 | 44 | | |
30 | 45 | | |
| |||
110 | 125 | | |
111 | 126 | | |
112 | 127 | | |
113 | | - | |
| 128 | + | |
114 | 129 | | |
115 | 130 | | |
116 | 131 | | |
| |||
937 | 952 | | |
938 | 953 | | |
939 | 954 | | |
940 | | - | |
941 | 955 | | |
942 | 956 | | |
943 | 957 | | |
| |||
983 | 997 | | |
984 | 998 | | |
985 | 999 | | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | 1000 | | |
992 | 1001 | | |
993 | 1002 | | |
| |||
1993 | 2002 | | |
1994 | 2003 | | |
1995 | 2004 | | |
1996 | | - | |
| 2005 | + | |
| 2006 | + | |
1997 | 2007 | | |
1998 | | - | |
1999 | | - | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
2000 | 2012 | | |
2001 | 2013 | | |
2002 | | - | |
2003 | | - | |
2004 | | - | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
2005 | 2023 | | |
2006 | 2024 | | |
2007 | 2025 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| 787 | + | |
787 | 788 | | |
788 | 789 | | |
789 | 790 | | |
| |||
792 | 793 | | |
793 | 794 | | |
794 | 795 | | |
795 | | - | |
| 796 | + | |
| 797 | + | |
796 | 798 | | |
797 | 799 | | |
798 | 800 | | |
| |||
801 | 803 | | |
802 | 804 | | |
803 | 805 | | |
| 806 | + | |
804 | 807 | | |
805 | 808 | | |
806 | 809 | | |
| |||
Lines changed: 41 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
| 110 | + | |
| 111 | + | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
121 | 118 | | |
| 119 | + | |
| 120 | + | |
122 | 121 | | |
123 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
124 | 129 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
147 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
148 | 156 | | |
149 | 157 | | |
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments