| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 range->Union(OperandAt(i)->range()); | 948 range->Union(OperandAt(i)->range()); |
| 949 } | 949 } |
| 950 return range; | 950 return range; |
| 951 } | 951 } |
| 952 } else { | 952 } else { |
| 953 return HValue::InferRange(); | 953 return HValue::InferRange(); |
| 954 } | 954 } |
| 955 } | 955 } |
| 956 | 956 |
| 957 | 957 |
| 958 Range* HMathMinMax::InferRange() { |
| 959 Range* a = left()->range(); |
| 960 Range* b = right()->range(); |
| 961 Range* res = NULL; |
| 962 if (op_ == kMathMin) { |
| 963 res = new Range((a->lower() < b->lower()) ? a->lower() : b->lower(), |
| 964 (a->upper() < b->upper()) ? a->upper() : b->upper()); |
| 965 res->set_can_be_minus_zero(a->CanBeMinusZero() || b->CanBeMinusZero()); |
| 966 } else { |
| 967 res = new Range((a->lower() > b->lower()) ? a->lower() : b->lower(), |
| 968 (a->upper() > b->upper()) ? a->upper() : b->upper()); |
| 969 res->set_can_be_minus_zero(a->CanBeMinusZero() && b->CanBeMinusZero()); |
| 970 } |
| 971 return res; |
| 972 } |
| 973 |
| 974 |
| 958 Range* HAdd::InferRange() { | 975 Range* HAdd::InferRange() { |
| 959 if (representation().IsInteger32()) { | 976 if (representation().IsInteger32()) { |
| 960 Range* a = left()->range(); | 977 Range* a = left()->range(); |
| 961 Range* b = right()->range(); | 978 Range* b = right()->range(); |
| 962 Range* res = a->Copy(); | 979 Range* res = a->Copy(); |
| 963 if (!res->AddAndCheckOverflow(b)) { | 980 if (!res->AddAndCheckOverflow(b)) { |
| 964 ClearFlag(kCanOverflow); | 981 ClearFlag(kCanOverflow); |
| 965 } | 982 } |
| 966 bool m0 = a->CanBeMinusZero() && b->CanBeMinusZero(); | 983 bool m0 = a->CanBeMinusZero() && b->CanBeMinusZero(); |
| 967 res->set_can_be_minus_zero(m0); | 984 res->set_can_be_minus_zero(m0); |
| (...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 | 2123 |
| 2107 | 2124 |
| 2108 void HCheckPrototypeMaps::Verify() { | 2125 void HCheckPrototypeMaps::Verify() { |
| 2109 HInstruction::Verify(); | 2126 HInstruction::Verify(); |
| 2110 ASSERT(HasNoUses()); | 2127 ASSERT(HasNoUses()); |
| 2111 } | 2128 } |
| 2112 | 2129 |
| 2113 #endif | 2130 #endif |
| 2114 | 2131 |
| 2115 } } // namespace v8::internal | 2132 } } // namespace v8::internal |
| OLD | NEW |