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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 12919005: Fix induction variable detection. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 168
169 169
170 // This method is recursive but it is guaranteed to terminate because 170 // This method is recursive but it is guaranteed to terminate because
171 // RedefinedOperand() always dominates "this". 171 // RedefinedOperand() always dominates "this".
172 bool HValue::IsRelationTrue(NumericRelation relation, 172 bool HValue::IsRelationTrue(NumericRelation relation,
173 HValue* other, 173 HValue* other,
174 int offset, 174 int offset,
175 int scale) { 175 int scale) {
176 if (this == other) { 176 if (this == other) {
177 return NumericRelation::Eq().Implies(relation); 177 return scale == 0 && relation.IsExtendable(offset);
178 } 178 }
179 179
180 // Test the direct relation. 180 // Test the direct relation.
181 if (IsRelationTrueInternal(relation, other, offset, scale)) return true; 181 if (IsRelationTrueInternal(relation, other, offset, scale)) return true;
182 182
183 // If scale is 0 try the reversed relation. 183 // If scale is 0 try the reversed relation.
184 if (scale == 0 && 184 if (scale == 0 &&
185 // TODO(mmassi): do we need the full, recursive IsRelationTrue? 185 // TODO(mmassi): do we need the full, recursive IsRelationTrue?
186 other->IsRelationTrueInternal(relation.Reversed(), this, -offset)) { 186 other->IsRelationTrueInternal(relation.Reversed(), this, -offset)) {
187 return true; 187 return true;
(...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3518 3518
3519 3519
3520 void HCheckFunction::Verify() { 3520 void HCheckFunction::Verify() {
3521 HInstruction::Verify(); 3521 HInstruction::Verify();
3522 ASSERT(HasNoUses()); 3522 ASSERT(HasNoUses());
3523 } 3523 }
3524 3524
3525 #endif 3525 #endif
3526 3526
3527 } } // namespace v8::internal 3527 } } // namespace v8::internal
OLDNEW
« 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