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

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

Issue 2919003003: Reapply "Use backend targets to run Kernel transformations in Fasta" (Closed)
Patch Set: Follow dartanalyzer suggestions 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.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 getTarget; 11 import 'package:kernel/target/targets.dart' show getTarget, TargetFlags;
12 12
13 import '../errors.dart' show internalError; 13 import '../errors.dart' show internalError;
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( 25 DillTarget(
26 Ticker ticker, TranslateUri uriTranslator, String backendTargetName) 26 Ticker ticker, TranslateUri uriTranslator, String backendTargetName,
27 : super(ticker, uriTranslator, getTarget(backendTargetName, null)) { 27 {TargetFlags flags})
28 : super(ticker, uriTranslator,
29 getTarget(backendTargetName, flags ?? new TargetFlags())) {
ahe 2017/06/02 14:07:46 Since we need to pass in TargetFlags now, perhaps
Dmitry Stefantsov 2017/06/02 14:28:53 Sorry for missing this comment before landing. I a
ahe 2017/06/02 14:30:19 Great!
28 loader = new DillLoader(this); 30 loader = new DillLoader(this);
29 } 31 }
30 32
31 void addSourceInformation( 33 void addSourceInformation(
32 Uri uri, List<int> lineStarts, List<int> sourceCode) { 34 Uri uri, List<int> lineStarts, List<int> sourceCode) {
33 internalError("Unsupported operation."); 35 internalError("Unsupported operation.");
34 } 36 }
35 37
36 void read(Uri uri) { 38 void read(Uri uri) {
37 internalError("Unsupported operation."); 39 internalError("Unsupported operation.");
(...skipping 20 matching lines...) Expand all
58 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) {} 60 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set) {}
59 61
60 List<ClassBuilder> collectAllClasses() { 62 List<ClassBuilder> collectAllClasses() {
61 return null; 63 return null;
62 } 64 }
63 65
64 void breakCycle(ClassBuilder cls) {} 66 void breakCycle(ClassBuilder cls) {}
65 67
66 Class get objectClass => loader.coreLibrary["Object"].target; 68 Class get objectClass => loader.coreLibrary["Object"].target;
67 } 69 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/compiler_command_line.dart ('k') | pkg/front_end/lib/src/fasta/fasta.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698