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

Side by Side Diff: pkg/front_end/lib/src/fasta/analyzer/compile_platform_dartk.dart

Issue 2723113002: Consolidate analyzer dependencies. (Closed)
Patch Set: Remove new dependency on AsyncMarker. Created 3 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) 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.compile_platform; 5 library fasta.compile_platform;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:io' show File, IOSink; 9 import 'dart:io' show File, IOSink;
10 10
11 import 'package:analyzer/src/generated/source.dart' show Source; 11 import 'package:analyzer/src/generated/source.dart' show Source;
12 12
13 import 'package:analyzer/dart/element/element.dart' 13 import 'package:analyzer/dart/element/element.dart'
14 show ExportElement, LibraryElement; 14 show ExportElement, LibraryElement;
15 15
16 import 'package:kernel/ast.dart' 16 import 'package:kernel/ast.dart'
17 show Field, Library, Name, Program, StringLiteral; 17 show Field, Library, Name, Program, StringLiteral;
18 18
19 import 'package:kernel/binary/ast_to_binary.dart' show BinaryPrinter; 19 import 'package:kernel/binary/ast_to_binary.dart' show BinaryPrinter;
20 20
21 import 'package:kernel/analyzer/loader.dart' 21 import 'package:kernel/analyzer/loader.dart'
22 show DartLoader, DartOptions, createDartSdk; 22 show DartLoader, DartOptions, createDartSdk;
23 23
24 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget; 24 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget;
25 25
26 import 'package:kernel/ast.dart' show Program; 26 import 'package:kernel/ast.dart' show Program;
27 27
28 import 'environment_variable.dart' 28 import '../environment_variable.dart'
29 show EnvironmentVariableDirectory, fileExists; 29 show EnvironmentVariableDirectory, fileExists;
30 30
31 import 'errors.dart' show inputError; 31 import '../errors.dart' show inputError;
32 32
33 const EnvironmentVariableSdk dartAotSdk = const EnvironmentVariableSdk( 33 const EnvironmentVariableSdk dartAotSdk = const EnvironmentVariableSdk(
34 "DART_AOT_SDK", 34 "DART_AOT_SDK",
35 "The environment variable 'DART_AOT_SDK' should point to a patched SDK."); 35 "The environment variable 'DART_AOT_SDK' should point to a patched SDK.");
36 36
37 class EnvironmentVariableSdk extends EnvironmentVariableDirectory { 37 class EnvironmentVariableSdk extends EnvironmentVariableDirectory {
38 const EnvironmentVariableSdk(String name, String what) : super(name, what); 38 const EnvironmentVariableSdk(String name, String what) : super(name, what);
39 39
40 Future<Null> validate(String value) async { 40 Future<Null> validate(String value) async {
41 Uri sdk = Uri.base.resolveUri(new Uri.directory(value)); 41 Uri sdk = Uri.base.resolveUri(new Uri.directory(value));
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 isConst: true, 110 isConst: true,
111 initializer: literal, 111 initializer: literal,
112 fileUri: "${new Uri.file(source.fullName)}")..fileOffset = offset); 112 fileUri: "${new Uri.file(source.fullName)}")..fileOffset = offset);
113 } 113 }
114 } 114 }
115 115
116 IOSink sink = new File.fromUri(output).openWrite(); 116 IOSink sink = new File.fromUri(output).openWrite();
117 new BinaryPrinter(sink).writeProgramFile(program); 117 new BinaryPrinter(sink).writeProgramFile(program);
118 await sink.close(); 118 await sink.close();
119 } 119 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/analyzer_target.dart ('k') | pkg/front_end/lib/src/fasta/ast_kind.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698