OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 '''); | 51 '''); |
52 @JSExportName('dynamic') | 52 @JSExportName('dynamic') |
53 final dynamicR = JS('', 'new $Dynamic()'); | 53 final dynamicR = JS('', 'new $Dynamic()'); |
54 | 54 |
55 final Void = JS('', ''' | 55 final Void = JS('', ''' |
56 class Void extends $TypeRep { | 56 class Void extends $TypeRep { |
57 toString() { return "void"; } | 57 toString() { return "void"; } |
58 } | 58 } |
59 '''); | 59 '''); |
60 | |
61 @JSExportName('void') | 60 @JSExportName('void') |
62 final voidR = JS('', 'new $Void()'); | 61 final voidR = JS('', 'new $Void()'); |
63 | 62 |
64 final Bottom = JS('', ''' | 63 final Bottom = JS('', ''' |
65 class Bottom extends $TypeRep { | 64 class Bottom extends $TypeRep { |
66 toString() { return "bottom"; } | 65 toString() { return "bottom"; } |
67 } | 66 } |
68 '''); | 67 '''); |
69 final bottom = JS('', 'new $Bottom()'); | 68 final bottom = JS('', 'new $Bottom()'); |
70 | 69 |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 return true; | 536 return true; |
538 } | 537 } |
539 | 538 |
540 let typeArgs = $getGenericArgs($type); | 539 let typeArgs = $getGenericArgs($type); |
541 if (!typeArgs) return true; | 540 if (!typeArgs) return true; |
542 for (let t of typeArgs) { | 541 for (let t of typeArgs) { |
543 if (t != $Object && t != $dynamicR) return false; | 542 if (t != $Object && t != $dynamicR) return false; |
544 } | 543 } |
545 return true; | 544 return true; |
546 })()'''); | 545 })()'''); |
OLD | NEW |