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

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

Issue 11186048: Fix bad mangling of environment parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update comments. Created 8 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: lib/compiler/implementation/ssa/variable_allocator.dart
diff --git a/lib/compiler/implementation/ssa/variable_allocator.dart b/lib/compiler/implementation/ssa/variable_allocator.dart
index 8844a8c63c1ecb8e061fdda21edce8139dde40b4..cf149b17d3a1f9dac9387f3e974130a11c81c1db 100644
--- a/lib/compiler/implementation/ssa/variable_allocator.dart
+++ b/lib/compiler/implementation/ssa/variable_allocator.dart
@@ -432,10 +432,14 @@ class VariableNamer {
VariableNamer(LiveEnvironment environment, this.names, this.parameterNames)
: usedNames = new Set<String>(),
freeTemporaryNames = new List<String>() {
- // [VariableNames.swapTemp] and [VariableNames.stateName] are being used
- // throughout the function. Therefore we make sure no one uses it at any
- // time.
+ // [VariableNames.swapTemp] is used when there is a cycle in a copy handler.
+ // Therefore we make sure no one uses it.
usedNames.add(names.swapTemp);
+ // [VariableNames.stateName] is being used throughout a bailout function.
+ // Whenever a bailout-target is reached we set the state-variable to 0. We
+ // must therefore not have any local variable that could clash with the
+ // state variable.
+ // Therefore we make sure no one uses it at any time.
usedNames.add(names.stateName);
// All liveIns instructions must have a name at this point, so we

Powered by Google App Engine
This is Rietveld 408576698