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

Side by Side Diff: src/hydrogen.cc

Issue 12217136: Fix NegateCompareOp and InvertCompareOp (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 10 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 | src/token.h » ('j') | 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 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 1819
1820 1820
1821 void HRangeAnalysis::InferControlFlowRange(HCompareIDAndBranch* test, 1821 void HRangeAnalysis::InferControlFlowRange(HCompareIDAndBranch* test,
1822 HBasicBlock* dest) { 1822 HBasicBlock* dest) {
1823 ASSERT((test->FirstSuccessor() == dest) == (test->SecondSuccessor() != dest)); 1823 ASSERT((test->FirstSuccessor() == dest) == (test->SecondSuccessor() != dest));
1824 if (test->representation().IsInteger32()) { 1824 if (test->representation().IsInteger32()) {
1825 Token::Value op = test->token(); 1825 Token::Value op = test->token();
1826 if (test->SecondSuccessor() == dest) { 1826 if (test->SecondSuccessor() == dest) {
1827 op = Token::NegateCompareOp(op); 1827 op = Token::NegateCompareOp(op);
1828 } 1828 }
1829 Token::Value inverted_op = Token::InvertCompareOp(op); 1829 Token::Value inverted_op = Token::ReverseCompareOp(op);
1830 UpdateControlFlowRange(op, test->left(), test->right()); 1830 UpdateControlFlowRange(op, test->left(), test->right());
1831 UpdateControlFlowRange(inverted_op, test->right(), test->left()); 1831 UpdateControlFlowRange(inverted_op, test->right(), test->left());
1832 } 1832 }
1833 } 1833 }
1834 1834
1835 1835
1836 // We know that value [op] other. Use this information to update the range on 1836 // We know that value [op] other. Use this information to update the range on
1837 // value. 1837 // value.
1838 void HRangeAnalysis::UpdateControlFlowRange(Token::Value op, 1838 void HRangeAnalysis::UpdateControlFlowRange(Token::Value op,
1839 HValue* value, 1839 HValue* value,
(...skipping 8790 matching lines...) Expand 10 before | Expand all | Expand 10 after
10630 } 10630 }
10631 } 10631 }
10632 10632
10633 #ifdef DEBUG 10633 #ifdef DEBUG
10634 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10634 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10635 if (allocator_ != NULL) allocator_->Verify(); 10635 if (allocator_ != NULL) allocator_->Verify();
10636 #endif 10636 #endif
10637 } 10637 }
10638 10638
10639 } } // namespace v8::internal 10639 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698