DescriptionStore literal values and invocations arguments only for constants and untyped literals.
1. When a literal is typed, and is not a constant, we don't need its
elements for type inference. Moreover, in this case elements are
allowed to include nodes that are not immediately-evident expressions,
such as instance creations without all type arguments, closures with
block bodies, etc.
2. When a literal is a constant, so we still have to serialize all its
elements, it is possible that we will encounter something not allowed
for immediately-evident expressions, and fail. But that's OK, because
such expressions are also not allowed in constants, so we will have
a compile time error anyway, and IMHO it is OK to degrade a little
in presence of errors.
3. The same is true for method invocations and instance creations,
we need to serialize arguments only for constants, because top-level
inference never uses arguments to infer returned types.
R=brianwilkerson@google.com
BUG=
Committed: https://github.com/dart-lang/sdk/commit/84a4b01081179f4e8b6584d137b415c5acc7573c
Patch Set 1 #Patch Set 2 : Update IDL documentation. #
Total comments: 1
Messages
Total messages: 4 (1 generated)
|