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

Side by Side Diff: src/hydrogen.cc

Issue 16870011: Also apply InferControlFlowRange to smi-based tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 2671 matching lines...) Expand 10 before | Expand all | Expand 10 after
2682 Analyze(block->dominated_blocks()->at(i)); 2682 Analyze(block->dominated_blocks()->at(i));
2683 } 2683 }
2684 2684
2685 RollBackTo(last_changed_range); 2685 RollBackTo(last_changed_range);
2686 } 2686 }
2687 2687
2688 2688
2689 void HRangeAnalysis::InferControlFlowRange(HCompareIDAndBranch* test, 2689 void HRangeAnalysis::InferControlFlowRange(HCompareIDAndBranch* test,
2690 HBasicBlock* dest) { 2690 HBasicBlock* dest) {
2691 ASSERT((test->FirstSuccessor() == dest) == (test->SecondSuccessor() != dest)); 2691 ASSERT((test->FirstSuccessor() == dest) == (test->SecondSuccessor() != dest));
2692 if (test->representation().IsInteger32()) { 2692 if (test->representation().IsSmiOrInteger32()) {
2693 Token::Value op = test->token(); 2693 Token::Value op = test->token();
2694 if (test->SecondSuccessor() == dest) { 2694 if (test->SecondSuccessor() == dest) {
2695 op = Token::NegateCompareOp(op); 2695 op = Token::NegateCompareOp(op);
2696 } 2696 }
2697 Token::Value inverted_op = Token::ReverseCompareOp(op); 2697 Token::Value inverted_op = Token::ReverseCompareOp(op);
2698 UpdateControlFlowRange(op, test->left(), test->right()); 2698 UpdateControlFlowRange(op, test->left(), test->right());
2699 UpdateControlFlowRange(inverted_op, test->right(), test->left()); 2699 UpdateControlFlowRange(inverted_op, test->right(), test->left());
2700 } 2700 }
2701 } 2701 }
2702 2702
(...skipping 8885 matching lines...) Expand 10 before | Expand all | Expand 10 after
11588 } 11588 }
11589 } 11589 }
11590 11590
11591 #ifdef DEBUG 11591 #ifdef DEBUG
11592 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11592 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11593 if (allocator_ != NULL) allocator_->Verify(); 11593 if (allocator_ != NULL) allocator_->Verify();
11594 #endif 11594 #endif
11595 } 11595 }
11596 11596
11597 } } // namespace v8::internal 11597 } } // 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