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

Issue 1531233002: Compute all default values of parameters. (Closed)

Created:
5 years ago by scheglov
Modified:
5 years ago
CC:
reviews_dartlang.org, Leaf
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Compute all default values of parameters. Look at the following code. main([p = double.INFINITY]) {} In ConstantVerifier we validate the value of "p" and while doing this validate the value of the ConstFieldElementImpl that corresponds to "double.INFINITY". The problem is that we compute "double.INFINITY" in the task that requires RESOLVED_UNIT_n, where "n" is too high. What we really need is just one value, not all values, and of course not the resolved unit. And when we will use summaries, we will be able to provide these values without using AST at all. So, we need to explicitly require computation of the default value of "p", an explicit dependency on "double.INFINITY" and its explicit computation. Currently it still causes using ASTs, but we will change this soon. R=brianwilkerson@google.com, paulberry@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/9801d58eb7d6cf96f1a0c50aac59065ea0dec2ae

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -32 lines) Patch
M pkg/analyzer/lib/src/generated/constant.dart View 2 chunks +17 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/generated/resolver.dart View 1 chunk +4 lines, -10 lines 0 comments Download
M pkg/analyzer/lib/src/generated/testing/element_factory.dart View 1 chunk +3 lines, -1 line 0 comments Download
M pkg/analyzer/lib/src/generated/testing/test_type_provider.dart View 2 chunks +6 lines, -1 line 0 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer/lib/src/task/driver.dart View 5 chunks +9 lines, -6 lines 2 comments Download
M pkg/analyzer/test/generated/non_error_resolver_test.dart View 1 chunk +22 lines, -0 lines 0 comments Download
M pkg/analyzer/test/src/task/driver_test.dart View 13 chunks +13 lines, -13 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
scheglov
5 years ago (2015-12-17 07:52:49 UTC) #1
Paul Berry
lgtm https://codereview.chromium.org/1531233002/diff/1/pkg/analyzer/lib/src/task/driver.dart File pkg/analyzer/lib/src/task/driver.dart (right): https://codereview.chromium.org/1531233002/diff/1/pkg/analyzer/lib/src/task/driver.dart#newcode552 pkg/analyzer/lib/src/task/driver.dart:552: final int level; Doc comment missing - did ...
5 years ago (2015-12-17 15:05:47 UTC) #2
Brian Wilkerson
LGTM
5 years ago (2015-12-17 15:13:01 UTC) #4
scheglov
5 years ago (2015-12-17 16:06:15 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
9801d58eb7d6cf96f1a0c50aac59065ea0dec2ae (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698