You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/client/reactive/new-rewriting-implementation.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,12 @@ function foo() {
56
56
57
57
thus, while analysing an expression, dependencies are still gathered, but outside the analysis, we only need to check one global boolean (which requires not only less redundant computation but also is more JIT friendly because we do not have centralized functions that are hard to optimize).
58
58
59
+
### advantages
60
+
61
+
- low impact on standard js expectations
62
+
- no 'cannot read [prop] of obj' anymore
63
+
- low perf impact
64
+
59
65
### caveats
60
66
61
67
1. arrow functionExpressions may need to be rewritten to have a block as body
@@ -82,8 +88,10 @@ idea: instead of a central data structutr, keep refereces to aexprs for locals i
82
88
83
89
idea: local variables only need to be tracked, if
84
90
- they leave their initial scope of declaration (= there is at least one read (#TODO: not sure if a read requires tracking) or write access to that variable in a different first-class functions' scope, i.e. it can be passed around)
91
+
- having `eval` in a subscope allows to read/write any local variable, thus, those also need to be rewritten
85
92
- they are not constant (there is a write operations somewhere for them)
86
93
94
+
87
95
# Benchmarks
88
96
89
97
- need to compare performance to all other strategies
0 commit comments