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

Side by Side Diff: pkg/kernel/lib/target/vmreify.dart

Issue 2697873007: Merge the work on Generic Types Reification from 'dart-lang/reify' repo (Closed)
Patch Set: Get back parameter erroneously removed by previous commit 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
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
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.
4 library kernel.target.vmreify;
5
6 import '../ast.dart' show Program;
7 import '../transformations/generic_types_reification.dart' as reify
8 show transformProgram;
9
10 import 'targets.dart' show TargetFlags;
11 import 'vmcc.dart' as vmcc_target;
12
13 /// Specializes the kernel IR to the Dart VM with reified generic types.
14 class VmGenericTypesReifiedTarget extends vmcc_target.VmClosureConvertedTarget {
15 VmGenericTypesReifiedTarget(TargetFlags flags) : super(flags);
16
17 @override
18 String get name => "vmreify";
19
20 // This is the order that bootstrap libraries are loaded according to
21 // `runtime/vm/object_store.h`.
22 List<String> get extraRequiredLibraries {
23 return new List<String>.from(super.extraRequiredLibraries)
24 ..add("${flags.kernelRuntime.resolve('reify/types.dart')}")
25 ..add("${flags.kernelRuntime.resolve('reify/declarations.dart')}")
26 ..add("${flags.kernelRuntime.resolve('reify/interceptors.dart')}");
27 }
28
29 @override
30 void performGlobalTransformations(Program program) {
31 super.performGlobalTransformations(program);
32 // TODO(dmitryas) this transformation should be made modular
33 reify.transformProgram(program);
34 }
35
36 // Disable tree shaking for Generic Types Reification. There are some runtime
37 // libraries that are required for the transformation and are shaken off,
38 // because they aren't invoked from the program being transformed prior to
39 // the transformation.
40 // TODO(dmitryas): remove this when the libraries are in dart:_internal
41 @override
42 void performTreeShaking(Program program) {}
43 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/target/vm.dart ('k') | pkg/kernel/lib/transformations/generic_types_reification.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698