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