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

Unified Diff: src/hydrogen.cc

Issue 14244023: Inline isUint32() method from HConstant, which was only used in one place. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | src/hydrogen-instructions.h » ('j') | src/hydrogen-instructions.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 09e3fe9c47310195bc269cc6fa55da7dd9c44acf..3c439825f4103d4041f0bdf2971e29da0321cf76 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3852,7 +3852,8 @@ bool Uint32Analysis::CheckPhiOperands(HPhi* phi) {
if (!operand->CheckFlag(HInstruction::kUint32)) {
// Lazyly mark constants that fit into uint32 range with kUint32 flag.
if (operand->IsConstant() &&
- HConstant::cast(operand)->IsUint32()) {
+ HConstant::cast(operand)->HasInteger32Value() &&
+ HConstant::cast(operand)->Integer32Value() >= 0) {
Sven Panne 2013/04/18 09:46:23 operand->IsInteger32Constant() && operarand->GetIn
operand->SetFlag(HInstruction::kUint32);
continue;
}
@@ -8622,9 +8623,7 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall(
} else if (exponent == 2.0) {
result = HMul::New(zone(), context, left, left);
}
- } else if (right->IsConstant() &&
- HConstant::cast(right)->HasInteger32Value() &&
- HConstant::cast(right)->Integer32Value() == 2) {
+ } else if (right->EqualsInteger32Constant(2)) {
result = HMul::New(zone(), context, left, left);
}
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | src/hydrogen-instructions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698