| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index a6205ecdf5a6de3e10dbd6cd219a6faef1010434..8bbc42d801a7310c4f4ea3511f5d0d5d3d500312 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -891,7 +891,8 @@ class HRangeAnalysis BASE_EMBEDDED {
|
| private:
|
| void TraceRange(const char* msg, ...);
|
| void Analyze(HBasicBlock* block);
|
| - void InferControlFlowRange(HCompareIDAndBranch* test, HBasicBlock* dest);
|
| + void InferControlFlowRange(HCompareNumbersAndBranch* test,
|
| + HBasicBlock* dest);
|
| void UpdateControlFlowRange(Token::Value op, HValue* value, HValue* other);
|
| void InferRange(HValue* value);
|
| void RollBackTo(int index);
|
| @@ -926,8 +927,9 @@ void HRangeAnalysis::Analyze(HBasicBlock* block) {
|
| // Infer range based on control flow.
|
| if (block->predecessors()->length() == 1) {
|
| HBasicBlock* pred = block->predecessors()->first();
|
| - if (pred->end()->IsCompareIDAndBranch()) {
|
| - InferControlFlowRange(HCompareIDAndBranch::cast(pred->end()), block);
|
| + if (pred->end()->IsCompareNumbersAndBranch()) {
|
| + InferControlFlowRange(HCompareNumbersAndBranch::cast(pred->end()),
|
| + block);
|
| }
|
| }
|
|
|
| @@ -953,7 +955,7 @@ void HRangeAnalysis::Analyze(HBasicBlock* block) {
|
| }
|
|
|
|
|
| -void HRangeAnalysis::InferControlFlowRange(HCompareIDAndBranch* test,
|
| +void HRangeAnalysis::InferControlFlowRange(HCompareNumbersAndBranch* test,
|
| HBasicBlock* dest) {
|
| ASSERT((test->FirstSuccessor() == dest) == (test->SecondSuccessor() != dest));
|
| if (test->GetInputRepresentation().IsInteger32()) {
|
| @@ -1936,8 +1938,8 @@ void HGraph::MarkDeoptimizeOnUndefined() {
|
| HPhase phase("MarkDeoptimizeOnUndefined", this);
|
| // Compute DeoptimizeOnUndefined flag for phis.
|
| // Any phi that can reach a use with DeoptimizeOnUndefined set must
|
| - // have DeoptimizeOnUndefined set. Currently only HCompareIDAndBranch, with
|
| - // double input representation, has this flag set.
|
| + // have DeoptimizeOnUndefined set. Currently only HCompareNumbersAndBranch,
|
| + // with double input representation, has this flag set.
|
| // The flag is used by HChange tagged->double, which must deoptimize
|
| // if one of its uses has this flag set.
|
| for (int i = 0; i < phi_list()->length(); i++) {
|
| @@ -2673,10 +2675,10 @@ void HGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) {
|
| // Otherwise generate a compare and branch.
|
| CHECK_ALIVE(VisitForValue(clause->label()));
|
| HValue* label_value = Pop();
|
| - HCompareIDAndBranch* compare =
|
| - new(zone()) HCompareIDAndBranch(tag_value,
|
| - label_value,
|
| - Token::EQ_STRICT);
|
| + HCompareNumbersAndBranch* compare =
|
| + new(zone()) HCompareNumbersAndBranch(tag_value,
|
| + label_value,
|
| + Token::EQ_STRICT);
|
| compare->SetInputRepresentation(Representation::Integer32());
|
| HBasicBlock* body_block = graph()->CreateBasicBlock();
|
| HBasicBlock* next_test_block = graph()->CreateBasicBlock();
|
| @@ -5756,8 +5758,8 @@ void HGraphBuilder::VisitCompareOperation(CompareOperation* expr) {
|
| result->set_position(expr->position());
|
| return ast_context()->ReturnInstruction(result, expr->id());
|
| } else {
|
| - HCompareIDAndBranch* result =
|
| - new(zone()) HCompareIDAndBranch(left, right, op);
|
| + HCompareNumbersAndBranch* result =
|
| + new(zone()) HCompareNumbersAndBranch(left, right, op);
|
| result->set_position(expr->position());
|
| result->SetInputRepresentation(r);
|
| return ast_context()->ReturnControl(result, expr->id());
|
|
|