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

Unified Diff: pkg/compiler/lib/src/cps_ir/remove_refinements.dart

Issue 1408783004: dart2js cps: Support --trust-primitives and --trust-type-annotations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merge Created 5 years, 2 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
Index: pkg/compiler/lib/src/cps_ir/remove_refinements.dart
diff --git a/pkg/compiler/lib/src/cps_ir/remove_refinements.dart b/pkg/compiler/lib/src/cps_ir/remove_refinements.dart
index 98f1c17a8867dd072bc56f7d1d30d89566f965a7..2d49c95602fa8a15541c90790d9de0ad6f4675a3 100644
--- a/pkg/compiler/lib/src/cps_ir/remove_refinements.dart
+++ b/pkg/compiler/lib/src/cps_ir/remove_refinements.dart
@@ -23,7 +23,11 @@ class RemoveRefinements extends TrampolineRecursiveVisitor implements Pass {
Expression next = node.body;
if (node.primitive is Refinement) {
Refinement refinement = node.primitive;
- refinement.value.definition.substituteFor(refinement);
+ Primitive value = refinement.value.definition;
+ if (refinement.hint != null && value.hint == null) {
+ value.hint = refinement.hint;
+ }
+ value.substituteFor(refinement);
refinement.destroy();
node.remove();
}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/insert_refinements.dart ('k') | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698