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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 } | 1088 } |
1089 | 1089 |
1090 | 1090 |
1091 std::ostream& HReturn::PrintDataTo(std::ostream& os) const { // NOLINT | 1091 std::ostream& HReturn::PrintDataTo(std::ostream& os) const { // NOLINT |
1092 return os << NameOf(value()) << " (pop " << NameOf(parameter_count()) | 1092 return os << NameOf(value()) << " (pop " << NameOf(parameter_count()) |
1093 << " values)"; | 1093 << " values)"; |
1094 } | 1094 } |
1095 | 1095 |
1096 | 1096 |
1097 Representation HBranch::observed_input_representation(int index) { | 1097 Representation HBranch::observed_input_representation(int index) { |
1098 if (expected_input_types_.Contains(ToBooleanStub::NULL_TYPE) || | 1098 if (expected_input_types_.Contains(ToBooleanICStub::NULL_TYPE) || |
1099 expected_input_types_.Contains(ToBooleanStub::SPEC_OBJECT) || | 1099 expected_input_types_.Contains(ToBooleanICStub::SPEC_OBJECT) || |
1100 expected_input_types_.Contains(ToBooleanStub::STRING) || | 1100 expected_input_types_.Contains(ToBooleanICStub::STRING) || |
1101 expected_input_types_.Contains(ToBooleanStub::SYMBOL) || | 1101 expected_input_types_.Contains(ToBooleanICStub::SYMBOL) || |
1102 expected_input_types_.Contains(ToBooleanStub::SIMD_VALUE)) { | 1102 expected_input_types_.Contains(ToBooleanICStub::SIMD_VALUE)) { |
1103 return Representation::Tagged(); | 1103 return Representation::Tagged(); |
1104 } | 1104 } |
1105 if (expected_input_types_.Contains(ToBooleanStub::UNDEFINED)) { | 1105 if (expected_input_types_.Contains(ToBooleanICStub::UNDEFINED)) { |
1106 if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { | 1106 if (expected_input_types_.Contains(ToBooleanICStub::HEAP_NUMBER)) { |
1107 return Representation::Double(); | 1107 return Representation::Double(); |
1108 } | 1108 } |
1109 return Representation::Tagged(); | 1109 return Representation::Tagged(); |
1110 } | 1110 } |
1111 if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { | 1111 if (expected_input_types_.Contains(ToBooleanICStub::HEAP_NUMBER)) { |
1112 return Representation::Double(); | 1112 return Representation::Double(); |
1113 } | 1113 } |
1114 if (expected_input_types_.Contains(ToBooleanStub::SMI)) { | 1114 if (expected_input_types_.Contains(ToBooleanICStub::SMI)) { |
1115 return Representation::Smi(); | 1115 return Representation::Smi(); |
1116 } | 1116 } |
1117 return Representation::None(); | 1117 return Representation::None(); |
1118 } | 1118 } |
1119 | 1119 |
1120 | 1120 |
1121 bool HBranch::KnownSuccessorBlock(HBasicBlock** block) { | 1121 bool HBranch::KnownSuccessorBlock(HBasicBlock** block) { |
1122 HValue* value = this->value(); | 1122 HValue* value = this->value(); |
1123 if (value->EmitAtUses()) { | 1123 if (value->EmitAtUses()) { |
1124 DCHECK(value->IsConstant()); | 1124 DCHECK(value->IsConstant()); |
(...skipping 3495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4620 case HObjectAccess::kExternalMemory: | 4620 case HObjectAccess::kExternalMemory: |
4621 os << "[external-memory]"; | 4621 os << "[external-memory]"; |
4622 break; | 4622 break; |
4623 } | 4623 } |
4624 | 4624 |
4625 return os << "@" << access.offset(); | 4625 return os << "@" << access.offset(); |
4626 } | 4626 } |
4627 | 4627 |
4628 } // namespace internal | 4628 } // namespace internal |
4629 } // namespace v8 | 4629 } // namespace v8 |
OLD | NEW |