Commit d4f3c02
Flow analysis: Get rid of initialize and _freshVariableInfo.
The FlowModel._freshVariableInfo field was an optimization with
dubious benefit (it avoided a single allocation when seeing a variable
for the first time). And it is getting in the way of changes I have
planned for dart-lang/language#1274 (which
will require each fresh variable to be allocated different
information).
Removing FlowModel._freshVariableInfo means that now we have a call to
VariableModel.fresh() whenever we see a variable for the first time,
so we can take advantage of this to elimiate the
VariableModel.initialize() method, and simply allocate the
VariableModel in the initialized state when it's appropriate to do so.
Change-Id: I4b6f7d004fff72eaa4025fdf79e9ca29a81d7f96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174566
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>1 parent f6e4b77 commit d4f3c02
File tree
1 file changed
+6
-23
lines changed1 file changed
+6
-23
lines changedLines changed: 6 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | 1289 | | |
1293 | 1290 | | |
1294 | 1291 | | |
| |||
1302 | 1299 | | |
1303 | 1300 | | |
1304 | 1301 | | |
1305 | | - | |
1306 | | - | |
| 1302 | + | |
1307 | 1303 | | |
1308 | 1304 | | |
1309 | 1305 | | |
| |||
1376 | 1372 | | |
1377 | 1373 | | |
1378 | 1374 | | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
1382 | | - | |
| 1375 | + | |
| 1376 | + | |
1383 | 1377 | | |
1384 | 1378 | | |
1385 | 1379 | | |
1386 | 1380 | | |
1387 | 1381 | | |
1388 | 1382 | | |
1389 | | - | |
| 1383 | + | |
1390 | 1384 | | |
1391 | 1385 | | |
1392 | 1386 | | |
| |||
2060 | 2054 | | |
2061 | 2055 | | |
2062 | 2056 | | |
2063 | | - | |
| 2057 | + | |
2064 | 2058 | | |
2065 | 2059 | | |
2066 | | - | |
2067 | | - | |
| 2060 | + | |
2068 | 2061 | | |
2069 | 2062 | | |
2070 | 2063 | | |
| |||
2077 | 2070 | | |
2078 | 2071 | | |
2079 | 2072 | | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
2084 | | - | |
2085 | | - | |
2086 | | - | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
2090 | 2073 | | |
2091 | 2074 | | |
2092 | 2075 | | |
| |||
0 commit comments