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

Issue 1027453003: Fix constant evaluation of division. (Closed)

Created:
5 years, 9 months ago by Paul Berry
Modified:
5 years, 9 months ago
Reviewers:
danrubel
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Fix constant evaluation of division. To be consistent with the VM and dart2js implementations, the analyzer's constant evaluation of a / b should always yield a double, even if the arguments are ints. For example, 300 / 2 = 150.0 and 301 / 2 = 150.5. BUG=dartbug.com/22937 R=danrubel@google.com Committed: https://code.google.com/p/dart/source/detail?r=44645

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -13 lines) Patch
M pkg/analyzer/lib/src/generated/constant.dart View 3 chunks +5 lines, -9 lines 2 comments Download
M pkg/analyzer/test/generated/all_the_rest_test.dart View 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Paul Berry
5 years, 9 months ago (2015-03-23 16:09:12 UTC) #2
danrubel
lgtm https://codereview.chromium.org/1027453003/diff/1/pkg/analyzer/lib/src/generated/constant.dart File pkg/analyzer/lib/src/generated/constant.dart (right): https://codereview.chromium.org/1027453003/diff/1/pkg/analyzer/lib/src/generated/constant.dart#newcode2785 pkg/analyzer/lib/src/generated/constant.dart:2785: return UNKNOWN_VALUE; DoubleState.UNKNOWN_VALUE ?
5 years, 9 months ago (2015-03-23 16:48:49 UTC) #3
Paul Berry
https://codereview.chromium.org/1027453003/diff/1/pkg/analyzer/lib/src/generated/constant.dart File pkg/analyzer/lib/src/generated/constant.dart (right): https://codereview.chromium.org/1027453003/diff/1/pkg/analyzer/lib/src/generated/constant.dart#newcode2785 pkg/analyzer/lib/src/generated/constant.dart:2785: return UNKNOWN_VALUE; On 2015/03/23 16:48:48, danrubel wrote: > DoubleState.UNKNOWN_VALUE ...
5 years, 9 months ago (2015-03-23 19:30:18 UTC) #4
Paul Berry
5 years, 9 months ago (2015-03-23 19:36:44 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 44645 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698