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

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: Use IsInteger32Constant() and GetInteger32Constant() 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') | no next file with comments »
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..6174886f8cf231fb9635b82002cde858aab4e36b 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3851,8 +3851,8 @@ bool Uint32Analysis::CheckPhiOperands(HPhi* phi) {
HValue* operand = phi->OperandAt(j);
if (!operand->CheckFlag(HInstruction::kUint32)) {
// Lazyly mark constants that fit into uint32 range with kUint32 flag.
- if (operand->IsConstant() &&
- HConstant::cast(operand)->IsUint32()) {
+ if (operand->IsInteger32Constant() &&
+ operand->GetInteger32Constant() >= 0) {
operand->SetFlag(HInstruction::kUint32);
continue;
}
@@ -8622,9 +8622,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698