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

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

Issue 1728423002: [crankshaft] Remove useless HCallJSFunction instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@remove-dynamic-frame-alignment
Patch Set: Created 4 years, 9 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 case HValue::kTypeofIsAndBranch: 824 case HValue::kTypeofIsAndBranch:
825 case HValue::kUnknownOSRValue: 825 case HValue::kUnknownOSRValue:
826 case HValue::kUseConst: 826 case HValue::kUseConst:
827 return false; 827 return false;
828 828
829 case HValue::kAdd: 829 case HValue::kAdd:
830 case HValue::kApplyArguments: 830 case HValue::kApplyArguments:
831 case HValue::kBitwise: 831 case HValue::kBitwise:
832 case HValue::kBoundsCheck: 832 case HValue::kBoundsCheck:
833 case HValue::kBranch: 833 case HValue::kBranch:
834 case HValue::kCallJSFunction:
835 case HValue::kCallRuntime: 834 case HValue::kCallRuntime:
836 case HValue::kCallWithDescriptor: 835 case HValue::kCallWithDescriptor:
837 case HValue::kChange: 836 case HValue::kChange:
838 case HValue::kCheckArrayBufferNotNeutered: 837 case HValue::kCheckArrayBufferNotNeutered:
839 case HValue::kCheckHeapObject: 838 case HValue::kCheckHeapObject:
840 case HValue::kCheckInstanceType: 839 case HValue::kCheckInstanceType:
841 case HValue::kCheckMapValue: 840 case HValue::kCheckMapValue:
842 case HValue::kCheckMaps: 841 case HValue::kCheckMaps:
843 case HValue::kCheckSmi: 842 case HValue::kCheckSmi:
844 case HValue::kCheckValue: 843 case HValue::kCheckValue:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 return os << (kind() == BIND ? "bind" : "lookup") << " var[" << index() 898 return os << (kind() == BIND ? "bind" : "lookup") << " var[" << index()
900 << "]"; 899 << "]";
901 } 900 }
902 901
903 902
904 std::ostream& HUnaryCall::PrintDataTo(std::ostream& os) const { // NOLINT 903 std::ostream& HUnaryCall::PrintDataTo(std::ostream& os) const { // NOLINT
905 return os << NameOf(value()) << " #" << argument_count(); 904 return os << NameOf(value()) << " #" << argument_count();
906 } 905 }
907 906
908 907
909 std::ostream& HCallJSFunction::PrintDataTo(std::ostream& os) const { // NOLINT
910 return os << NameOf(function()) << " #" << argument_count();
911 }
912
913
914 HCallJSFunction* HCallJSFunction::New(Isolate* isolate, Zone* zone,
915 HValue* context, HValue* function,
916 int argument_count) {
917 bool has_stack_check = false;
918 if (function->IsConstant()) {
919 HConstant* fun_const = HConstant::cast(function);
920 Handle<JSFunction> jsfun =
921 Handle<JSFunction>::cast(fun_const->handle(isolate));
922 has_stack_check = !jsfun.is_null() &&
923 (jsfun->code()->kind() == Code::FUNCTION ||
924 jsfun->code()->kind() == Code::OPTIMIZED_FUNCTION);
925 }
926
927 return new (zone) HCallJSFunction(function, argument_count, has_stack_check);
928 }
929
930
931 std::ostream& HBinaryCall::PrintDataTo(std::ostream& os) const { // NOLINT 908 std::ostream& HBinaryCall::PrintDataTo(std::ostream& os) const { // NOLINT
932 return os << NameOf(first()) << " " << NameOf(second()) << " #" 909 return os << NameOf(first()) << " " << NameOf(second()) << " #"
933 << argument_count(); 910 << argument_count();
934 } 911 }
935 912
936 913
937 void HBoundsCheck::ApplyIndexChange() { 914 void HBoundsCheck::ApplyIndexChange() {
938 if (skip_check()) return; 915 if (skip_check()) return;
939 916
940 DecompositionResult decomposition; 917 DecompositionResult decomposition;
(...skipping 3702 matching lines...) Expand 10 before | Expand all | Expand 10 after
4643 case HObjectAccess::kExternalMemory: 4620 case HObjectAccess::kExternalMemory:
4644 os << "[external-memory]"; 4621 os << "[external-memory]";
4645 break; 4622 break;
4646 } 4623 }
4647 4624
4648 return os << "@" << access.offset(); 4625 return os << "@" << access.offset();
4649 } 4626 }
4650 4627
4651 } // namespace internal 4628 } // namespace internal
4652 } // namespace v8 4629 } // 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