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 6932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6943 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | 6943 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
6944 for (RelocIterator it(this, mask); !it.done(); it.next()) { | 6944 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
6945 RelocInfo* info = it.rinfo(); | 6945 RelocInfo* info = it.rinfo(); |
6946 Object* object = info->target_object(); | 6946 Object* object = info->target_object(); |
6947 if (object->IsMap()) return Map::cast(object); | 6947 if (object->IsMap()) return Map::cast(object); |
6948 } | 6948 } |
6949 return NULL; | 6949 return NULL; |
6950 } | 6950 } |
6951 | 6951 |
6952 | 6952 |
6953 #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER) | 6953 #ifdef ENABLE_DISASSEMBLER |
6954 | 6954 |
6955 void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) { | 6955 void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) { |
6956 disasm::NameConverter converter; | 6956 disasm::NameConverter converter; |
6957 int deopt_count = DeoptCount(); | 6957 int deopt_count = DeoptCount(); |
6958 PrintF(out, "Deoptimization Input Data (deopt points = %d)\n", deopt_count); | 6958 PrintF(out, "Deoptimization Input Data (deopt points = %d)\n", deopt_count); |
6959 if (0 == deopt_count) return; | 6959 if (0 == deopt_count) return; |
6960 | 6960 |
6961 PrintF(out, "%6s %6s %6s %12s\n", "index", "ast id", "argc", "commands"); | 6961 PrintF(out, "%6s %6s %6s %12s\n", "index", "ast id", "argc", "commands"); |
6962 for (int i = 0; i < deopt_count; i++) { | 6962 for (int i = 0; i < deopt_count; i++) { |
6963 int command_count = 0; | 6963 int command_count = 0; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7091 for (int i = 0; i < this->DeoptPoints(); i++) { | 7091 for (int i = 0; i < this->DeoptPoints(); i++) { |
7092 int pc_and_state = this->PcAndState(i)->value(); | 7092 int pc_and_state = this->PcAndState(i)->value(); |
7093 PrintF("%6d %8d %s\n", | 7093 PrintF("%6d %8d %s\n", |
7094 this->AstId(i)->value(), | 7094 this->AstId(i)->value(), |
7095 FullCodeGenerator::PcField::decode(pc_and_state), | 7095 FullCodeGenerator::PcField::decode(pc_and_state), |
7096 FullCodeGenerator::State2String( | 7096 FullCodeGenerator::State2String( |
7097 FullCodeGenerator::StateField::decode(pc_and_state))); | 7097 FullCodeGenerator::StateField::decode(pc_and_state))); |
7098 } | 7098 } |
7099 } | 7099 } |
7100 | 7100 |
7101 #endif // defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER) | |
7102 | |
7103 | |
7104 #ifdef ENABLE_DISASSEMBLER | |
7105 | 7101 |
7106 // Identify kind of code. | 7102 // Identify kind of code. |
7107 const char* Code::Kind2String(Kind kind) { | 7103 const char* Code::Kind2String(Kind kind) { |
7108 switch (kind) { | 7104 switch (kind) { |
7109 case FUNCTION: return "FUNCTION"; | 7105 case FUNCTION: return "FUNCTION"; |
7110 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION"; | 7106 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION"; |
7111 case STUB: return "STUB"; | 7107 case STUB: return "STUB"; |
7112 case BUILTIN: return "BUILTIN"; | 7108 case BUILTIN: return "BUILTIN"; |
7113 case LOAD_IC: return "LOAD_IC"; | 7109 case LOAD_IC: return "LOAD_IC"; |
7114 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; | 7110 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; |
(...skipping 4535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11650 if (break_point_objects()->IsUndefined()) return 0; | 11646 if (break_point_objects()->IsUndefined()) return 0; |
11651 // Single beak point. | 11647 // Single beak point. |
11652 if (!break_point_objects()->IsFixedArray()) return 1; | 11648 if (!break_point_objects()->IsFixedArray()) return 1; |
11653 // Multiple break points. | 11649 // Multiple break points. |
11654 return FixedArray::cast(break_point_objects())->length(); | 11650 return FixedArray::cast(break_point_objects())->length(); |
11655 } | 11651 } |
11656 #endif | 11652 #endif |
11657 | 11653 |
11658 | 11654 |
11659 } } // namespace v8::internal | 11655 } } // namespace v8::internal |
OLD | NEW |