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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2913013003: Move enableNative to target, turn it on by default (Closed)
Patch Set: cl comments + rebase Created 3 years, 6 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) 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 4
5 library fasta.outline_builder; 5 library fasta.outline_builder;
6 6
7 import 'package:kernel/ast.dart' show ProcedureKind; 7 import 'package:kernel/ast.dart' show ProcedureKind;
8 8
9 import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip; 9 import '../fasta_codes.dart' show FastaMessage, codeExpectedBlockToSkip;
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 class OutlineBuilder extends UnhandledListener { 48 class OutlineBuilder extends UnhandledListener {
49 final SourceLibraryBuilder library; 49 final SourceLibraryBuilder library;
50 50
51 final bool enableNative; 51 final bool enableNative;
52 52
53 String nativeMethodName; 53 String nativeMethodName;
54 54
55 OutlineBuilder(SourceLibraryBuilder library) 55 OutlineBuilder(SourceLibraryBuilder library)
56 : library = library, 56 : library = library,
57 enableNative = (library.uri.scheme == "dart" || library.isPatch); 57 enableNative = library.loader.target.enableNative(library);
58 58
59 @override 59 @override
60 Uri get uri => library.fileUri; 60 Uri get uri => library.fileUri;
61 61
62 @override 62 @override
63 int popCharOffset() => pop(); 63 int popCharOffset() => pop();
64 64
65 List<String> popIdentifierList(int count) { 65 List<String> popIdentifierList(int count) {
66 if (count == 0) return null; 66 if (count == 0) return null;
67 List<String> list = new List<String>.filled(count, null, growable: true); 67 List<String> list = new List<String>.filled(count, null, growable: true);
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 Link<Token> handleMemberName(Link<Token> identifiers) { 797 Link<Token> handleMemberName(Link<Token> identifiers) {
798 if (!enableNative || identifiers.isEmpty) return identifiers; 798 if (!enableNative || identifiers.isEmpty) return identifiers;
799 return removeNativeClause(identifiers); 799 return removeNativeClause(identifiers);
800 } 800 }
801 801
802 @override 802 @override
803 void debugEvent(String name) { 803 void debugEvent(String name) {
804 // printEvent(name); 804 // printEvent(name);
805 } 805 }
806 } 806 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_listener.dart ('k') | pkg/front_end/lib/src/fasta/target_implementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698