Commit b47bd9c
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 b47bd9c
115 files changed
Lines changed: 2472 additions & 455 deletions
File tree
- Benchmarks
- Sources
- Generated
- JavaScript
- lib
- 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.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
42 | 52 | | |
43 | 53 | | |
44 | | - | |
45 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
46 | 58 | | |
47 | | - | |
48 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
49 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
50 | 70 | | |
51 | 71 | | |
52 | 72 | | |
| |||
59 | 79 | | |
60 | 80 | | |
61 | 81 | | |
62 | | - | |
63 | | - | |
| 82 | + | |
| 83 | + | |
64 | 84 | | |
65 | 85 | | |
66 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
308 | 363 | | |
309 | 364 | | |
310 | 365 | | |
| |||
0 commit comments