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

Side by Side Diff: tool/input_sdk/private/types.dart

Issue 1638533004: Create local alias for super class in --closure mode (issue #312) (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: fix test Created 4 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
« no previous file with comments | « test/codegen/expect/closure.js ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// This library defines the representation of runtime types. 5 /// This library defines the representation of runtime types.
6 part of dart._runtime; 6 part of dart._runtime;
7 7
8 /// The Symbol for storing type arguments on a specialized generic type. 8 /// The Symbol for storing type arguments on a specialized generic type.
9 final _mixins = JS('', 'Symbol("mixins")'); 9 final _mixins = JS('', 'Symbol("mixins")');
10 @JSExportName('implements') 10 @JSExportName('implements')
(...skipping 20 matching lines...) Expand all
31 /// Function types are represented in one of two ways: 31 /// Function types are represented in one of two ways:
32 /// - As an instance of FunctionType. These are eagerly computed. 32 /// - As an instance of FunctionType. These are eagerly computed.
33 /// - As an instance of TypeDef. The TypeDef representation lazily 33 /// - As an instance of TypeDef. The TypeDef representation lazily
34 /// computes an instance of FunctionType, and delegates to that instance. 34 /// computes an instance of FunctionType, and delegates to that instance.
35 /// 35 ///
36 /// All types satisfy the following interface: 36 /// All types satisfy the following interface:
37 /// get String name; 37 /// get String name;
38 /// String toString(); 38 /// String toString();
39 /// 39 ///
40 /// 40 ///
41 final _TypeRepBase = JS('', '$LazyTagged(() => $Type)');
41 final TypeRep = JS('', ''' 42 final TypeRep = JS('', '''
42 class TypeRep extends $LazyTagged(() => $Type) { 43 class TypeRep extends $_TypeRepBase {
43 get name() {return this.toString();} 44 get name() {return this.toString();}
44 } 45 }
45 '''); 46 ''');
46 47
47 final Dynamic = JS('', ''' 48 final Dynamic = JS('', '''
48 class Dynamic extends $TypeRep { 49 class Dynamic extends $TypeRep {
49 toString() { return "dynamic"; } 50 toString() { return "dynamic"; }
50 } 51 }
51 '''); 52 ''');
52 @JSExportName('dynamic') 53 @JSExportName('dynamic')
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 return true; 537 return true;
537 } 538 }
538 539
539 let typeArgs = $getGenericArgs($type); 540 let typeArgs = $getGenericArgs($type);
540 if (!typeArgs) return true; 541 if (!typeArgs) return true;
541 for (let t of typeArgs) { 542 for (let t of typeArgs) {
542 if (t != $Object && t != $dynamicR) return false; 543 if (t != $Object && t != $dynamicR) return false;
543 } 544 }
544 return true; 545 return true;
545 })()'''); 546 })()''');
OLDNEW
« no previous file with comments | « test/codegen/expect/closure.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698