Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: src/crankshaft/hydrogen-instructions.cc

Issue 1731303002: [crankshaft] Remove useless HCallFunction instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 bool HInstruction::CanDeoptimize() { 767 bool HInstruction::CanDeoptimize() {
768 switch (opcode()) { 768 switch (opcode()) {
769 case HValue::kAbnormalExit: 769 case HValue::kAbnormalExit:
770 case HValue::kAccessArgumentsAt: 770 case HValue::kAccessArgumentsAt:
771 case HValue::kAllocate: 771 case HValue::kAllocate:
772 case HValue::kArgumentsElements: 772 case HValue::kArgumentsElements:
773 case HValue::kArgumentsLength: 773 case HValue::kArgumentsLength:
774 case HValue::kArgumentsObject: 774 case HValue::kArgumentsObject:
775 case HValue::kBlockEntry: 775 case HValue::kBlockEntry:
776 case HValue::kBoundsCheckBaseIndexInformation: 776 case HValue::kBoundsCheckBaseIndexInformation:
777 case HValue::kCallFunction:
778 case HValue::kCallNewArray: 777 case HValue::kCallNewArray:
779 case HValue::kCapturedObject: 778 case HValue::kCapturedObject:
780 case HValue::kClassOfTestAndBranch: 779 case HValue::kClassOfTestAndBranch:
781 case HValue::kCompareGeneric: 780 case HValue::kCompareGeneric:
782 case HValue::kCompareHoleAndBranch: 781 case HValue::kCompareHoleAndBranch:
783 case HValue::kCompareMap: 782 case HValue::kCompareMap:
784 case HValue::kCompareNumericAndBranch: 783 case HValue::kCompareNumericAndBranch:
785 case HValue::kCompareObjectEqAndBranch: 784 case HValue::kCompareObjectEqAndBranch:
786 case HValue::kConstant: 785 case HValue::kConstant:
787 case HValue::kConstructDouble: 786 case HValue::kConstructDouble:
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 return new (zone) HCallJSFunction(function, argument_count, has_stack_check); 927 return new (zone) HCallJSFunction(function, argument_count, has_stack_check);
929 } 928 }
930 929
931 930
932 std::ostream& HBinaryCall::PrintDataTo(std::ostream& os) const { // NOLINT 931 std::ostream& HBinaryCall::PrintDataTo(std::ostream& os) const { // NOLINT
933 return os << NameOf(first()) << " " << NameOf(second()) << " #" 932 return os << NameOf(first()) << " " << NameOf(second()) << " #"
934 << argument_count(); 933 << argument_count();
935 } 934 }
936 935
937 936
938 std::ostream& HCallFunction::PrintDataTo(std::ostream& os) const { // NOLINT
939 os << NameOf(context()) << " " << NameOf(function());
940 if (HasVectorAndSlot()) {
941 os << " (type-feedback-vector icslot " << slot().ToInt() << ")";
942 }
943 os << " (convert mode" << convert_mode() << ")";
944 return os;
945 }
946
947
948 void HBoundsCheck::ApplyIndexChange() { 937 void HBoundsCheck::ApplyIndexChange() {
949 if (skip_check()) return; 938 if (skip_check()) return;
950 939
951 DecompositionResult decomposition; 940 DecompositionResult decomposition;
952 bool index_is_decomposable = index()->TryDecompose(&decomposition); 941 bool index_is_decomposable = index()->TryDecompose(&decomposition);
953 if (index_is_decomposable) { 942 if (index_is_decomposable) {
954 DCHECK(decomposition.base() == base()); 943 DCHECK(decomposition.base() == base());
955 if (decomposition.offset() == offset() && 944 if (decomposition.offset() == offset() &&
956 decomposition.scale() == scale()) return; 945 decomposition.scale() == scale()) return;
957 } else { 946 } else {
(...skipping 3696 matching lines...) Expand 10 before | Expand all | Expand 10 after
4654 case HObjectAccess::kExternalMemory: 4643 case HObjectAccess::kExternalMemory:
4655 os << "[external-memory]"; 4644 os << "[external-memory]";
4656 break; 4645 break;
4657 } 4646 }
4658 4647
4659 return os << "@" << access.offset(); 4648 return os << "@" << access.offset();
4660 } 4649 }
4661 4650
4662 } // namespace internal 4651 } // namespace internal
4663 } // namespace v8 4652 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698