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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 std::ostream& HUnaryCall::PrintDataTo(std::ostream& os) const { // NOLINT | 904 std::ostream& HUnaryCall::PrintDataTo(std::ostream& os) const { // NOLINT |
905 return os << NameOf(value()) << " #" << argument_count(); | 905 return os << NameOf(value()) << " #" << argument_count(); |
906 } | 906 } |
907 | 907 |
908 | 908 |
909 std::ostream& HBinaryCall::PrintDataTo(std::ostream& os) const { // NOLINT | 909 std::ostream& HBinaryCall::PrintDataTo(std::ostream& os) const { // NOLINT |
910 return os << NameOf(first()) << " " << NameOf(second()) << " #" | 910 return os << NameOf(first()) << " " << NameOf(second()) << " #" |
911 << argument_count(); | 911 << argument_count(); |
912 } | 912 } |
913 | 913 |
| 914 std::ostream& HInvokeFunction::PrintTo(std::ostream& os) const { // NOLINT |
| 915 if (tail_call_mode() == TailCallMode::kAllow) os << "Tail"; |
| 916 return HBinaryCall::PrintTo(os); |
| 917 } |
| 918 |
| 919 std::ostream& HInvokeFunction::PrintDataTo(std::ostream& os) const { // NOLINT |
| 920 HBinaryCall::PrintDataTo(os); |
| 921 if (syntactic_tail_call_mode() == TailCallMode::kAllow) { |
| 922 os << ", JSTailCall"; |
| 923 } |
| 924 return os; |
| 925 } |
914 | 926 |
915 void HBoundsCheck::ApplyIndexChange() { | 927 void HBoundsCheck::ApplyIndexChange() { |
916 if (skip_check()) return; | 928 if (skip_check()) return; |
917 | 929 |
918 DecompositionResult decomposition; | 930 DecompositionResult decomposition; |
919 bool index_is_decomposable = index()->TryDecompose(&decomposition); | 931 bool index_is_decomposable = index()->TryDecompose(&decomposition); |
920 if (index_is_decomposable) { | 932 if (index_is_decomposable) { |
921 DCHECK(decomposition.base() == base()); | 933 DCHECK(decomposition.base() == base()); |
922 if (decomposition.offset() == offset() && | 934 if (decomposition.offset() == offset() && |
923 decomposition.scale() == scale()) return; | 935 decomposition.scale() == scale()) return; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 return os << "base: " << NameOf(base_index()) | 1038 return os << "base: " << NameOf(base_index()) |
1027 << ", check: " << NameOf(base_index()); | 1039 << ", check: " << NameOf(base_index()); |
1028 } | 1040 } |
1029 | 1041 |
1030 | 1042 |
1031 std::ostream& HCallWithDescriptor::PrintDataTo( | 1043 std::ostream& HCallWithDescriptor::PrintDataTo( |
1032 std::ostream& os) const { // NOLINT | 1044 std::ostream& os) const { // NOLINT |
1033 for (int i = 0; i < OperandCount(); i++) { | 1045 for (int i = 0; i < OperandCount(); i++) { |
1034 os << NameOf(OperandAt(i)) << " "; | 1046 os << NameOf(OperandAt(i)) << " "; |
1035 } | 1047 } |
1036 return os << "#" << argument_count(); | 1048 os << "#" << argument_count(); |
| 1049 if (syntactic_tail_call_mode() == TailCallMode::kAllow) { |
| 1050 os << ", JSTailCall"; |
| 1051 } |
| 1052 return os; |
1037 } | 1053 } |
1038 | 1054 |
1039 | 1055 |
1040 std::ostream& HCallNewArray::PrintDataTo(std::ostream& os) const { // NOLINT | 1056 std::ostream& HCallNewArray::PrintDataTo(std::ostream& os) const { // NOLINT |
1041 os << ElementsKindToString(elements_kind()) << " "; | 1057 os << ElementsKindToString(elements_kind()) << " "; |
1042 return HBinaryCall::PrintDataTo(os); | 1058 return HBinaryCall::PrintDataTo(os); |
1043 } | 1059 } |
1044 | 1060 |
1045 | 1061 |
1046 std::ostream& HCallRuntime::PrintDataTo(std::ostream& os) const { // NOLINT | 1062 std::ostream& HCallRuntime::PrintDataTo(std::ostream& os) const { // NOLINT |
(...skipping 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4621 case HObjectAccess::kExternalMemory: | 4637 case HObjectAccess::kExternalMemory: |
4622 os << "[external-memory]"; | 4638 os << "[external-memory]"; |
4623 break; | 4639 break; |
4624 } | 4640 } |
4625 | 4641 |
4626 return os << "@" << access.offset(); | 4642 return os << "@" << access.offset(); |
4627 } | 4643 } |
4628 | 4644 |
4629 } // namespace internal | 4645 } // namespace internal |
4630 } // namespace v8 | 4646 } // namespace v8 |
OLD | NEW |