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

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

Issue 10540044: With the change on how we allocate names on HCheck instructions, I need to adjust slightly how we r… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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: dart/lib/compiler/implementation/ssa/codegen.dart
===================================================================
--- dart/lib/compiler/implementation/ssa/codegen.dart (revision 8385)
+++ dart/lib/compiler/implementation/ssa/codegen.dart (working copy)
@@ -2518,11 +2518,15 @@
bool visitTryInfo(HTryBlockInformation info) => false;
bool visitSequenceInfo(HStatementSequenceInformation info) => false;
- // For instructions that reference a guard or a check, we change that
- // reference to the instruction they guard against. Therefore, we must
- // use that instruction when restoring the environment.
+ // If argument is a [HCheck] and it does not have a name, we try to
+ // find the name of its checked input. Note that there must be a
+ // name, otherwise the instruction would not be in the live
+ // environment.
HInstruction unwrap(argument) {
- while (argument is HCheck) argument = argument.checkedInput;
+ while (argument is HCheck && !variableNames.hasName(argument)) {
+ argument = argument.checkedInput;
+ }
+ assert(variableNames.hasName(argument));
return argument;
}
« 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