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

Side by Side Diff: lib/kernel.dart

Issue 2417843003: Don't use const, lists should be mutable in Kernel. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | lib/kernel_visitor.dart » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 library rasta.kernel; 5 library rasta.kernel;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 Future; 8 Future;
9 9
10 import 'dart:collection' show 10 import 'dart:collection' show
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 ir.Class cls = classToIr(type.element); 245 ir.Class cls = classToIr(type.element);
246 if (type.typeArguments.isEmpty) { 246 if (type.typeArguments.isEmpty) {
247 return cls.rawType; 247 return cls.rawType;
248 } else { 248 } else {
249 return new ir.InterfaceType(cls, typesToIr(type.typeArguments)); 249 return new ir.InterfaceType(cls, typesToIr(type.typeArguments));
250 } 250 }
251 } 251 }
252 252
253 // TODO(ahe): Remove this method when dart2js support generic type arguments. 253 // TODO(ahe): Remove this method when dart2js support generic type arguments.
254 List<ir.TypeParameter> typeParametersNotImplemented() { 254 List<ir.TypeParameter> typeParametersNotImplemented() {
255 return const <ir.TypeParameter>[]; 255 return <ir.TypeParameter>[];
256 } 256 }
257 257
258 ir.FunctionType functionTypeToIr(FunctionType type) { 258 ir.FunctionType functionTypeToIr(FunctionType type) {
259 List<ir.TypeParameter> typeParameters = typeParametersNotImplemented(); 259 List<ir.TypeParameter> typeParameters = typeParametersNotImplemented();
260 int requiredParameterCount = type.parameterTypes.length; 260 int requiredParameterCount = type.parameterTypes.length;
261 List<ir.DartType> positionalParameters = 261 List<ir.DartType> positionalParameters =
262 new List<ir.DartType>.from(typesToIr(type.parameterTypes)) 262 new List<ir.DartType>.from(typesToIr(type.parameterTypes))
263 ..addAll(typesToIr(type.optionalParameterTypes)); 263 ..addAll(typesToIr(type.optionalParameterTypes));
264 Map<String, ir.DartType> namedParameters = <String, ir.DartType>{}; 264 Map<String, ir.DartType> namedParameters = <String, ir.DartType>{};
265 for (int i = 0; i < type.namedParameters.length; i++) { 265 for (int i = 0; i < type.namedParameters.length; i++) {
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 } 687 }
688 688
689 class ConstructorTarget { 689 class ConstructorTarget {
690 final ConstructorElement element; 690 final ConstructorElement element;
691 final DartType type; 691 final DartType type;
692 692
693 ConstructorTarget(this.element, this.type); 693 ConstructorTarget(this.element, this.type);
694 694
695 String toString() => "ConstructorTarget($element, $type)"; 695 String toString() => "ConstructorTarget($element, $type)";
696 } 696 }
OLDNEW
« no previous file with comments | « no previous file | lib/kernel_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698