Chromium Code Reviews
Descriptiondart2dart: Support for all constants in new backend.
Adds support for:
- Type literals
- By-value reference to top-level or static function
- Const constructor invocation inside const literal list or map
Nested const expressions are linearized to LetPrims, and we rely on the dart_tree to inline all primitives (since non-const variable references may not occur in a const expression).
There are still a bunch of constants that we support but don't actually treat as constants. Reference to top-level constants are still treated as a getter invocations, for instance.
We bail out on local constant declarations since they must either be inlined at multiple places or we must generate a constant declaration for them.
BUG=
R=kmillikin@google.com, sigurdm@google.com
Committed: https://code.google.com/p/dart/source/detail?r=37585
Patch Set 1 #Patch Set 2 : Formatting stuff #
Total comments: 5
Patch Set 3 : Fixed doc comment #Patch Set 4 : Added reason to giveup calls #Patch Set 5 : Fixed test case; it did not work in minified mode #Patch Set 6 : SVN rebase + merge #Messages
Total messages: 5 (0 generated)
|