OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/double.h" | 8 #include "src/double.h" |
9 #include "src/factory.h" | 9 #include "src/factory.h" |
10 #include "src/hydrogen-infer-representation.h" | 10 #include "src/hydrogen-infer-representation.h" |
(...skipping 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3191 if (access().IsStringLength()) { | 3191 if (access().IsStringLength()) { |
3192 return new(zone) Range(0, String::kMaxLength); | 3192 return new(zone) Range(0, String::kMaxLength); |
3193 } | 3193 } |
3194 return HValue::InferRange(zone); | 3194 return HValue::InferRange(zone); |
3195 } | 3195 } |
3196 | 3196 |
3197 | 3197 |
3198 Range* HLoadKeyed::InferRange(Zone* zone) { | 3198 Range* HLoadKeyed::InferRange(Zone* zone) { |
3199 switch (elements_kind()) { | 3199 switch (elements_kind()) { |
3200 case EXTERNAL_INT8_ELEMENTS: | 3200 case EXTERNAL_INT8_ELEMENTS: |
| 3201 case INT8_ELEMENTS: |
3201 return new(zone) Range(kMinInt8, kMaxInt8); | 3202 return new(zone) Range(kMinInt8, kMaxInt8); |
3202 case EXTERNAL_UINT8_ELEMENTS: | 3203 case EXTERNAL_UINT8_ELEMENTS: |
3203 case EXTERNAL_UINT8_CLAMPED_ELEMENTS: | 3204 case EXTERNAL_UINT8_CLAMPED_ELEMENTS: |
| 3205 case UINT8_ELEMENTS: |
| 3206 case UINT8_CLAMPED_ELEMENTS: |
3204 return new(zone) Range(kMinUInt8, kMaxUInt8); | 3207 return new(zone) Range(kMinUInt8, kMaxUInt8); |
3205 case EXTERNAL_INT16_ELEMENTS: | 3208 case EXTERNAL_INT16_ELEMENTS: |
| 3209 case INT16_ELEMENTS: |
3206 return new(zone) Range(kMinInt16, kMaxInt16); | 3210 return new(zone) Range(kMinInt16, kMaxInt16); |
3207 case EXTERNAL_UINT16_ELEMENTS: | 3211 case EXTERNAL_UINT16_ELEMENTS: |
| 3212 case UINT16_ELEMENTS: |
3208 return new(zone) Range(kMinUInt16, kMaxUInt16); | 3213 return new(zone) Range(kMinUInt16, kMaxUInt16); |
3209 default: | 3214 default: |
3210 return HValue::InferRange(zone); | 3215 return HValue::InferRange(zone); |
3211 } | 3216 } |
3212 } | 3217 } |
3213 | 3218 |
3214 | 3219 |
3215 std::ostream& HCompareGeneric::PrintDataTo(std::ostream& os) const { // NOLINT | 3220 std::ostream& HCompareGeneric::PrintDataTo(std::ostream& os) const { // NOLINT |
3216 os << Token::Name(token()) << " "; | 3221 os << Token::Name(token()) << " "; |
3217 return HBinaryOperation::PrintDataTo(os); | 3222 return HBinaryOperation::PrintDataTo(os); |
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4719 break; | 4724 break; |
4720 case HObjectAccess::kExternalMemory: | 4725 case HObjectAccess::kExternalMemory: |
4721 os << "[external-memory]"; | 4726 os << "[external-memory]"; |
4722 break; | 4727 break; |
4723 } | 4728 } |
4724 | 4729 |
4725 return os << "@" << access.offset(); | 4730 return os << "@" << access.offset(); |
4726 } | 4731 } |
4727 | 4732 |
4728 } } // namespace v8::internal | 4733 } } // namespace v8::internal |
OLD | NEW |