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

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

Issue 10442110: Fully unwrap a HCheck instruction to a real non-checked instruction. In case the check does not hav… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 7 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 8146)
+++ dart/lib/compiler/implementation/ssa/codegen.dart (working copy)
@@ -2287,19 +2287,9 @@
// 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.
- HInstruction unwrap(HInstruction argument) {
- if (argument is HIntegerCheck) {
- HIntegerCheck instruction = argument;
- return unwrap(instruction.value);
- } else if (argument is HBoundsCheck) {
- HBoundsCheck instruction = argument;
- return unwrap(instruction.index);
- } else if (argument is HTypeGuard) {
- HTypeGuard instruction = argument;
- return unwrap(instruction.guarded);
- } else {
- return argument;
- }
+ HInstruction unwrap(argument) {
+ while (argument is HCheck) argument = argument.checkedInput;
+ return argument;
}
bool visitAndOrInfo(HAndOrBlockInformation info) => 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