OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 6784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6795 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | 6795 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
6796 for (RelocIterator it(this, mask); !it.done(); it.next()) { | 6796 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
6797 RelocInfo* info = it.rinfo(); | 6797 RelocInfo* info = it.rinfo(); |
6798 Object* object = info->target_object(); | 6798 Object* object = info->target_object(); |
6799 if (object->IsMap()) return Map::cast(object); | 6799 if (object->IsMap()) return Map::cast(object); |
6800 } | 6800 } |
6801 return NULL; | 6801 return NULL; |
6802 } | 6802 } |
6803 | 6803 |
6804 | 6804 |
6805 #ifdef ENABLE_DISASSEMBLER | 6805 #ifdef ENABLE_DISASSEMBLER |
Søren Thygesen Gjesse
2011/06/16 05:50:36
This #ifdef should probably be moved down to line
Jakob Kummerow
2011/06/16 08:02:43
Good point. Done.
| |
6806 | 6806 |
6807 #ifdef OBJECT_PRINT | 6807 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER) |
6808 | 6808 |
6809 void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) { | 6809 void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) { |
6810 disasm::NameConverter converter; | 6810 disasm::NameConverter converter; |
6811 int deopt_count = DeoptCount(); | 6811 int deopt_count = DeoptCount(); |
6812 PrintF(out, "Deoptimization Input Data (deopt points = %d)\n", deopt_count); | 6812 PrintF(out, "Deoptimization Input Data (deopt points = %d)\n", deopt_count); |
6813 if (0 == deopt_count) return; | 6813 if (0 == deopt_count) return; |
6814 | 6814 |
6815 PrintF(out, "%6s %6s %6s %12s\n", "index", "ast id", "argc", "commands"); | 6815 PrintF(out, "%6s %6s %6s %12s\n", "index", "ast id", "argc", "commands"); |
6816 for (int i = 0; i < deopt_count; i++) { | 6816 for (int i = 0; i < deopt_count; i++) { |
6817 int command_count = 0; | 6817 int command_count = 0; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6945 for (int i = 0; i < this->DeoptPoints(); i++) { | 6945 for (int i = 0; i < this->DeoptPoints(); i++) { |
6946 int pc_and_state = this->PcAndState(i)->value(); | 6946 int pc_and_state = this->PcAndState(i)->value(); |
6947 PrintF("%6d %8d %s\n", | 6947 PrintF("%6d %8d %s\n", |
6948 this->AstId(i)->value(), | 6948 this->AstId(i)->value(), |
6949 FullCodeGenerator::PcField::decode(pc_and_state), | 6949 FullCodeGenerator::PcField::decode(pc_and_state), |
6950 FullCodeGenerator::State2String( | 6950 FullCodeGenerator::State2String( |
6951 FullCodeGenerator::StateField::decode(pc_and_state))); | 6951 FullCodeGenerator::StateField::decode(pc_and_state))); |
6952 } | 6952 } |
6953 } | 6953 } |
6954 | 6954 |
6955 #endif | 6955 #endif // defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER) |
6956 | 6956 |
6957 | 6957 |
6958 // Identify kind of code. | 6958 // Identify kind of code. |
6959 const char* Code::Kind2String(Kind kind) { | 6959 const char* Code::Kind2String(Kind kind) { |
6960 switch (kind) { | 6960 switch (kind) { |
6961 case FUNCTION: return "FUNCTION"; | 6961 case FUNCTION: return "FUNCTION"; |
6962 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION"; | 6962 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION"; |
6963 case STUB: return "STUB"; | 6963 case STUB: return "STUB"; |
6964 case BUILTIN: return "BUILTIN"; | 6964 case BUILTIN: return "BUILTIN"; |
6965 case LOAD_IC: return "LOAD_IC"; | 6965 case LOAD_IC: return "LOAD_IC"; |
(...skipping 4240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11206 if (break_point_objects()->IsUndefined()) return 0; | 11206 if (break_point_objects()->IsUndefined()) return 0; |
11207 // Single beak point. | 11207 // Single beak point. |
11208 if (!break_point_objects()->IsFixedArray()) return 1; | 11208 if (!break_point_objects()->IsFixedArray()) return 1; |
11209 // Multiple break points. | 11209 // Multiple break points. |
11210 return FixedArray::cast(break_point_objects())->length(); | 11210 return FixedArray::cast(break_point_objects())->length(); |
11211 } | 11211 } |
11212 #endif | 11212 #endif |
11213 | 11213 |
11214 | 11214 |
11215 } } // namespace v8::internal | 11215 } } // namespace v8::internal |
OLD | NEW |