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

Side by Side Diff: src/objects.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 4777 matching lines...) Expand 10 before | Expand all | Expand 10 after
4788 case MONOMORPHIC_PROTOTYPE_FAILURE: return "MONOMORPHIC_PROTOTYPE_FAILURE"; 4788 case MONOMORPHIC_PROTOTYPE_FAILURE: return "MONOMORPHIC_PROTOTYPE_FAILURE";
4789 case MEGAMORPHIC: return "MEGAMORPHIC"; 4789 case MEGAMORPHIC: return "MEGAMORPHIC";
4790 case DEBUG_BREAK: return "DEBUG_BREAK"; 4790 case DEBUG_BREAK: return "DEBUG_BREAK";
4791 case DEBUG_PREPARE_STEP_IN: return "DEBUG_PREPARE_STEP_IN"; 4791 case DEBUG_PREPARE_STEP_IN: return "DEBUG_PREPARE_STEP_IN";
4792 } 4792 }
4793 UNREACHABLE(); 4793 UNREACHABLE();
4794 return NULL; 4794 return NULL;
4795 } 4795 }
4796 4796
4797 4797
4798 void Code::Disassemble() { 4798 void Code::Disassemble(const char* name) {
4799 PrintF("kind = %s", Kind2String(kind())); 4799 PrintF("kind = %s\n", Kind2String(kind()));
4800 if ((name != NULL) && (name[0] != '\0')) {
4801 PrintF("name = %s\n", name);
4802 }
4800 4803
4801 PrintF("\nInstructions (size = %d)\n", instruction_size()); 4804 PrintF("Instructions (size = %d)\n", instruction_size());
4802 Disassembler::Decode(NULL, this); 4805 Disassembler::Decode(NULL, this);
4803 PrintF("\n"); 4806 PrintF("\n");
4804 4807
4805 PrintF("RelocInfo (size = %d)\n", relocation_size()); 4808 PrintF("RelocInfo (size = %d)\n", relocation_size());
4806 for (RelocIterator it(this); !it.done(); it.next()) 4809 for (RelocIterator it(this); !it.done(); it.next())
4807 it.rinfo()->Print(); 4810 it.rinfo()->Print();
4808 PrintF("\n"); 4811 PrintF("\n");
4809 } 4812 }
4810 #endif // ENABLE_DISASSEMBLER 4813 #endif // ENABLE_DISASSEMBLER
4811 4814
(...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after
7272 // No break point. 7275 // No break point.
7273 if (break_point_objects()->IsUndefined()) return 0; 7276 if (break_point_objects()->IsUndefined()) return 0;
7274 // Single beak point. 7277 // Single beak point.
7275 if (!break_point_objects()->IsFixedArray()) return 1; 7278 if (!break_point_objects()->IsFixedArray()) return 1;
7276 // Multiple break points. 7279 // Multiple break points.
7277 return FixedArray::cast(break_point_objects())->length(); 7280 return FixedArray::cast(break_point_objects())->length();
7278 } 7281 }
7279 7282
7280 7283
7281 } } // namespace v8::internal 7284 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698