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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart

Issue 44143002: Fix issue 12336: there was a bug when updating phis at exit of a block with a HTypeKnown instructio… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/tracer.dart ('k') | tests/language/issue12336_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart (revision 29323)
+++ sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart (working copy)
@@ -682,6 +682,10 @@
for (int i = 0; i < phi.inputs.length; i++) {
HInstruction input = phi.inputs[i];
HBasicBlock predecessor = phi.block.predecessors[i];
+ // A [HTypeKnown] instruction never has a name, but its checked
+ // input might, therefore we need to do a copy instead of an
+ // assignment.
+ while (input is HTypeKnown) input = input.inputs[0];
if (!needsName(input)) {
names.addAssignment(predecessor, input, phi);
} else {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/tracer.dart ('k') | tests/language/issue12336_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698