| 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 */ | 6 */ |
| 7 | 7 |
| 8 dart_library.library('dart_runtime/_types', null, /* Imports */[ | 8 dart_library.library('dart_runtime/_types', null, /* Imports */[ |
| 9 ], /* Lazy Imports */[ | 9 ], /* Lazy Imports */[ |
| 10 'dart/core', | 10 'dart/core', |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 let voidR = new Void(); | 62 let voidR = new Void(); |
| 63 exports.void = voidR; | 63 exports.void = voidR; |
| 64 | 64 |
| 65 class Bottom extends TypeRep { | 65 class Bottom extends TypeRep { |
| 66 toString() { return "bottom"; } | 66 toString() { return "bottom"; } |
| 67 }; | 67 }; |
| 68 let bottomR = new Bottom(); | 68 let bottomR = new Bottom(); |
| 69 exports.bottom = bottomR; | 69 exports.bottom = bottomR; |
| 70 | 70 |
| 71 class JSObject extends TypeRep { |
| 72 toString() { return "NativeJavaScriptObject"; } |
| 73 }; |
| 74 let jsobjectR = new JSObject(); |
| 75 exports.jsobject = jsobjectR; |
| 76 |
| 71 class AbstractFunctionType extends TypeRep { | 77 class AbstractFunctionType extends TypeRep { |
| 72 constructor() { | 78 constructor() { |
| 73 super(); | 79 super(); |
| 74 this._stringValue = null; | 80 this._stringValue = null; |
| 75 } | 81 } |
| 76 | 82 |
| 77 toString() { return this.name; } | 83 toString() { return this.name; } |
| 78 | 84 |
| 79 get name() { | 85 get name() { |
| 80 if (this._stringValue) return this._stringValue; | 86 if (this._stringValue) return this._stringValue; |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 let typeArgs = classes.getGenericArgs(type); | 539 let typeArgs = classes.getGenericArgs(type); |
| 534 if (!typeArgs) return true; | 540 if (!typeArgs) return true; |
| 535 for (let t of typeArgs) { | 541 for (let t of typeArgs) { |
| 536 if (t != core.Object && t != dynamicR) return false; | 542 if (t != core.Object && t != dynamicR) return false; |
| 537 } | 543 } |
| 538 return true; | 544 return true; |
| 539 } | 545 } |
| 540 exports.isGroundType = isGroundType; | 546 exports.isGroundType = isGroundType; |
| 541 | 547 |
| 542 }); | 548 }); |
| OLD | NEW |