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

Issue 10990065: Synthesized a constructor if there is no resolved constructors in the class. (Closed)

Created:
8 years, 2 months ago by Anton Muhin
Modified:
8 years, 2 months ago
Reviewers:
Roman
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Synthesized a constructor if there is no resolved constructors in the class. That prevents from synthesizing of default constructor and makes dart2dart translate invalid program into invalid program with the same behaviour in this corner case. R=podivilov@chromium.org BUG=5349 Committed: https://code.google.com/p/dart/source/detail?r=13016

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -2 lines) Patch
M lib/compiler/implementation/dart_backend/backend.dart View 1 1 chunk +38 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2dart.status View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Anton Muhin
8 years, 2 months ago (2012-09-26 19:30:21 UTC) #1
Anton Muhin
https://codereview.chromium.org/10990065/diff/1/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://codereview.chromium.org/10990065/diff/1/lib/compiler/implementation/dart_backend/backend.dart#newcode344 lib/compiler/implementation/dart_backend/backend.dart:344: SynthesizedConstructorElement constructor = SCE assumes it's a default ctor ...
8 years, 2 months ago (2012-09-27 06:14:28 UTC) #2
Anton Muhin
Sorry, I wanted to ask Roma for review, not Pavel.
8 years, 2 months ago (2012-09-27 06:15:18 UTC) #3
Roman
Hmm I just had a thought. This is the situation you're fixing: class C { ...
8 years, 2 months ago (2012-09-27 10:14:44 UTC) #4
Roman
lgtm https://codereview.chromium.org/10990065/diff/1/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://codereview.chromium.org/10990065/diff/1/lib/compiler/implementation/dart_backend/backend.dart#newcode359 lib/compiler/implementation/dart_backend/backend.dart:359: elementAsts[constructor] = new ElementAst(constructor.cachedNode, new TreeElementMapping()); 80 chars ...
8 years, 2 months ago (2012-09-27 12:40:50 UTC) #5
Anton Muhin
8 years, 2 months ago (2012-09-28 12:21:27 UTC) #6
https://codereview.chromium.org/10990065/diff/1/lib/compiler/implementation/d...
File lib/compiler/implementation/dart_backend/backend.dart (right):

https://codereview.chromium.org/10990065/diff/1/lib/compiler/implementation/d...
lib/compiler/implementation/dart_backend/backend.dart:359:
elementAsts[constructor] = new ElementAst(constructor.cachedNode, new
TreeElementMapping());
On 2012/09/27 12:40:50, Roman wrote:
> 80 chars

Done.

https://codereview.chromium.org/10990065/diff/1/lib/compiler/implementation/d...
lib/compiler/implementation/dart_backend/backend.dart:365:
collector.unresolvedNodes.add(synthesizedIdentifier);
On 2012/09/27 12:40:50, Roman wrote:
> Please add a comment that this is for renamer conservative generator to rename
> empty string to something syntactically correct.

Done.

Powered by Google App Engine
This is Rietveld 408576698