Files
sdk/pkg/dev_compiler/test/codegen
Olivier Chafik 04d4be0982 Less dart.notNull checks for local vars using flow-insensitive nullability inference.
Within some AST context (at library granularity, for convenience), we
collect all the assignments to local vars:
- Declaration with no initializer amounts to `null` assignment
- Assignment ops are expanded naively: `x++` yield an assigned value of
`x + 1`, etc

We detect "trivially nullable" variables (e.g. `var x;`, `x =
breaking.out;`) by spotting assigned values that are nullable under the
optimistic assumption that all known variables are non-nullable.

Then we build a nullability dependency graph in linear time: whenever
we see `x = y;`, we know that "y is nullable" implies "x is nullable".

Finally, we propagate "trivial nullabilities" through that graph: any
variable that wasn't reached is deemed not-nullable.

(this is similar to mark and sweep garbage collection, where the roots
are the "trivially nullable" variables; credits to leafpetersen@ for
linear solution)
2016-01-28 15:47:49 +00:00
..
2015-03-04 09:40:06 -08:00
2016-01-05 15:58:50 -08:00
2015-04-10 13:41:43 -07:00
2015-05-11 10:56:11 -07:00
2016-01-24 18:09:59 +00:00
2015-06-26 16:02:30 -07:00
2015-12-01 15:57:56 -08:00
2015-07-14 17:48:38 -07:00
2015-02-18 16:48:56 -08:00
2015-11-02 10:32:49 -08:00
2015-08-04 17:23:13 -07:00
2015-04-10 13:41:43 -07:00