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

Side by Side Diff: frog/member.dart

Issue 8589016: Add implicit super() call (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/gen.dart ('k') | tests/co19/co19-frog.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** A formal parameter to a [Method]. */ 5 /** A formal parameter to a [Method]. */
6 class Parameter { 6 class Parameter {
7 FormalNode definition; 7 FormalNode definition;
8 8
9 String name; 9 String name;
10 Type type; 10 Type type;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 bool get isNative() => false; 129 bool get isNative() => false;
130 String get constructorName() { 130 String get constructorName() {
131 world.internalError('can not be a constructor', span); 131 world.internalError('can not be a constructor', span);
132 } 132 }
133 133
134 // Don't display an error here; we'll get a better error later. 134 // Don't display an error here; we'll get a better error later.
135 void provideFieldSyntax() {} 135 void provideFieldSyntax() {}
136 void providePropertySyntax() {} 136 void providePropertySyntax() {}
137 137
138 Definition get initDelegate() { 138 Member get initDelegate() {
139 world.internalError('cannot have initializers', span); 139 world.internalError('cannot have initializers', span);
140 } 140 }
141 Definition set initDelegate(ctor) { 141 Member set initDelegate(ctor) {
142 world.internalError('cannot have initializers', span); 142 world.internalError('cannot have initializers', span);
143 } 143 }
144 144
145 /** 145 /**
146 * The inferred returnType. Right now this is just used to track 146 * The inferred returnType. Right now this is just used to track
147 * non-nullable bools. 147 * non-nullable bools.
148 */ 148 */
149 Type get inferredResult() { 149 Type get inferredResult() {
150 var t = returnType; 150 var t = returnType;
151 if (t.isBool && (library.isCore || library.isCoreImpl)) { 151 if (t.isBool && (library.isCore || library.isCoreImpl)) {
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 void provideFieldSyntax() => baseMember.provideFieldSyntax(); 569 void provideFieldSyntax() => baseMember.provideFieldSyntax();
570 void providePropertySyntax() => baseMember.providePropertySyntax(); 570 void providePropertySyntax() => baseMember.providePropertySyntax();
571 571
572 bool get isConstructor() => name == declaringType.name; 572 bool get isConstructor() => name == declaringType.name;
573 573
574 String get constructorName() => baseMember.constructorName; 574 String get constructorName() => baseMember.constructorName;
575 575
576 Definition get definition() => baseMember.definition; 576 Definition get definition() => baseMember.definition;
577 577
578 // TODO(sigmund): this is EGREGIOUS 578 // TODO(sigmund): this is EGREGIOUS
579 Definition get initDelegate() => baseMember.initDelegate; 579 Member get initDelegate() => baseMember.initDelegate;
580 Definition set initDelegate(ctor) { baseMember.initDelegate = ctor; } 580 Member set initDelegate(ctor) { baseMember.initDelegate = ctor; }
581 581
582 Type resolveType(TypeReference node, bool isRequired) { 582 Type resolveType(TypeReference node, bool isRequired) {
583 var type = baseMember.resolveType(node, isRequired); 583 var type = baseMember.resolveType(node, isRequired);
584 return type.resolveTypeParams(declaringType); 584 return type.resolveTypeParams(declaringType);
585 } 585 }
586 586
587 // TODO(jimhug): Add support for type params. 587 // TODO(jimhug): Add support for type params.
588 bool override(Member other) => baseMember.override(other); 588 bool override(Member other) => baseMember.override(other);
589 589
590 Value _get(MethodGenerator context, Node node, Value target, 590 Value _get(MethodGenerator context, Node node, Value target,
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 } 1624 }
1625 1625
1626 void forEach(void f(Member member)) { 1626 void forEach(void f(Member member)) {
1627 factories.forEach((_, Map constructors) { 1627 factories.forEach((_, Map constructors) {
1628 constructors.forEach((_, Member member) { 1628 constructors.forEach((_, Member member) {
1629 f(member); 1629 f(member);
1630 }); 1630 });
1631 }); 1631 });
1632 } 1632 }
1633 } 1633 }
OLDNEW
« no previous file with comments | « frog/gen.dart ('k') | tests/co19/co19-frog.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698