OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library kernel.target.vm; | 4 library kernel.target.vm; |
5 | 5 |
6 import '../ast.dart'; | 6 import '../ast.dart'; |
7 import '../class_hierarchy.dart'; | 7 import '../class_hierarchy.dart'; |
8 import '../core_types.dart'; | 8 import '../core_types.dart'; |
9 import '../transformations/continuation.dart' as cont; | 9 import '../transformations/continuation.dart' as cont; |
10 import '../transformations/erasure.dart'; | 10 import '../transformations/erasure.dart'; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 // list first, and then populate it. That would create fewer objects. But as | 262 // list first, and then populate it. That would create fewer objects. But as |
263 // this is currently only used in (statically resolved) no-such-method | 263 // this is currently only used in (statically resolved) no-such-method |
264 // handling, the current approach seems sufficient. | 264 // handling, the current approach seems sufficient. |
265 return new MethodInvocation( | 265 return new MethodInvocation( |
266 new ListLiteral(elements)..fileOffset = offset, | 266 new ListLiteral(elements)..fileOffset = offset, |
267 new Name("toList"), | 267 new Name("toList"), |
268 new Arguments(<Expression>[], named: <NamedExpression>[ | 268 new Arguments(<Expression>[], named: <NamedExpression>[ |
269 new NamedExpression("growable", new BoolLiteral(false)) | 269 new NamedExpression("growable", new BoolLiteral(false)) |
270 ])); | 270 ])); |
271 } | 271 } |
272 | |
273 // TODO(sigmund,ahe): limit this to `dart-ext` libraries only (see | |
274 // https://github.com/dart-lang/sdk/issues/29763). | |
275 @override | |
276 bool enableNative(Uri uri) => true; | |
277 | |
278 @override | |
279 bool get nativeExtensionExpectsString => true; | |
280 } | 272 } |
OLD | NEW |