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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/target/vm.dart
diff --git a/pkg/kernel/lib/target/vm.dart b/pkg/kernel/lib/target/vm.dart
index e6c5d949a92f8fbec9c3453016582237fbddef08..855857c071fa2352dd75f07a01892f2bce0a898b 100644
--- a/pkg/kernel/lib/target/vm.dart
+++ b/pkg/kernel/lib/target/vm.dart
@@ -6,6 +6,7 @@ library kernel.target.vm;
import '../ast.dart';
import '../transformations/continuation.dart' as cont;
import '../transformations/erasure.dart';
+import '../transformations/insert_type_checks.dart';
import '../transformations/mixin_full_resolution.dart' as mix;
import '../transformations/sanitize_for_vm.dart';
import '../transformations/setup_builtin_library.dart' as setup_builtin_library;
@@ -52,6 +53,11 @@ class VmTarget extends Target {
void transformProgram(Program program) {
new mix.MixinFullResolution().transform(program);
+
+ if (strongMode) {
+ new InsertTypeChecks().transformProgram(program);
+ }
+
cont.transformProgram(program);
// Repair `_getMainClosure()` function in dart:_builtin.
« 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