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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart

Issue 2895983002: Read SDK and patches from a JSON file. (Closed)
Patch Set: Merged with 1333f97b9a0e3805f991578ef83b0ec4553ecf33 Created 3 years, 7 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.kernel_library_builder; 5 library fasta.kernel_library_builder;
6 6
7 import 'package:front_end/src/scanner/token.dart' show Token; 7 import 'package:front_end/src/scanner/token.dart' show Token;
8 8
9 import 'package:kernel/ast.dart'; 9 import 'package:kernel/ast.dart';
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ProcedureBuilder, 54 ProcedureBuilder,
55 Scope, 55 Scope,
56 TypeBuilder, 56 TypeBuilder,
57 TypeVariableBuilder, 57 TypeVariableBuilder,
58 compareProcedures; 58 compareProcedures;
59 59
60 class KernelLibraryBuilder 60 class KernelLibraryBuilder
61 extends SourceLibraryBuilder<KernelTypeBuilder, Library> { 61 extends SourceLibraryBuilder<KernelTypeBuilder, Library> {
62 final Library library; 62 final Library library;
63 63
64 final bool isPatch;
65
64 final Map<String, SourceClassBuilder> mixinApplicationClasses = 66 final Map<String, SourceClassBuilder> mixinApplicationClasses =
65 <String, SourceClassBuilder>{}; 67 <String, SourceClassBuilder>{};
66 68
67 final List<List> argumentsWithMissingDefaultValues = <List>[]; 69 final List<List> argumentsWithMissingDefaultValues = <List>[];
68 70
69 final List<KernelProcedureBuilder> nativeMethods = <KernelProcedureBuilder>[]; 71 final List<KernelProcedureBuilder> nativeMethods = <KernelProcedureBuilder>[];
70 72
71 final List<KernelTypeVariableBuilder> boundlessTypeVariables = 73 final List<KernelTypeVariableBuilder> boundlessTypeVariables =
72 <KernelTypeVariableBuilder>[]; 74 <KernelTypeVariableBuilder>[];
73 75
74 KernelLibraryBuilder(Uri uri, Uri fileUri, Loader loader) 76 KernelLibraryBuilder(Uri uri, Uri fileUri, Loader loader, this.isPatch)
75 : library = new Library(uri, fileUri: relativizeUri(fileUri)), 77 : library = new Library(uri, fileUri: relativizeUri(fileUri)),
76 super(loader, fileUri); 78 super(loader, fileUri);
77 79
78 Library get target => library; 80 Library get target => library;
79 81
80 Uri get uri => library.importUri; 82 Uri get uri => library.importUri;
81 83
82 KernelTypeBuilder addNamedType( 84 KernelTypeBuilder addNamedType(
83 String name, List<KernelTypeBuilder> arguments, int charOffset) { 85 String name, List<KernelTypeBuilder> arguments, int charOffset) {
84 return addType( 86 return addType(
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 mixinApplicationClasses.putIfAbsent(name, () => builder); 845 mixinApplicationClasses.putIfAbsent(name, () => builder);
844 if (existing != builder) { 846 if (existing != builder) {
845 part.scope.local.remove(name); 847 part.scope.local.remove(name);
846 } 848 }
847 }); 849 });
848 super.includePart(part); 850 super.includePart(part);
849 nativeMethods.addAll(part.nativeMethods); 851 nativeMethods.addAll(part.nativeMethods);
850 boundlessTypeVariables.addAll(part.boundlessTypeVariables); 852 boundlessTypeVariables.addAll(part.boundlessTypeVariables);
851 } 853 }
852 } 854 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/body_builder.dart ('k') | pkg/front_end/lib/src/fasta/kernel/kernel_target.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698