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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 } | 1148 } |
1149 | 1149 |
1150 | 1150 |
1151 std::ostream& HReturn::PrintDataTo(std::ostream& os) const { // NOLINT | 1151 std::ostream& HReturn::PrintDataTo(std::ostream& os) const { // NOLINT |
1152 return os << NameOf(value()) << " (pop " << NameOf(parameter_count()) | 1152 return os << NameOf(value()) << " (pop " << NameOf(parameter_count()) |
1153 << " values)"; | 1153 << " values)"; |
1154 } | 1154 } |
1155 | 1155 |
1156 | 1156 |
1157 Representation HBranch::observed_input_representation(int index) { | 1157 Representation HBranch::observed_input_representation(int index) { |
1158 static const ToBooleanStub::Types tagged_types( | 1158 if (expected_input_types_.Contains(ToBooleanStub::NULL_TYPE) || |
1159 ToBooleanStub::NULL_TYPE | | 1159 expected_input_types_.Contains(ToBooleanStub::SPEC_OBJECT) || |
1160 ToBooleanStub::SPEC_OBJECT | | 1160 expected_input_types_.Contains(ToBooleanStub::STRING) || |
1161 ToBooleanStub::STRING | | 1161 expected_input_types_.Contains(ToBooleanStub::SYMBOL)) { |
1162 ToBooleanStub::SYMBOL); | |
1163 if (expected_input_types_.ContainsAnyOf(tagged_types)) { | |
1164 return Representation::Tagged(); | 1162 return Representation::Tagged(); |
1165 } | 1163 } |
1166 if (expected_input_types_.Contains(ToBooleanStub::UNDEFINED)) { | 1164 if (expected_input_types_.Contains(ToBooleanStub::UNDEFINED)) { |
1167 if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { | 1165 if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { |
1168 return Representation::Double(); | 1166 return Representation::Double(); |
1169 } | 1167 } |
1170 return Representation::Tagged(); | 1168 return Representation::Tagged(); |
1171 } | 1169 } |
1172 if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { | 1170 if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { |
1173 return Representation::Double(); | 1171 return Representation::Double(); |
(...skipping 3626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4800 break; | 4798 break; |
4801 case HObjectAccess::kExternalMemory: | 4799 case HObjectAccess::kExternalMemory: |
4802 os << "[external-memory]"; | 4800 os << "[external-memory]"; |
4803 break; | 4801 break; |
4804 } | 4802 } |
4805 | 4803 |
4806 return os << "@" << access.offset(); | 4804 return os << "@" << access.offset(); |
4807 } | 4805 } |
4808 | 4806 |
4809 } } // namespace v8::internal | 4807 } } // namespace v8::internal |
OLD | NEW |