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

Side by Side Diff: src/code-stubs.cc

Issue 91003002: Avoid useless #ifdef DEBUG checks for the --trace-ic flag. (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
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/ic.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 // 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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 } 857 }
858 TraceTransition(old_state, state_); 858 TraceTransition(old_state, state_);
859 } 859 }
860 860
861 861
862 template<class StateType> 862 template<class StateType>
863 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { 863 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) {
864 // Note: Although a no-op transition is semantically OK, it is hinting at a 864 // Note: Although a no-op transition is semantically OK, it is hinting at a
865 // bug somewhere in our state transition machinery. 865 // bug somewhere in our state transition machinery.
866 ASSERT(from != to); 866 ASSERT(from != to);
867 #ifdef DEBUG
868 if (!FLAG_trace_ic) return; 867 if (!FLAG_trace_ic) return;
869 char buffer[100]; 868 char buffer[100];
870 NoAllocationStringAllocator allocator(buffer, 869 NoAllocationStringAllocator allocator(buffer,
871 static_cast<unsigned>(sizeof(buffer))); 870 static_cast<unsigned>(sizeof(buffer)));
872 StringStream stream(&allocator); 871 StringStream stream(&allocator);
873 stream.Add("["); 872 stream.Add("[");
874 PrintBaseName(&stream); 873 PrintBaseName(&stream);
875 stream.Add(": "); 874 stream.Add(": ");
876 from.Print(&stream); 875 from.Print(&stream);
877 stream.Add("=>"); 876 stream.Add("=>");
878 to.Print(&stream); 877 to.Print(&stream);
879 stream.Add("]\n"); 878 stream.Add("]\n");
880 stream.OutputToStdOut(); 879 stream.OutputToStdOut();
881 #endif
882 } 880 }
883 881
884 882
885 void CompareNilICStub::PrintBaseName(StringStream* stream) { 883 void CompareNilICStub::PrintBaseName(StringStream* stream) {
886 CodeStub::PrintBaseName(stream); 884 CodeStub::PrintBaseName(stream);
887 stream->Add((nil_value_ == kNullValue) ? "(NullValue)": 885 stream->Add((nil_value_ == kNullValue) ? "(NullValue)":
888 "(UndefinedValue)"); 886 "(UndefinedValue)");
889 } 887 }
890 888
891 889
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 InstallDescriptor(isolate, &stub3); 1206 InstallDescriptor(isolate, &stub3);
1209 } 1207 }
1210 1208
1211 InternalArrayConstructorStub::InternalArrayConstructorStub( 1209 InternalArrayConstructorStub::InternalArrayConstructorStub(
1212 Isolate* isolate) { 1210 Isolate* isolate) {
1213 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1211 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1214 } 1212 }
1215 1213
1216 1214
1217 } } // namespace v8::internal 1215 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698