| OLD | NEW |
| 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 8933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8944 if (function_id != Translation::kSelfLiteralId) { | 8944 if (function_id != Translation::kSelfLiteralId) { |
| 8945 Object* function = LiteralArray()->get(function_id); | 8945 Object* function = LiteralArray()->get(function_id); |
| 8946 JSFunction::cast(function)->PrintName(out); | 8946 JSFunction::cast(function)->PrintName(out); |
| 8947 } else { | 8947 } else { |
| 8948 PrintF(out, "<self>"); | 8948 PrintF(out, "<self>"); |
| 8949 } | 8949 } |
| 8950 PrintF(out, ", height=%u}", height); | 8950 PrintF(out, ", height=%u}", height); |
| 8951 break; | 8951 break; |
| 8952 } | 8952 } |
| 8953 | 8953 |
| 8954 case Translation::COMPILED_STUB_PSEUDO_FRAME: { |
| 8955 Code::Kind stub_kind = static_cast<Code::Kind>(iterator.Next()); |
| 8956 PrintF(out, "{kind=%d}", stub_kind); |
| 8957 break; |
| 8958 } |
| 8959 |
| 8954 case Translation::ARGUMENTS_ADAPTOR_FRAME: | 8960 case Translation::ARGUMENTS_ADAPTOR_FRAME: |
| 8955 case Translation::CONSTRUCT_STUB_FRAME: { | 8961 case Translation::CONSTRUCT_STUB_FRAME: { |
| 8956 int function_id = iterator.Next(); | 8962 int function_id = iterator.Next(); |
| 8957 JSFunction* function = | 8963 JSFunction* function = |
| 8958 JSFunction::cast(LiteralArray()->get(function_id)); | 8964 JSFunction::cast(LiteralArray()->get(function_id)); |
| 8959 unsigned height = iterator.Next(); | 8965 unsigned height = iterator.Next(); |
| 8960 PrintF(out, "{function="); | 8966 PrintF(out, "{function="); |
| 8961 function->PrintName(out); | 8967 function->PrintName(out); |
| 8962 PrintF(out, ", height=%u}", height); | 8968 PrintF(out, ", height=%u}", height); |
| 8963 break; | 8969 break; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9058 FullCodeGenerator::StateField::decode(pc_and_state))); | 9064 FullCodeGenerator::StateField::decode(pc_and_state))); |
| 9059 } | 9065 } |
| 9060 } | 9066 } |
| 9061 | 9067 |
| 9062 | 9068 |
| 9063 // Identify kind of code. | 9069 // Identify kind of code. |
| 9064 const char* Code::Kind2String(Kind kind) { | 9070 const char* Code::Kind2String(Kind kind) { |
| 9065 switch (kind) { | 9071 switch (kind) { |
| 9066 case FUNCTION: return "FUNCTION"; | 9072 case FUNCTION: return "FUNCTION"; |
| 9067 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION"; | 9073 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION"; |
| 9074 case COMPILED_STUB: return "COMPILED_STUB"; |
| 9068 case STUB: return "STUB"; | 9075 case STUB: return "STUB"; |
| 9069 case BUILTIN: return "BUILTIN"; | 9076 case BUILTIN: return "BUILTIN"; |
| 9070 case LOAD_IC: return "LOAD_IC"; | 9077 case LOAD_IC: return "LOAD_IC"; |
| 9071 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; | 9078 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; |
| 9072 case STORE_IC: return "STORE_IC"; | 9079 case STORE_IC: return "STORE_IC"; |
| 9073 case KEYED_STORE_IC: return "KEYED_STORE_IC"; | 9080 case KEYED_STORE_IC: return "KEYED_STORE_IC"; |
| 9074 case CALL_IC: return "CALL_IC"; | 9081 case CALL_IC: return "CALL_IC"; |
| 9075 case KEYED_CALL_IC: return "KEYED_CALL_IC"; | 9082 case KEYED_CALL_IC: return "KEYED_CALL_IC"; |
| 9076 case UNARY_OP_IC: return "UNARY_OP_IC"; | 9083 case UNARY_OP_IC: return "UNARY_OP_IC"; |
| 9077 case BINARY_OP_IC: return "BINARY_OP_IC"; | 9084 case BINARY_OP_IC: return "BINARY_OP_IC"; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9173 DeoptimizationOutputData* data = | 9180 DeoptimizationOutputData* data = |
| 9174 DeoptimizationOutputData::cast(this->deoptimization_data()); | 9181 DeoptimizationOutputData::cast(this->deoptimization_data()); |
| 9175 data->DeoptimizationOutputDataPrint(out); | 9182 data->DeoptimizationOutputDataPrint(out); |
| 9176 } else if (kind() == OPTIMIZED_FUNCTION) { | 9183 } else if (kind() == OPTIMIZED_FUNCTION) { |
| 9177 DeoptimizationInputData* data = | 9184 DeoptimizationInputData* data = |
| 9178 DeoptimizationInputData::cast(this->deoptimization_data()); | 9185 DeoptimizationInputData::cast(this->deoptimization_data()); |
| 9179 data->DeoptimizationInputDataPrint(out); | 9186 data->DeoptimizationInputDataPrint(out); |
| 9180 } | 9187 } |
| 9181 PrintF("\n"); | 9188 PrintF("\n"); |
| 9182 | 9189 |
| 9183 if (kind() == OPTIMIZED_FUNCTION) { | 9190 if (kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB) { |
| 9184 SafepointTable table(this); | 9191 SafepointTable table(this); |
| 9185 PrintF(out, "Safepoints (size = %u)\n", table.size()); | 9192 PrintF(out, "Safepoints (size = %u)\n", table.size()); |
| 9186 for (unsigned i = 0; i < table.length(); i++) { | 9193 for (unsigned i = 0; i < table.length(); i++) { |
| 9187 unsigned pc_offset = table.GetPcOffset(i); | 9194 unsigned pc_offset = table.GetPcOffset(i); |
| 9188 PrintF(out, "%p %4d ", (instruction_start() + pc_offset), pc_offset); | 9195 PrintF(out, "%p %4d ", (instruction_start() + pc_offset), pc_offset); |
| 9189 table.PrintEntry(i); | 9196 table.PrintEntry(i); |
| 9190 PrintF(out, " (sp -> fp)"); | 9197 PrintF(out, " (sp -> fp)"); |
| 9191 SafepointEntry entry = table.GetEntry(i); | 9198 SafepointEntry entry = table.GetEntry(i); |
| 9192 if (entry.deoptimization_index() != Safepoint::kNoDeoptimizationIndex) { | 9199 if (entry.deoptimization_index() != Safepoint::kNoDeoptimizationIndex) { |
| 9193 PrintF(out, " %6d", entry.deoptimization_index()); | 9200 PrintF(out, " %6d", entry.deoptimization_index()); |
| (...skipping 4665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13859 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13866 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 13860 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13867 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 13861 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13868 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 13862 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13869 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 13863 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13870 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 13864 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13871 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 13865 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13872 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 13866 } | 13873 } |
| 13867 | 13874 |
| 13868 } } // namespace v8::internal | 13875 } } // namespace v8::internal |
| OLD | NEW |