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

Side by Side Diff: pkg/front_end/lib/src/fasta/dill/dill_target.dart

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Merged with 4df146dd9a465d63344330bf3e45524b927c92ec Created 3 years, 5 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.dill_target; 5 library fasta.dill_target;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'package:kernel/ast.dart' show Class; 9 import 'package:kernel/ast.dart' show Class;
10 10
11 import 'package:kernel/target/targets.dart' show Target; 11 import 'package:kernel/target/targets.dart' show Target;
12 12
13 import '../errors.dart' show internalError; 13 import '../deprecated_problems.dart' show deprecated_internalProblem;
14 import '../kernel/kernel_builder.dart' show ClassBuilder; 14 import '../kernel/kernel_builder.dart' show ClassBuilder;
15 import '../target_implementation.dart' show TargetImplementation; 15 import '../target_implementation.dart' show TargetImplementation;
16 import '../ticker.dart' show Ticker; 16 import '../ticker.dart' show Ticker;
17 import '../translate_uri.dart' show TranslateUri; 17 import '../translate_uri.dart' show TranslateUri;
18 import 'dill_library_builder.dart' show DillLibraryBuilder; 18 import 'dill_library_builder.dart' show DillLibraryBuilder;
19 import 'dill_loader.dart' show DillLoader; 19 import 'dill_loader.dart' show DillLoader;
20 20
21 class DillTarget extends TargetImplementation { 21 class DillTarget extends TargetImplementation {
22 bool isLoaded = false; 22 bool isLoaded = false;
23 DillLoader loader; 23 DillLoader loader;
24 24
25 DillTarget(Ticker ticker, TranslateUri uriTranslator, Target backendTarget) 25 DillTarget(Ticker ticker, TranslateUri uriTranslator, Target backendTarget)
26 : super(ticker, uriTranslator, backendTarget) { 26 : super(ticker, uriTranslator, backendTarget) {
27 loader = new DillLoader(this); 27 loader = new DillLoader(this);
28 } 28 }
29 29
30 void addSourceInformation( 30 void addSourceInformation(
31 Uri uri, List<int> lineStarts, List<int> sourceCode) { 31 Uri uri, List<int> lineStarts, List<int> sourceCode) {
32 internalError("Unsupported operation."); 32 deprecated_internalProblem("Unsupported operation.");
33 } 33 }
34 34
35 void read(Uri uri) { 35 void read(Uri uri) {
36 internalError("Unsupported operation."); 36 deprecated_internalProblem("Unsupported operation.");
37 } 37 }
38 38
39 @override 39 @override
40 Future<Null> buildProgram() { 40 Future<Null> buildProgram() {
41 return internalError("not implemented."); 41 return deprecated_internalProblem("not implemented.");
42 } 42 }
43 43
44 @override 44 @override
45 Future<Null> buildOutlines() async { 45 Future<Null> buildOutlines() async {
46 if (loader.libraries.isNotEmpty) { 46 if (loader.libraries.isNotEmpty) {
47 await loader.buildOutlines(); 47 await loader.buildOutlines();
48 } 48 }
49 isLoaded = true; 49 isLoaded = true;
50 } 50 }
51 51
52 DillLibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri, bool isPatch) { 52 DillLibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri, bool isPatch) {
53 assert(!isPatch); 53 assert(!isPatch);
54 return new DillLibraryBuilder(uri, loader); 54 return new DillLibraryBuilder(uri, loader);
55 } 55 }
56 56
57 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) {} 57 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) {}
58 58
59 List<ClassBuilder> collectAllClasses() { 59 List<ClassBuilder> collectAllClasses() {
60 return null; 60 return null;
61 } 61 }
62 62
63 void breakCycle(ClassBuilder cls) {} 63 void breakCycle(ClassBuilder cls) {}
64 64
65 Class get objectClass => loader.coreLibrary["Object"].target; 65 Class get objectClass => loader.coreLibrary["Object"].target;
66 } 66 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart ('k') | pkg/front_end/lib/src/fasta/dill/dill_typedef_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698