OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 value->id(), | 1024 value->id(), |
1025 Token::Name(op), | 1025 Token::Name(op), |
1026 other->id()); | 1026 other->id()); |
1027 | 1027 |
1028 if (op == Token::EQ || op == Token::EQ_STRICT) { | 1028 if (op == Token::EQ || op == Token::EQ_STRICT) { |
1029 // The same range has to apply for value. | 1029 // The same range has to apply for value. |
1030 new_range = range->Copy(); | 1030 new_range = range->Copy(); |
1031 } else if (op == Token::LT || op == Token::LTE) { | 1031 } else if (op == Token::LT || op == Token::LTE) { |
1032 new_range = range->CopyClearLower(); | 1032 new_range = range->CopyClearLower(); |
1033 if (op == Token::LT) { | 1033 if (op == Token::LT) { |
1034 new_range->Add(-1); | 1034 new_range->AddConstant(-1); |
1035 } | 1035 } |
1036 } else if (op == Token::GT || op == Token::GTE) { | 1036 } else if (op == Token::GT || op == Token::GTE) { |
1037 new_range = range->CopyClearUpper(); | 1037 new_range = range->CopyClearUpper(); |
1038 if (op == Token::GT) { | 1038 if (op == Token::GT) { |
1039 new_range->Add(1); | 1039 new_range->AddConstant(1); |
1040 } | 1040 } |
1041 } | 1041 } |
1042 | 1042 |
1043 if (new_range != NULL && !new_range->IsMostGeneric()) { | 1043 if (new_range != NULL && !new_range->IsMostGeneric()) { |
1044 AddRange(value, new_range); | 1044 AddRange(value, new_range); |
1045 } | 1045 } |
1046 } | 1046 } |
1047 | 1047 |
1048 | 1048 |
1049 void HRangeAnalysis::InferPhiRange(HPhi* phi) { | 1049 void HRangeAnalysis::InferPhiRange(HPhi* phi) { |
(...skipping 4658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5708 } | 5708 } |
5709 | 5709 |
5710 #ifdef DEBUG | 5710 #ifdef DEBUG |
5711 if (graph_ != NULL) graph_->Verify(); | 5711 if (graph_ != NULL) graph_->Verify(); |
5712 if (chunk_ != NULL) chunk_->Verify(); | 5712 if (chunk_ != NULL) chunk_->Verify(); |
5713 if (allocator_ != NULL) allocator_->Verify(); | 5713 if (allocator_ != NULL) allocator_->Verify(); |
5714 #endif | 5714 #endif |
5715 } | 5715 } |
5716 | 5716 |
5717 } } // namespace v8::internal | 5717 } } // namespace v8::internal |
OLD | NEW |