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/hydrogen-instructions.h" | 5 #include "src/hydrogen-instructions.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/elements.h" | 9 #include "src/elements.h" |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 } | 920 } |
921 | 921 |
922 | 922 |
923 std::ostream& HCallJSFunction::PrintDataTo(std::ostream& os) const { // NOLINT | 923 std::ostream& HCallJSFunction::PrintDataTo(std::ostream& os) const { // NOLINT |
924 return os << NameOf(function()) << " #" << argument_count(); | 924 return os << NameOf(function()) << " #" << argument_count(); |
925 } | 925 } |
926 | 926 |
927 | 927 |
928 HCallJSFunction* HCallJSFunction::New(Isolate* isolate, Zone* zone, | 928 HCallJSFunction* HCallJSFunction::New(Isolate* isolate, Zone* zone, |
929 HValue* context, HValue* function, | 929 HValue* context, HValue* function, |
930 int argument_count, | 930 int argument_count) { |
931 bool pass_argument_count) { | |
932 bool has_stack_check = false; | 931 bool has_stack_check = false; |
933 if (function->IsConstant()) { | 932 if (function->IsConstant()) { |
934 HConstant* fun_const = HConstant::cast(function); | 933 HConstant* fun_const = HConstant::cast(function); |
935 Handle<JSFunction> jsfun = | 934 Handle<JSFunction> jsfun = |
936 Handle<JSFunction>::cast(fun_const->handle(isolate)); | 935 Handle<JSFunction>::cast(fun_const->handle(isolate)); |
937 has_stack_check = !jsfun.is_null() && | 936 has_stack_check = !jsfun.is_null() && |
938 (jsfun->code()->kind() == Code::FUNCTION || | 937 (jsfun->code()->kind() == Code::FUNCTION || |
939 jsfun->code()->kind() == Code::OPTIMIZED_FUNCTION); | 938 jsfun->code()->kind() == Code::OPTIMIZED_FUNCTION); |
940 } | 939 } |
941 | 940 |
942 return new(zone) HCallJSFunction( | 941 return new (zone) HCallJSFunction(function, argument_count, has_stack_check); |
943 function, argument_count, pass_argument_count, | |
944 has_stack_check); | |
945 } | 942 } |
946 | 943 |
947 | 944 |
948 std::ostream& HBinaryCall::PrintDataTo(std::ostream& os) const { // NOLINT | 945 std::ostream& HBinaryCall::PrintDataTo(std::ostream& os) const { // NOLINT |
949 return os << NameOf(first()) << " " << NameOf(second()) << " #" | 946 return os << NameOf(first()) << " " << NameOf(second()) << " #" |
950 << argument_count(); | 947 << argument_count(); |
951 } | 948 } |
952 | 949 |
953 | 950 |
954 std::ostream& HCallFunction::PrintDataTo(std::ostream& os) const { // NOLINT | 951 std::ostream& HCallFunction::PrintDataTo(std::ostream& os) const { // NOLINT |
(...skipping 3756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4711 case HObjectAccess::kExternalMemory: | 4708 case HObjectAccess::kExternalMemory: |
4712 os << "[external-memory]"; | 4709 os << "[external-memory]"; |
4713 break; | 4710 break; |
4714 } | 4711 } |
4715 | 4712 |
4716 return os << "@" << access.offset(); | 4713 return os << "@" << access.offset(); |
4717 } | 4714 } |
4718 | 4715 |
4719 } // namespace internal | 4716 } // namespace internal |
4720 } // namespace v8 | 4717 } // namespace v8 |
OLD | NEW |