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

Issue 1276353006: dart2js: Do not use JSDouble for native behavior return types. (Closed)

Created:
5 years, 4 months ago by asgerf
Modified:
5 years, 4 months ago
Reviewers:
floitsch, herhut
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js: Do not use JSDouble for native behavior return types. Previously, a JS('double', ...) expression would be seen as having the exact JSDouble class as return type. This is problematic since that class is reserved for non-integer doubles, and the result is generally not known to be non-integer. For example, the sqrt function returns 'double' but sqrt(0) == 0 which is an integer. BUG= R=floitsch@google.com Committed: https://github.com/dart-lang/sdk/commit/b0905eadce3276f138258fb138b8f3e5496a4e73 Committed: https://github.com/dart-lang/sdk/commit/136ec727eeb798403cf047dd454a439f0d8285d3

Patch Set 1 #

Patch Set 2 : Return JSNumber instead of double #

Patch Set 3 : Revert + Unrevert #

Patch Set 4 : Replace use of JS('double') #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -14 lines) Patch
M pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart View 1 1 chunk +5 lines, -3 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/math_patch.dart View 1 2 3 1 chunk +10 lines, -10 lines 0 comments Download
M tests/compiler/dart2js/cpa_inference_test.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
asgerf
5 years, 4 months ago (2015-08-11 10:28:32 UTC) #2
floitsch
LGTM. I cced Stephan in case I missed something.
5 years, 4 months ago (2015-08-11 11:18:59 UTC) #4
asgerf
Following offline discussion, changed type to JSNumber instead of just double.
5 years, 4 months ago (2015-08-11 11:24:30 UTC) #5
floitsch
Still LGTM.
5 years, 4 months ago (2015-08-11 11:42:00 UTC) #6
asgerf
Committed patchset #2 (id:20001) manually as b0905eadce3276f138258fb138b8f3e5496a4e73 (presubmit successful).
5 years, 4 months ago (2015-08-11 12:27:06 UTC) #7
asgerf
5 years, 4 months ago (2015-08-11 13:14:55 UTC) #8
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
136ec727eeb798403cf047dd454a439f0d8285d3 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698