OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library native; | 5 library native; |
6 | 6 |
7 import '../compiler.dart' show Compiler; | 7 import '../compiler.dart' show Compiler; |
8 import '../elements/elements.dart'; | 8 import '../elements/elements.dart'; |
9 | 9 |
10 export 'behavior.dart'; | 10 export 'behavior.dart'; |
(...skipping 20 matching lines...) Expand all Loading... |
31 String scriptName = library.entryCompilationUnit.script.name; | 31 String scriptName = library.entryCompilationUnit.script.name; |
32 return scriptName.contains('sdk/tests/compiler/dart2js_native') || | 32 return scriptName.contains('sdk/tests/compiler/dart2js_native') || |
33 scriptName.contains('sdk/tests/compiler/dart2js_extra'); | 33 scriptName.contains('sdk/tests/compiler/dart2js_extra'); |
34 } | 34 } |
35 bool allowedDartLibary() { | 35 bool allowedDartLibary() { |
36 Uri uri = library.canonicalUri; | 36 Uri uri = library.canonicalUri; |
37 if (uri.scheme != 'dart') return false; | 37 if (uri.scheme != 'dart') return false; |
38 return _allowedDartSchemePaths.contains(uri.path); | 38 return _allowedDartSchemePaths.contains(uri.path); |
39 } | 39 } |
40 | 40 |
41 return allowedTestLibrary() || allowedDartLibary(); | 41 return allowedTestLibrary() || |
| 42 allowedDartLibary() || |
| 43 compiler.options.allowNativeExtensions; |
42 } | 44 } |
OLD | NEW |