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

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

Issue 104663004: Preview of a first step towards unification of hydrogen calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
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
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
852 void HBinaryCall::PrintDataTo(StringStream* stream) { 861 void HBinaryCall::PrintDataTo(StringStream* stream) {
853 first()->PrintNameTo(stream); 862 first()->PrintNameTo(stream);
854 stream->Add(" "); 863 stream->Add(" ");
855 second()->PrintNameTo(stream); 864 second()->PrintNameTo(stream);
856 stream->Add(" "); 865 stream->Add(" ");
857 stream->Add("#%d", argument_count()); 866 stream->Add("#%d", argument_count());
858 } 867 }
859 868
860 869
861 void HBoundsCheck::ApplyIndexChange() { 870 void HBoundsCheck::ApplyIndexChange() {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 976
968 977
969 void HBoundsCheckBaseIndexInformation::PrintDataTo(StringStream* stream) { 978 void HBoundsCheckBaseIndexInformation::PrintDataTo(StringStream* stream) {
970 stream->Add("base: "); 979 stream->Add("base: ");
971 base_index()->PrintNameTo(stream); 980 base_index()->PrintNameTo(stream);
972 stream->Add(", check: "); 981 stream->Add(", check: ");
973 base_index()->PrintNameTo(stream); 982 base_index()->PrintNameTo(stream);
974 } 983 }
975 984
976 985
977 void HCallConstantFunction::PrintDataTo(StringStream* stream) { 986 void HCallWithDescriptor::PrintDataTo(StringStream* stream) {
978 if (IsApplyFunction()) { 987 for (int i = 0; i < OperandCount(); i++) {
979 stream->Add("optimized apply "); 988 OperandAt(i)->PrintNameTo(stream);
980 } else { 989 stream->Add(" ");
981 stream->Add("%o ", function()->shared()->DebugName());
982 } 990 }
983 stream->Add("#%d", argument_count()); 991 stream->Add("#%d", argument_count());
984 } 992 }
985 993
986 994
987 void HCallNamed::PrintDataTo(StringStream* stream) {
988 stream->Add("%o ", *name());
989 HUnaryCall::PrintDataTo(stream);
990 }
991
992
993 void HCallGlobal::PrintDataTo(StringStream* stream) { 995 void HCallGlobal::PrintDataTo(StringStream* stream) {
994 stream->Add("%o ", *name()); 996 stream->Add("%o ", *name());
995 HUnaryCall::PrintDataTo(stream); 997 HUnaryCall::PrintDataTo(stream);
996 } 998 }
997 999
998 1000
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) { 1001 void HCallNewArray::PrintDataTo(StringStream* stream) {
1006 stream->Add(ElementsKindToString(elements_kind())); 1002 stream->Add(ElementsKindToString(elements_kind()));
1007 stream->Add(" "); 1003 stream->Add(" ");
1008 HBinaryCall::PrintDataTo(stream); 1004 HBinaryCall::PrintDataTo(stream);
1009 } 1005 }
1010 1006
1011 1007
1012 void HCallRuntime::PrintDataTo(StringStream* stream) { 1008 void HCallRuntime::PrintDataTo(StringStream* stream) {
1013 stream->Add("%o ", *name()); 1009 stream->Add("%o ", *name());
1014 if (save_doubles() == kSaveFPRegs) { 1010 if (save_doubles() == kSaveFPRegs) {
(...skipping 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after
4422 break; 4418 break;
4423 case kExternalMemory: 4419 case kExternalMemory:
4424 stream->Add("[external-memory]"); 4420 stream->Add("[external-memory]");
4425 break; 4421 break;
4426 } 4422 }
4427 4423
4428 stream->Add("@%d", offset()); 4424 stream->Add("@%d", offset());
4429 } 4425 }
4430 4426
4431 } } // namespace v8::internal 4427 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698