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/ieee754.h" | 8 #include "src/base/ieee754.h" |
9 #include "src/base/safe_math.h" | 9 #include "src/base/safe_math.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 } | 1065 } |
1066 | 1066 |
1067 | 1067 |
1068 std::ostream& HReturn::PrintDataTo(std::ostream& os) const { // NOLINT | 1068 std::ostream& HReturn::PrintDataTo(std::ostream& os) const { // NOLINT |
1069 return os << NameOf(value()) << " (pop " << NameOf(parameter_count()) | 1069 return os << NameOf(value()) << " (pop " << NameOf(parameter_count()) |
1070 << " values)"; | 1070 << " values)"; |
1071 } | 1071 } |
1072 | 1072 |
1073 | 1073 |
1074 Representation HBranch::observed_input_representation(int index) { | 1074 Representation HBranch::observed_input_representation(int index) { |
1075 if (expected_input_types_ & | 1075 if (expected_input_types_ & (ToBooleanHint::kNull | ToBooleanHint::kReceiver | |
1076 (ToBooleanHint::kNull | ToBooleanHint::kReceiver | | 1076 ToBooleanHint::kString | ToBooleanHint::kSymbol | |
1077 ToBooleanHint::kString | ToBooleanHint::kSymbol)) { | 1077 ToBooleanHint::kSimdValue)) { |
1078 return Representation::Tagged(); | 1078 return Representation::Tagged(); |
1079 } | 1079 } |
1080 if (expected_input_types_ & ToBooleanHint::kUndefined) { | 1080 if (expected_input_types_ & ToBooleanHint::kUndefined) { |
1081 if (expected_input_types_ & ToBooleanHint::kHeapNumber) { | 1081 if (expected_input_types_ & ToBooleanHint::kHeapNumber) { |
1082 return Representation::Double(); | 1082 return Representation::Double(); |
1083 } | 1083 } |
1084 return Representation::Tagged(); | 1084 return Representation::Tagged(); |
1085 } | 1085 } |
1086 if (expected_input_types_ & ToBooleanHint::kHeapNumber) { | 1086 if (expected_input_types_ & ToBooleanHint::kHeapNumber) { |
1087 return Representation::Double(); | 1087 return Representation::Double(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 return heap->boolean_string(); | 1237 return heap->boolean_string(); |
1238 } | 1238 } |
1239 if (unique.IsKnownGlobal(heap->null_value())) { | 1239 if (unique.IsKnownGlobal(heap->null_value())) { |
1240 return heap->object_string(); | 1240 return heap->object_string(); |
1241 } | 1241 } |
1242 DCHECK(unique.IsKnownGlobal(heap->undefined_value())); | 1242 DCHECK(unique.IsKnownGlobal(heap->undefined_value())); |
1243 return heap->undefined_string(); | 1243 return heap->undefined_string(); |
1244 } | 1244 } |
1245 case SYMBOL_TYPE: | 1245 case SYMBOL_TYPE: |
1246 return heap->symbol_string(); | 1246 return heap->symbol_string(); |
| 1247 case SIMD128_VALUE_TYPE: { |
| 1248 Unique<Map> map = constant->ObjectMap(); |
| 1249 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
| 1250 if (map.IsKnownGlobal(heap->type##_map())) { \ |
| 1251 return heap->type##_string(); \ |
| 1252 } |
| 1253 SIMD128_TYPES(SIMD128_TYPE) |
| 1254 #undef SIMD128_TYPE |
| 1255 UNREACHABLE(); |
| 1256 return nullptr; |
| 1257 } |
1247 default: | 1258 default: |
1248 if (constant->IsUndetectable()) return heap->undefined_string(); | 1259 if (constant->IsUndetectable()) return heap->undefined_string(); |
1249 if (constant->IsCallable()) return heap->function_string(); | 1260 if (constant->IsCallable()) return heap->function_string(); |
1250 return heap->object_string(); | 1261 return heap->object_string(); |
1251 } | 1262 } |
1252 } | 1263 } |
1253 | 1264 |
1254 } // namespace | 1265 } // namespace |
1255 | 1266 |
1256 | 1267 |
(...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4043 case HObjectAccess::kExternalMemory: | 4054 case HObjectAccess::kExternalMemory: |
4044 os << "[external-memory]"; | 4055 os << "[external-memory]"; |
4045 break; | 4056 break; |
4046 } | 4057 } |
4047 | 4058 |
4048 return os << "@" << access.offset(); | 4059 return os << "@" << access.offset(); |
4049 } | 4060 } |
4050 | 4061 |
4051 } // namespace internal | 4062 } // namespace internal |
4052 } // namespace v8 | 4063 } // namespace v8 |
OLD | NEW |