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

Side by Side Diff: lib/compiler/implementation/universe.dart

Issue 10825140: Add check for duplicate field initialization (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months 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 | « no previous file | runtime/vm/parser.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class Universe { 5 class Universe {
6 Map<Element, CodeBuffer> generatedCode; 6 Map<Element, CodeBuffer> generatedCode;
7 Map<Element, CodeBuffer> generatedBailoutCode; 7 Map<Element, CodeBuffer> generatedBailoutCode;
8 final Set<ClassElement> instantiatedClasses; 8 final Set<ClassElement> instantiatedClasses;
9 final Set<SourceString> instantiatedClassInstanceFields; 9 final Set<SourceString> instantiatedClassInstanceFields;
10 final Set<FunctionElement> staticFunctionsNeedingGetter; 10 final Set<FunctionElement> staticFunctionsNeedingGetter;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 static final SelectorKind OPERATOR = const SelectorKind('operator'); 79 static final SelectorKind OPERATOR = const SelectorKind('operator');
80 static final SelectorKind INDEX = const SelectorKind('index'); 80 static final SelectorKind INDEX = const SelectorKind('index');
81 81
82 toString() => name; 82 toString() => name;
83 } 83 }
84 84
85 class Selector implements Hashable { 85 class Selector implements Hashable {
86 // The numbers of arguments of the selector. Includes named arguments. 86 // The numbers of arguments of the selector. Includes named arguments.
87 final int argumentCount; 87 final int argumentCount;
88 final SelectorKind kind; 88 final SelectorKind kind;
89 final List<SourceString> namedArguments = const <SourceString>[]; 89 final List<SourceString> namedArguments;
90 final List<SourceString> orderedNamedArguments = const <SourceString>[]; 90 final List<SourceString> orderedNamedArguments;
91 91
92 // The const constructor. 92 // The const constructor.
93 const Selector.constant(this.kind, this.argumentCount); 93 const Selector.constant(this.kind, this.argumentCount)
94 : this.namedArguments = const <SourceString>[],
95 this.orderedNamedArguments = const <SourceString>[];
94 96
95 Selector( 97 Selector(
96 this.kind, 98 this.kind,
97 this.argumentCount, 99 this.argumentCount,
98 [List<SourceString> namedArguments = const <SourceString>[]]) 100 [List<SourceString> namedArguments = const <SourceString>[]])
99 : this.namedArguments = namedArguments, 101 : this.namedArguments = namedArguments,
100 this.orderedNamedArguments = namedArguments.isEmpty() 102 this.orderedNamedArguments = namedArguments.isEmpty()
101 ? namedArguments 103 ? namedArguments
102 : <SourceString>[]; 104 : <SourceString>[];
103 105
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 347
346 return false; 348 return false;
347 } 349 }
348 350
349 bool operator ==(other) { 351 bool operator ==(other) {
350 if (other is !TypedSelector) return false; 352 if (other is !TypedSelector) return false;
351 if (other.receiverType !== receiverType) return false; 353 if (other.receiverType !== receiverType) return false;
352 return super == other; 354 return super == other;
353 } 355 }
354 } 356 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698