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

Unified Diff: pkg/compiler/lib/src/ssa/codegen_helpers.dart

Issue 1031993002: dart2js: permit generation of conditionals as arguments of allocations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/codegen_helpers.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen_helpers.dart b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
index 98db71e1a9dcbb2aa44d9222014e264e357ec4b0..531f3233a2eef8a2b005180af9204b490bf80a54 100644
--- a/pkg/compiler/lib/src/ssa/codegen_helpers.dart
+++ b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
@@ -637,6 +637,9 @@ class SsaConditionMerger extends HGraphVisitor {
}
bool isSafeToGenerateAtUseSite(HInstruction user, HInstruction input) {
+ // HForeignNew evaluates arguments in order and passes them to a
+ // constructor.
+ if (user is HForeignNew) return true;
// A [HForeign] instruction uses operators and if we generate
// [input] at use site, the precedence might be wrong.
if (user is HForeign) return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698