| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import '../common.dart'; | 5 import '../common.dart'; |
| 6 import '../common/backend_api.dart' show ForeignResolver; | 6 import '../common/backend_api.dart' show ForeignResolver; |
| 7 import '../common/resolution.dart' show ParsingContext, Resolution; | 7 import '../common/resolution.dart' show ParsingContext, Resolution; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../core_types.dart' show CoreTypes; | 10 import '../core_types.dart' show CoreTypes; |
| 11 import '../dart_types.dart'; | 11 import '../dart_types.dart'; |
| 12 import '../elements/elements.dart'; | 12 import '../elements/elements.dart'; |
| 13 import '../js/js.dart' as js; | 13 import '../js/js.dart' as js; |
| 14 import '../js_backend/js_backend.dart'; | 14 import '../js_backend/js_backend.dart'; |
| 15 import '../tree/tree.dart'; | 15 import '../tree/tree.dart'; |
| 16 import '../universe/side_effects.dart' show SideEffects; | 16 import '../universe/side_effects.dart' show SideEffects; |
| 17 import '../util/util.dart'; | 17 import '../util/util.dart'; |
| 18 | |
| 19 import 'enqueue.dart'; | 18 import 'enqueue.dart'; |
| 20 import 'js.dart'; | 19 import 'js.dart'; |
| 21 | 20 |
| 22 /// This class is a temporary work-around until we get a more powerful DartType. | 21 /// This class is a temporary work-around until we get a more powerful DartType. |
| 23 class SpecialType { | 22 class SpecialType { |
| 24 final String name; | 23 final String name; |
| 25 const SpecialType._(this.name); | 24 const SpecialType._(this.name); |
| 26 | 25 |
| 27 /// The type Object, but no subtypes: | 26 /// The type Object, but no subtypes: |
| 28 static const JsObject = const SpecialType._('=Object'); | 27 static const JsObject = const SpecialType._('=Object'); |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 reporter.reportErrorMessage(_errorNode(locationNodeOrElement, parsing), | 898 reporter.reportErrorMessage(_errorNode(locationNodeOrElement, parsing), |
| 900 MessageKind.GENERIC, {'text': "Type '$typeString' not found."}); | 899 MessageKind.GENERIC, {'text': "Type '$typeString' not found."}); |
| 901 return const DynamicType(); | 900 return const DynamicType(); |
| 902 } | 901 } |
| 903 | 902 |
| 904 static _errorNode(locationNodeOrElement, ParsingContext parsing) { | 903 static _errorNode(locationNodeOrElement, ParsingContext parsing) { |
| 905 if (locationNodeOrElement is Node) return locationNodeOrElement; | 904 if (locationNodeOrElement is Node) return locationNodeOrElement; |
| 906 return locationNodeOrElement.parseNode(parsing); | 905 return locationNodeOrElement.parseNode(parsing); |
| 907 } | 906 } |
| 908 } | 907 } |
| OLD | NEW |