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/crankshaft/hydrogen-instructions.h" | 5 #include "src/crankshaft/hydrogen-instructions.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/safe_math.h" | 8 #include "src/base/safe_math.h" |
9 #include "src/crankshaft/hydrogen-infer-representation.h" | 9 #include "src/crankshaft/hydrogen-infer-representation.h" |
10 #include "src/double.h" | 10 #include "src/double.h" |
(...skipping 780 matching lines...) Loading... |
791 case HValue::kDoubleBits: | 791 case HValue::kDoubleBits: |
792 case HValue::kDummyUse: | 792 case HValue::kDummyUse: |
793 case HValue::kEnterInlined: | 793 case HValue::kEnterInlined: |
794 case HValue::kEnvironmentMarker: | 794 case HValue::kEnvironmentMarker: |
795 case HValue::kForceRepresentation: | 795 case HValue::kForceRepresentation: |
796 case HValue::kGetCachedArrayIndex: | 796 case HValue::kGetCachedArrayIndex: |
797 case HValue::kGoto: | 797 case HValue::kGoto: |
798 case HValue::kHasCachedArrayIndexAndBranch: | 798 case HValue::kHasCachedArrayIndexAndBranch: |
799 case HValue::kHasInstanceTypeAndBranch: | 799 case HValue::kHasInstanceTypeAndBranch: |
800 case HValue::kInnerAllocatedObject: | 800 case HValue::kInnerAllocatedObject: |
801 case HValue::kInstanceOf: | |
802 case HValue::kIsSmiAndBranch: | 801 case HValue::kIsSmiAndBranch: |
803 case HValue::kIsStringAndBranch: | 802 case HValue::kIsStringAndBranch: |
804 case HValue::kIsUndetectableAndBranch: | 803 case HValue::kIsUndetectableAndBranch: |
805 case HValue::kLeaveInlined: | 804 case HValue::kLeaveInlined: |
806 case HValue::kLoadFieldByIndex: | 805 case HValue::kLoadFieldByIndex: |
807 case HValue::kLoadGlobalGeneric: | 806 case HValue::kLoadGlobalGeneric: |
808 case HValue::kLoadNamedField: | 807 case HValue::kLoadNamedField: |
809 case HValue::kLoadNamedGeneric: | 808 case HValue::kLoadNamedGeneric: |
810 case HValue::kLoadRoot: | 809 case HValue::kLoadRoot: |
811 case HValue::kMathMinMax: | 810 case HValue::kMathMinMax: |
(...skipping 833 matching lines...) Loading... |
1645 | 1644 |
1646 std::ostream& HUnknownOSRValue::PrintDataTo(std::ostream& os) const { // NOLINT | 1645 std::ostream& HUnknownOSRValue::PrintDataTo(std::ostream& os) const { // NOLINT |
1647 const char* type = "expression"; | 1646 const char* type = "expression"; |
1648 if (environment_->is_local_index(index_)) type = "local"; | 1647 if (environment_->is_local_index(index_)) type = "local"; |
1649 if (environment_->is_special_index(index_)) type = "special"; | 1648 if (environment_->is_special_index(index_)) type = "special"; |
1650 if (environment_->is_parameter_index(index_)) type = "parameter"; | 1649 if (environment_->is_parameter_index(index_)) type = "parameter"; |
1651 return os << type << " @ " << index_; | 1650 return os << type << " @ " << index_; |
1652 } | 1651 } |
1653 | 1652 |
1654 | 1653 |
1655 std::ostream& HInstanceOf::PrintDataTo(std::ostream& os) const { // NOLINT | |
1656 return os << NameOf(left()) << " " << NameOf(right()) << " " | |
1657 << NameOf(context()); | |
1658 } | |
1659 | |
1660 | |
1661 Range* HValue::InferRange(Zone* zone) { | 1654 Range* HValue::InferRange(Zone* zone) { |
1662 Range* result; | 1655 Range* result; |
1663 if (representation().IsSmi() || type().IsSmi()) { | 1656 if (representation().IsSmi() || type().IsSmi()) { |
1664 result = new(zone) Range(Smi::kMinValue, Smi::kMaxValue); | 1657 result = new(zone) Range(Smi::kMinValue, Smi::kMaxValue); |
1665 result->set_can_be_minus_zero(false); | 1658 result->set_can_be_minus_zero(false); |
1666 } else { | 1659 } else { |
1667 result = new(zone) Range(); | 1660 result = new(zone) Range(); |
1668 result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32)); | 1661 result->set_can_be_minus_zero(!CheckFlag(kAllUsesTruncatingToInt32)); |
1669 // TODO(jkummerow): The range cannot be minus zero when the upper type | 1662 // TODO(jkummerow): The range cannot be minus zero when the upper type |
1670 // bound is Integer32. | 1663 // bound is Integer32. |
(...skipping 2362 matching lines...) Loading... |
4033 case HObjectAccess::kExternalMemory: | 4026 case HObjectAccess::kExternalMemory: |
4034 os << "[external-memory]"; | 4027 os << "[external-memory]"; |
4035 break; | 4028 break; |
4036 } | 4029 } |
4037 | 4030 |
4038 return os << "@" << access.offset(); | 4031 return os << "@" << access.offset(); |
4039 } | 4032 } |
4040 | 4033 |
4041 } // namespace internal | 4034 } // namespace internal |
4042 } // namespace v8 | 4035 } // namespace v8 |
OLD | NEW |