Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Issue 2779993002: Store literal values and invocations arguments only for constants and untyped literals. (Closed)

Created:
3 years, 8 months ago by scheglov
Modified:
3 years, 8 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Store 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
Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -159 lines) Patch
M pkg/analyzer/lib/src/summary/format.fbs View 1 Binary file 0 comments Download
M pkg/analyzer/lib/src/summary/idl.dart View 1 3 chunks +15 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/summary/summarize_ast.dart View 11 chunks +24 lines, -21 lines 0 comments Download
M pkg/analyzer/lib/src/summary/summarize_const_expr.dart View 5 chunks +47 lines, -22 lines 0 comments Download
M pkg/analyzer/test/src/summary/linker_test.dart View 1 chunk +0 lines, -21 lines 0 comments Download
M pkg/analyzer/test/src/summary/summary_common.dart View 9 chunks +70 lines, -41 lines 0 comments Download
M pkg/analyzer/test/src/task/strong/inferred_type_test.dart View 3 chunks +0 lines, -54 lines 0 comments Download
M pkg/front_end/front_end.iml View 1 chunk +1 line, -0 lines 1 comment Download

Messages

Total messages: 4 (1 generated)
scheglov
3 years, 8 months ago (2017-03-28 19:55:58 UTC) #1
Brian Wilkerson
lgtm https://codereview.chromium.org/2779993002/diff/20001/pkg/front_end/front_end.iml File pkg/front_end/front_end.iml (right): https://codereview.chromium.org/2779993002/diff/20001/pkg/front_end/front_end.iml#newcode23 pkg/front_end/front_end.iml:23: <orderEntry type="library" name="Dart Packages" level="project" /> Did you ...
3 years, 8 months ago (2017-03-28 21:10:09 UTC) #2
scheglov
3 years, 8 months ago (2017-03-28 21:14:04 UTC) #4
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
84a4b01081179f4e8b6584d137b415c5acc7573c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698