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

Side by Side Diff: src/codegen.cc

Issue 39014: Add a meaningful name when disassembling code. This makes it easier... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 stream.Seek(flit->start_position()); 172 stream.Seek(flit->start_position());
173 // flit->end_position() points to the last character in the stream. We 173 // flit->end_position() points to the last character in the stream. We
174 // need to compensate by adding one to calculate the length. 174 // need to compensate by adding one to calculate the length.
175 int source_len = flit->end_position() - flit->start_position() + 1; 175 int source_len = flit->end_position() - flit->start_position() + 1;
176 for (int i = 0; i < source_len; i++) { 176 for (int i = 0; i < source_len; i++) {
177 if (stream.has_more()) PrintF("%c", stream.GetNext()); 177 if (stream.has_more()) PrintF("%c", stream.GetNext());
178 } 178 }
179 PrintF("\n\n"); 179 PrintF("\n\n");
180 } 180 }
181 PrintF("--- Code ---\n"); 181 PrintF("--- Code ---\n");
182 code->Disassemble(); 182 code->Disassemble(*flit->name()->ToCString());
183 } 183 }
184 #endif // ENABLE_DISASSEMBLER 184 #endif // ENABLE_DISASSEMBLER
185 185
186 if (!code.is_null()) { 186 if (!code.is_null()) {
187 Counters::total_compiled_code_size.Increment(code->instruction_size()); 187 Counters::total_compiled_code_size.Increment(code->instruction_size());
188 } 188 }
189 189
190 return code; 190 return code;
191 } 191 }
192 192
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { 571 void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
572 switch (type_) { 572 switch (type_) {
573 case READ_LENGTH: GenerateReadLength(masm); break; 573 case READ_LENGTH: GenerateReadLength(masm); break;
574 case READ_ELEMENT: GenerateReadElement(masm); break; 574 case READ_ELEMENT: GenerateReadElement(masm); break;
575 case NEW_OBJECT: GenerateNewObject(masm); break; 575 case NEW_OBJECT: GenerateNewObject(masm); break;
576 } 576 }
577 } 577 }
578 578
579 579
580 } } // namespace v8::internal 580 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698