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

Issue 10789012: Record default clause for interfaces in parser. (Closed)

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

Description

Record default clause for interfaces in parser. Use it in dart2dart emitter Committed: https://code.google.com/p/dart/source/detail?r=9662

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -3 lines) Patch
M lib/compiler/implementation/dart_backend/emitter.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M lib/compiler/implementation/elements/elements.dart View 1 1 chunk +1 line, -0 lines 0 comments Download
M lib/compiler/implementation/scanner/listener.dart View 1 chunk +4 lines, -3 lines 0 comments Download
M tests/compiler/dart2js/unparser_test.dart View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Roman
8 years, 5 months ago (2012-07-16 09:49:00 UTC) #1
Anton Muhin
https://chromiumcodereview.appspot.com/10789012/diff/1/lib/compiler/implementation/scanner/listener.dart File lib/compiler/implementation/scanner/listener.dart (right): https://chromiumcodereview.appspot.com/10789012/diff/1/lib/compiler/implementation/scanner/listener.dart#newcode602 lib/compiler/implementation/scanner/listener.dart:602: if (defaultClause !== null) element.defaultClause = defaultClause; I'd rather ...
8 years, 5 months ago (2012-07-16 10:19:01 UTC) #2
Roman
https://chromiumcodereview.appspot.com/10789012/diff/1/lib/compiler/implementation/scanner/listener.dart File lib/compiler/implementation/scanner/listener.dart (right): https://chromiumcodereview.appspot.com/10789012/diff/1/lib/compiler/implementation/scanner/listener.dart#newcode602 lib/compiler/implementation/scanner/listener.dart:602: if (defaultClause !== null) element.defaultClause = defaultClause; On 2012/07/16 ...
8 years, 5 months ago (2012-07-16 10:41:43 UTC) #3
Anton Muhin
8 years, 5 months ago (2012-07-16 10:45:23 UTC) #4
https://chromiumcodereview.appspot.com/10789012/diff/1/lib/compiler/implement...
File lib/compiler/implementation/scanner/listener.dart (right):

https://chromiumcodereview.appspot.com/10789012/diff/1/lib/compiler/implement...
lib/compiler/implementation/scanner/listener.dart:602: if (defaultClause !==
null) element.defaultClause = defaultClause;
That might be an optional argument.

On 2012/07/16 10:41:43, Roman wrote:
> On 2012/07/16 10:19:01, Anton Mukhin wrote:
> > I'd rather set it in constructor.
> 
> Let me disagree :) ClassElement has many fields, only few basic are set in
> constructor. Example: in listener.dart method endClassDeclaration() also sets
> "nativeName" element separately, not in constructor.
> 
> I thought about this thing, creating another parameter in PartialClassElement
> constructor, but this class is also used for ordinary classes and for ordinary
> interfaces, rarely we need to specify default clause.

Powered by Google App Engine
This is Rietveld 408576698