Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: pkg/compiler/lib/src/native/native.dart

Issue 2239193002: Rerun formatter (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | pkg/compiler/lib/src/options.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 15 matching lines...) Expand all
26 'web_gl', 26 'web_gl',
27 'web_sql' 27 'web_sql'
28 ]; 28 ];
29 29
30 bool maybeEnableNative(Compiler compiler, LibraryElement library) { 30 bool maybeEnableNative(Compiler compiler, LibraryElement library) {
31 bool allowedTestLibrary() { 31 bool allowedTestLibrary() {
32 String scriptName = library.entryCompilationUnit.script.name; 32 String scriptName = library.entryCompilationUnit.script.name;
33 return scriptName.contains('sdk/tests/compiler/dart2js_native') || 33 return scriptName.contains('sdk/tests/compiler/dart2js_native') ||
34 scriptName.contains('sdk/tests/compiler/dart2js_extra'); 34 scriptName.contains('sdk/tests/compiler/dart2js_extra');
35 } 35 }
36
36 bool allowedDartLibary() { 37 bool allowedDartLibary() {
37 Uri uri = library.canonicalUri; 38 Uri uri = library.canonicalUri;
38 if (uri.scheme != 'dart') return false; 39 if (uri.scheme != 'dart') return false;
39 return _allowedDartSchemePaths.contains(uri.path); 40 return _allowedDartSchemePaths.contains(uri.path);
40 } 41 }
41 42
42 return allowedTestLibrary() || 43 return allowedTestLibrary() ||
43 allowedDartLibary() || 44 allowedDartLibary() ||
44 compiler.options.allowNativeExtensions; 45 compiler.options.allowNativeExtensions;
45 } 46 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | pkg/compiler/lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698