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

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

Issue 1762723002: Cleanup 1: split parts into their own libraries, remove unused imports (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
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 'dart:collection' show Queue; 7 import '../compiler.dart' show Compiler;
8 import '../elements/elements.dart';
8 9
9 import '../common.dart'; 10 export 'behavior.dart';
10 import '../common/backend_api.dart' show 11 export 'enqueue.dart';
11 ForeignResolver; 12 export 'js.dart';
12 import '../common/registry.dart' show 13 export 'scanner.dart';
13 Registry; 14 export 'ssa.dart';
14 import '../common/resolution.dart' show
15 Parsing,
16 Resolution;
17 import '../compiler.dart' show
18 Compiler;
19 import '../constants/values.dart';
20 import '../core_types.dart' show
21 CoreTypes;
22 import '../dart_types.dart';
23 import '../enqueue.dart' show
24 Enqueuer,
25 ResolutionEnqueuer;
26 import '../elements/elements.dart';
27 import '../elements/modelx.dart' show
28 BaseClassElementX,
29 ElementX,
30 FunctionElementX,
31 LibraryElementX;
32 import '../js/js.dart' as js;
33 import '../js_backend/backend_helpers.dart' show
34 BackendHelpers;
35 import '../js_backend/js_backend.dart';
36 import '../js_emitter/js_emitter.dart' show
37 CodeEmitterTask,
38 NativeEmitter;
39 import '../parser/listener.dart' show
40 Listener;
41 import '../parser/element_listener.dart' show
42 ElementListener;
43 import '../ssa/ssa.dart';
44 import '../tokens/token.dart' show
45 BeginGroupToken,
46 Token;
47 import '../tokens/token_constants.dart' as Tokens show
48 EOF_TOKEN,
49 STRING_TOKEN;
50 import '../tree/tree.dart';
51 import '../universe/side_effects.dart' show
52 SideEffects;
53 import '../util/util.dart';
54
55 part 'behavior.dart';
56 part 'enqueue.dart';
57 part 'js.dart';
58 part 'scanner.dart';
59 part 'ssa.dart';
60 15
61 bool maybeEnableNative(Compiler compiler, 16 bool maybeEnableNative(Compiler compiler,
62 LibraryElement library) { 17 LibraryElement library) {
63 String libraryName = library.canonicalUri.toString(); 18 String libraryName = library.canonicalUri.toString();
64 if (library.entryCompilationUnit.script.name.contains( 19 if (library.entryCompilationUnit.script.name.contains(
65 'sdk/tests/compiler/dart2js_native') 20 'sdk/tests/compiler/dart2js_native')
66 || library.entryCompilationUnit.script.name.contains( 21 || library.entryCompilationUnit.script.name.contains(
67 'sdk/tests/compiler/dart2js_extra') 22 'sdk/tests/compiler/dart2js_extra')
68 || libraryName == 'dart:async' 23 || libraryName == 'dart:async'
69 || libraryName == 'dart:html' 24 || libraryName == 'dart:html'
70 || libraryName == 'dart:html_common' 25 || libraryName == 'dart:html_common'
71 || libraryName == 'dart:indexed_db' 26 || libraryName == 'dart:indexed_db'
72 || libraryName == 'dart:js' 27 || libraryName == 'dart:js'
73 || libraryName == 'dart:svg' 28 || libraryName == 'dart:svg'
74 || libraryName == 'dart:_native_typed_data' 29 || libraryName == 'dart:_native_typed_data'
75 || libraryName == 'dart:web_audio' 30 || libraryName == 'dart:web_audio'
76 || libraryName == 'dart:web_gl' 31 || libraryName == 'dart:web_gl'
77 || libraryName == 'dart:web_sql' 32 || libraryName == 'dart:web_sql'
78 || compiler.allowNativeExtensions) { 33 || compiler.allowNativeExtensions) {
79 return true; 34 return true;
80 } 35 }
81 return false; 36 return false;
82 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698