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

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

Issue 14487008: When a phi is generated at use site, the names of its inputs must be freed by the user of the phi. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | tests/language/issue10204_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 22108)
+++ sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart (working copy)
@@ -231,9 +231,7 @@
void markAsLiveInEnvironment(HInstruction instruction,
LiveEnvironment environment) {
- // The inputs of a [HPhi] are being handled at the entry of a
- // block.
- if (generateAtUseSite.contains(instruction) && instruction is !HPhi) {
+ if (generateAtUseSite.contains(instruction)) {
markInputsAsLiveInEnvironment(instruction, environment);
} else {
environment.add(instruction, instructionId);
@@ -302,7 +300,9 @@
// We just remove the phis from the environment. The inputs of the
// phis will be put in the environment of the predecessors.
for (HPhi phi = block.phis.first; phi != null; phi = phi.next) {
- environment.remove(phi, instructionId);
+ if (!generateAtUseSite.contains(phi)) {
+ environment.remove(phi, instructionId);
+ }
}
// Save the liveInstructions of that block.
« no previous file with comments | « no previous file | tests/language/issue10204_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698