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 '../common_elements.dart' show CommonElements; | 10 import '../common_elements.dart' show CommonElements; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 * If there is one or more `@Returns` annotations, the union of the named types | 124 * If there is one or more `@Returns` annotations, the union of the named types |
125 * replaces the declared return type. | 125 * replaces the declared return type. |
126 * | 126 * |
127 * @Returns('IDBRequest') | 127 * @Returns('IDBRequest') |
128 * IDBRequest openCursor(); | 128 * IDBRequest openCursor(); |
129 * | 129 * |
130 * Types in annotations are non-nullable, so include `@Returns('Null')` if | 130 * Types in annotations are non-nullable, so include `@Returns('Null')` if |
131 * `null` may be returned. | 131 * `null` may be returned. |
132 */ | 132 */ |
133 class NativeBehavior { | 133 class NativeBehavior { |
134 /// [ResolutionDartType]s or [SpecialType]s returned or yielded by the native | 134 /// [DartType]s or [SpecialType]s returned or yielded by the native |
135 /// element. | 135 /// element. |
136 final List typesReturned = []; | 136 final List typesReturned = []; |
137 | 137 |
138 /// [ResolutionDartType]s or [SpecialType]s instantiated by the native | 138 /// [DartType]s or [SpecialType]s instantiated by the native |
139 /// element. | 139 /// element. |
140 final List typesInstantiated = []; | 140 final List typesInstantiated = []; |
141 | 141 |
142 String codeTemplateText; | 142 String codeTemplateText; |
143 // If this behavior is for a JS expression, [codeTemplate] contains the | 143 // If this behavior is for a JS expression, [codeTemplate] contains the |
144 // parsed tree. | 144 // parsed tree. |
145 js.Template codeTemplate; | 145 js.Template codeTemplate; |
146 | 146 |
147 final SideEffects sideEffects; | 147 final SideEffects sideEffects; |
148 | 148 |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 @override | 1045 @override |
1046 bool get trustJSInteropTypeAnnotations => | 1046 bool get trustJSInteropTypeAnnotations => |
1047 compiler.options.trustJSInteropTypeAnnotations; | 1047 compiler.options.trustJSInteropTypeAnnotations; |
1048 | 1048 |
1049 @override | 1049 @override |
1050 DiagnosticReporter get reporter => compiler.reporter; | 1050 DiagnosticReporter get reporter => compiler.reporter; |
1051 | 1051 |
1052 @override | 1052 @override |
1053 Resolution get resolution => compiler.resolution; | 1053 Resolution get resolution => compiler.resolution; |
1054 } | 1054 } |
OLD | NEW |