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

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

Issue 2619193003: Insert implicit downcasts in kernel strong mode. (Closed)
Patch Set: Merge Created 3 years, 11 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/kernel/lib/repository.dart ('k') | pkg/kernel/lib/text/ast_to_text.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 library kernel.target.vm; 4 library kernel.target.vm;
5 5
6 import '../ast.dart'; 6 import '../ast.dart';
7 import '../transformations/continuation.dart' as cont; 7 import '../transformations/continuation.dart' as cont;
8 import '../transformations/erasure.dart'; 8 import '../transformations/erasure.dart';
9 import '../transformations/insert_type_checks.dart';
9 import '../transformations/mixin_full_resolution.dart' as mix; 10 import '../transformations/mixin_full_resolution.dart' as mix;
10 import '../transformations/sanitize_for_vm.dart'; 11 import '../transformations/sanitize_for_vm.dart';
11 import '../transformations/setup_builtin_library.dart' as setup_builtin_library; 12 import '../transformations/setup_builtin_library.dart' as setup_builtin_library;
12 import 'targets.dart'; 13 import 'targets.dart';
13 14
14 /// Specializes the kernel IR to the Dart VM. 15 /// Specializes the kernel IR to the Dart VM.
15 class VmTarget extends Target { 16 class VmTarget extends Target {
16 final TargetFlags flags; 17 final TargetFlags flags;
17 18
18 VmTarget(this.flags); 19 VmTarget(this.flags);
(...skipping 26 matching lines...) Expand all
45 'dart:typed_data', 46 'dart:typed_data',
46 'dart:vmservice_io', 47 'dart:vmservice_io',
47 'dart:_vmservice', 48 'dart:_vmservice',
48 'dart:_builtin', 49 'dart:_builtin',
49 'dart:nativewrappers', 50 'dart:nativewrappers',
50 'dart:io', 51 'dart:io',
51 ]; 52 ];
52 53
53 void transformProgram(Program program) { 54 void transformProgram(Program program) {
54 new mix.MixinFullResolution().transform(program); 55 new mix.MixinFullResolution().transform(program);
56
57 if (strongMode) {
58 new InsertTypeChecks().transformProgram(program);
59 }
60
55 cont.transformProgram(program); 61 cont.transformProgram(program);
56 62
57 // Repair `_getMainClosure()` function in dart:_builtin. 63 // Repair `_getMainClosure()` function in dart:_builtin.
58 setup_builtin_library.transformProgram(program); 64 setup_builtin_library.transformProgram(program);
59 65
60 if (strongMode) { 66 if (strongMode) {
61 new Erasure().transform(program); 67 new Erasure().transform(program);
62 } 68 }
63 69
64 new SanitizeForVM().transform(program); 70 new SanitizeForVM().transform(program);
65 } 71 }
66 } 72 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/repository.dart ('k') | pkg/kernel/lib/text/ast_to_text.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698