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

Issue 895813002: Tweak toString() for better type inference (Closed)

Created:
5 years, 10 months ago by sra1
Modified:
5 years, 10 months ago
CC:
reviews_dartlang.org, ricow1
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Tweak toString() for better type inference These changes ensure dart2js can infer toString() returns a non-null String on some of our samples. One tactic is to always write toString method for which all returned expressions are a an interpolation (or literal), or a call to StringBuffer.toString. R=alanknight@google.com, lrn@google.com Committed: https://code.google.com/p/dart/source/detail?r=43534

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -28 lines) Patch
M sdk/lib/_internal/compiler/js_lib/js_helper.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/async/zone.dart View 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/html/dart2js/html_dart2js.dart View 11 chunks +23 lines, -18 lines 0 comments Download
M sdk/lib/html/dartium/html_dartium.dart View 3 chunks +7 lines, -3 lines 0 comments Download
M tools/dom/scripts/systemhtml.py View 4 chunks +5 lines, -0 lines 0 comments Download
A + tools/dom/templates/html/dart2js/impl_HTMLAnchorElement.darttemplate View 2 chunks +7 lines, -2 lines 0 comments Download
A + tools/dom/templates/html/dart2js/impl_HTMLAreaElement.darttemplate View 2 chunks +7 lines, -2 lines 0 comments Download
M tools/dom/templates/html/dart2js/impl_URL.darttemplate View 1 chunk +5 lines, -0 lines 0 comments Download
M tools/dom/templates/html/impl/impl_DOMException.darttemplate View 1 chunk +5 lines, -0 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Element.darttemplate View 1 chunk +6 lines, -0 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Location.darttemplate View 1 chunk +6 lines, -0 lines 0 comments Download
M tools/dom/templates/html/impl/impl_Node.darttemplate View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 5 (1 generated)
sra1
5 years, 10 months ago (2015-02-03 04:10:40 UTC) #2
Lasse Reichstein Nielsen
LGTM. I assume moving JS("String","String(#)",x) into a helper function isn't viable.
5 years, 10 months ago (2015-02-03 07:04:41 UTC) #3
Alan Knight
lgtm
5 years, 10 months ago (2015-02-03 18:00:17 UTC) #4
sra1
5 years, 10 months ago (2015-02-06 00:25:06 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as 43534 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698