| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 } | 842 } |
| 843 | 843 |
| 844 | 844 |
| 845 void HUnaryCall::PrintDataTo(StringStream* stream) { | 845 void HUnaryCall::PrintDataTo(StringStream* stream) { |
| 846 value()->PrintNameTo(stream); | 846 value()->PrintNameTo(stream); |
| 847 stream->Add(" "); | 847 stream->Add(" "); |
| 848 stream->Add("#%d", argument_count()); | 848 stream->Add("#%d", argument_count()); |
| 849 } | 849 } |
| 850 | 850 |
| 851 | 851 |
| 852 void HCallJSFunction::PrintDataTo(StringStream* stream) { |
| 853 OperandAt(0)->PrintNameTo(stream); |
| 854 stream->Add(" "); |
| 855 OperandAt(1)->PrintNameTo(stream); |
| 856 stream->Add(" "); |
| 857 stream->Add("#%d", argument_count()); |
| 858 } |
| 859 |
| 860 |
| 861 HCallJSFunction* HCallJSFunction::New(Zone* zone, |
| 862 HValue* context, |
| 863 HValue* function, |
| 864 HValue* call_kind_value, |
| 865 int argument_count, |
| 866 bool pass_argument_count) { |
| 867 bool has_stack_check = false; |
| 868 if (function->IsConstant()) { |
| 869 HConstant* fun_const = HConstant::cast(function); |
| 870 Handle<JSFunction> jsfun = |
| 871 Handle<JSFunction>::cast(fun_const->handle(zone->isolate())); |
| 872 has_stack_check = !jsfun.is_null() && |
| 873 (jsfun->code()->kind() == Code::FUNCTION || |
| 874 jsfun->code()->kind() == Code::OPTIMIZED_FUNCTION); |
| 875 } |
| 876 |
| 877 return new(zone) HCallJSFunction( |
| 878 function, call_kind_value, argument_count, pass_argument_count, |
| 879 has_stack_check); |
| 880 } |
| 881 |
| 882 |
| 883 |
| 884 |
| 852 void HBinaryCall::PrintDataTo(StringStream* stream) { | 885 void HBinaryCall::PrintDataTo(StringStream* stream) { |
| 853 first()->PrintNameTo(stream); | 886 first()->PrintNameTo(stream); |
| 854 stream->Add(" "); | 887 stream->Add(" "); |
| 855 second()->PrintNameTo(stream); | 888 second()->PrintNameTo(stream); |
| 856 stream->Add(" "); | 889 stream->Add(" "); |
| 857 stream->Add("#%d", argument_count()); | 890 stream->Add("#%d", argument_count()); |
| 858 } | 891 } |
| 859 | 892 |
| 860 | 893 |
| 861 void HBoundsCheck::ApplyIndexChange() { | 894 void HBoundsCheck::ApplyIndexChange() { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 | 1000 |
| 968 | 1001 |
| 969 void HBoundsCheckBaseIndexInformation::PrintDataTo(StringStream* stream) { | 1002 void HBoundsCheckBaseIndexInformation::PrintDataTo(StringStream* stream) { |
| 970 stream->Add("base: "); | 1003 stream->Add("base: "); |
| 971 base_index()->PrintNameTo(stream); | 1004 base_index()->PrintNameTo(stream); |
| 972 stream->Add(", check: "); | 1005 stream->Add(", check: "); |
| 973 base_index()->PrintNameTo(stream); | 1006 base_index()->PrintNameTo(stream); |
| 974 } | 1007 } |
| 975 | 1008 |
| 976 | 1009 |
| 977 void HCallConstantFunction::PrintDataTo(StringStream* stream) { | 1010 void HCallWithDescriptor::PrintDataTo(StringStream* stream) { |
| 978 if (IsApplyFunction()) { | 1011 for (int i = 0; i < OperandCount(); i++) { |
| 979 stream->Add("optimized apply "); | 1012 OperandAt(i)->PrintNameTo(stream); |
| 980 } else { | 1013 stream->Add(" "); |
| 981 stream->Add("%o ", function()->shared()->DebugName()); | |
| 982 } | 1014 } |
| 983 stream->Add("#%d", argument_count()); | 1015 stream->Add("#%d", argument_count()); |
| 984 } | 1016 } |
| 985 | 1017 |
| 986 | 1018 |
| 987 void HCallNamed::PrintDataTo(StringStream* stream) { | |
| 988 stream->Add("%o ", *name()); | |
| 989 HUnaryCall::PrintDataTo(stream); | |
| 990 } | |
| 991 | |
| 992 | |
| 993 void HCallGlobal::PrintDataTo(StringStream* stream) { | 1019 void HCallGlobal::PrintDataTo(StringStream* stream) { |
| 994 stream->Add("%o ", *name()); | 1020 stream->Add("%o ", *name()); |
| 995 HUnaryCall::PrintDataTo(stream); | 1021 HUnaryCall::PrintDataTo(stream); |
| 996 } | 1022 } |
| 997 | 1023 |
| 998 | 1024 |
| 999 void HCallKnownGlobal::PrintDataTo(StringStream* stream) { | |
| 1000 stream->Add("%o ", target()->shared()->DebugName()); | |
| 1001 stream->Add("#%d", argument_count()); | |
| 1002 } | |
| 1003 | |
| 1004 | |
| 1005 void HCallNewArray::PrintDataTo(StringStream* stream) { | 1025 void HCallNewArray::PrintDataTo(StringStream* stream) { |
| 1006 stream->Add(ElementsKindToString(elements_kind())); | 1026 stream->Add(ElementsKindToString(elements_kind())); |
| 1007 stream->Add(" "); | 1027 stream->Add(" "); |
| 1008 HBinaryCall::PrintDataTo(stream); | 1028 HBinaryCall::PrintDataTo(stream); |
| 1009 } | 1029 } |
| 1010 | 1030 |
| 1011 | 1031 |
| 1012 void HCallRuntime::PrintDataTo(StringStream* stream) { | 1032 void HCallRuntime::PrintDataTo(StringStream* stream) { |
| 1013 stream->Add("%o ", *name()); | 1033 stream->Add("%o ", *name()); |
| 1014 if (save_doubles() == kSaveFPRegs) { | 1034 if (save_doubles() == kSaveFPRegs) { |
| (...skipping 3414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4429 break; | 4449 break; |
| 4430 case kExternalMemory: | 4450 case kExternalMemory: |
| 4431 stream->Add("[external-memory]"); | 4451 stream->Add("[external-memory]"); |
| 4432 break; | 4452 break; |
| 4433 } | 4453 } |
| 4434 | 4454 |
| 4435 stream->Add("@%d", offset()); | 4455 stream->Add("@%d", offset()); |
| 4436 } | 4456 } |
| 4437 | 4457 |
| 4438 } } // namespace v8::internal | 4458 } } // namespace v8::internal |
| OLD | NEW |