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/target_implementation.dart

Issue 2691273002: Use kernel transformation and VmTarget. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/loader.dart ('k') | pkg/front_end/lib/src/fasta/testing/suite.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.target_implementation; 5 library fasta.target_implementation;
6 6
7 import 'package:kernel/target/vm.dart' show
8 VmTarget;
9
7 import 'builder/builder.dart' show 10 import 'builder/builder.dart' show
8 Builder, 11 Builder,
9 ClassBuilder, 12 ClassBuilder,
10 LibraryBuilder; 13 LibraryBuilder;
11 14
12 import 'loader.dart' show 15 import 'loader.dart' show
13 Loader; 16 Loader;
14 17
15 import 'target.dart' show 18 import 'target.dart' show
16 Target; 19 Target;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 60 }
58 61
59 /// Returns a reference to the constructor used for creating `native` 62 /// Returns a reference to the constructor used for creating `native`
60 /// annotations. The constructor is expected to accept a single argument of 63 /// annotations. The constructor is expected to accept a single argument of
61 /// type String, which is the name of the native method. 64 /// type String, which is the name of the native method.
62 Builder getNativeAnnotation(Loader loader) { 65 Builder getNativeAnnotation(Loader loader) {
63 if (cachedNativeAnnotation != null) return cachedNativeAnnotation; 66 if (cachedNativeAnnotation != null) return cachedNativeAnnotation;
64 LibraryBuilder internal = loader.read(Uri.parse("dart:_internal")); 67 LibraryBuilder internal = loader.read(Uri.parse("dart:_internal"));
65 return cachedNativeAnnotation = internal.getConstructor("ExternalName"); 68 return cachedNativeAnnotation = internal.getConstructor("ExternalName");
66 } 69 }
70
71 void loadExtraRequiredLibraries(Loader loader) {
72 for (String uri in new VmTarget(null).extraRequiredLibraries) {
73 loader.read(Uri.parse(uri));
74 }
75 }
67 } 76 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/loader.dart ('k') | pkg/front_end/lib/src/fasta/testing/suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698