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

Side by Side Diff: pkg/compiler/lib/src/dart_types.dart

Issue 929053005: Merge request - fixes dart2js async problems. Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 5 years, 10 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 | pkg/compiler/lib/src/js/rewrite_async.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) 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 library dart_types; 5 library dart_types;
6 6
7 import 'dart:math' show min; 7 import 'dart:math' show min;
8 8
9 import 'core_types.dart'; 9 import 'core_types.dart';
10 import 'dart2jslib.dart' show Compiler, invariant, Script, Message; 10 import 'dart2jslib.dart' show Compiler, invariant, Script, Message;
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 bool get isEnumType => element.isEnumClass; 468 bool get isEnumType => element.isEnumClass;
469 469
470 InterfaceType createInstantiation(List<DartType> newTypeArguments) { 470 InterfaceType createInstantiation(List<DartType> newTypeArguments) {
471 return new InterfaceType(element, newTypeArguments); 471 return new InterfaceType(element, newTypeArguments);
472 } 472 }
473 473
474 /** 474 /**
475 * Returns the type as an instance of class [other], if possible, null 475 * Returns the type as an instance of class [other], if possible, null
476 * otherwise. 476 * otherwise.
477 */ 477 */
478 DartType asInstanceOf(ClassElement other) { 478 InterfaceType asInstanceOf(ClassElement other) {
479 other = other.declaration; 479 other = other.declaration;
480 if (element == other) return this; 480 if (element == other) return this;
481 InterfaceType supertype = element.asInstanceOf(other); 481 InterfaceType supertype = element.asInstanceOf(other);
482 if (supertype != null) { 482 if (supertype != null) {
483 List<DartType> arguments = Types.substTypes(supertype.typeArguments, 483 List<DartType> arguments = Types.substTypes(supertype.typeArguments,
484 typeArguments, 484 typeArguments,
485 element.typeVariables); 485 element.typeVariables);
486 return new InterfaceType(supertype.element, arguments); 486 return new InterfaceType(supertype.element, arguments);
487 } 487 }
488 return null; 488 return null;
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 } 1816 }
1817 namedParameterTypes[index].accept(this, namedParameters[index]); 1817 namedParameterTypes[index].accept(this, namedParameters[index]);
1818 needsComma = true; 1818 needsComma = true;
1819 } 1819 }
1820 sb.write('}'); 1820 sb.write('}');
1821 } 1821 }
1822 sb.write(')'); 1822 sb.write(')');
1823 } 1823 }
1824 } 1824 }
1825 1825
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js/rewrite_async.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698