Chromium Code Reviews

Side by Side Diff: src/objects.cc

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
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 8971 matching lines...)
8982 if (function_id != Translation::kSelfLiteralId) { 8982 if (function_id != Translation::kSelfLiteralId) {
8983 Object* function = LiteralArray()->get(function_id); 8983 Object* function = LiteralArray()->get(function_id);
8984 JSFunction::cast(function)->PrintName(out); 8984 JSFunction::cast(function)->PrintName(out);
8985 } else { 8985 } else {
8986 PrintF(out, "<self>"); 8986 PrintF(out, "<self>");
8987 } 8987 }
8988 PrintF(out, ", height=%u}", height); 8988 PrintF(out, ", height=%u}", height);
8989 break; 8989 break;
8990 } 8990 }
8991 8991
8992 case Translation::COMPILED_STUB_FRAME: {
8993 Code::Kind stub_kind = static_cast<Code::Kind>(iterator.Next());
8994 PrintF(out, "{kind=%d}", stub_kind);
8995 break;
8996 }
8997
8992 case Translation::ARGUMENTS_ADAPTOR_FRAME: 8998 case Translation::ARGUMENTS_ADAPTOR_FRAME:
8993 case Translation::CONSTRUCT_STUB_FRAME: { 8999 case Translation::CONSTRUCT_STUB_FRAME: {
8994 int function_id = iterator.Next(); 9000 int function_id = iterator.Next();
8995 JSFunction* function = 9001 JSFunction* function =
8996 JSFunction::cast(LiteralArray()->get(function_id)); 9002 JSFunction::cast(LiteralArray()->get(function_id));
8997 unsigned height = iterator.Next(); 9003 unsigned height = iterator.Next();
8998 PrintF(out, "{function="); 9004 PrintF(out, "{function=");
8999 function->PrintName(out); 9005 function->PrintName(out);
9000 PrintF(out, ", height=%u}", height); 9006 PrintF(out, ", height=%u}", height);
9001 break; 9007 break;
(...skipping 94 matching lines...)
9096 FullCodeGenerator::StateField::decode(pc_and_state))); 9102 FullCodeGenerator::StateField::decode(pc_and_state)));
9097 } 9103 }
9098 } 9104 }
9099 9105
9100 9106
9101 // Identify kind of code. 9107 // Identify kind of code.
9102 const char* Code::Kind2String(Kind kind) { 9108 const char* Code::Kind2String(Kind kind) {
9103 switch (kind) { 9109 switch (kind) {
9104 case FUNCTION: return "FUNCTION"; 9110 case FUNCTION: return "FUNCTION";
9105 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION"; 9111 case OPTIMIZED_FUNCTION: return "OPTIMIZED_FUNCTION";
9112 case COMPILED_STUB: return "COMPILED_STUB";
9106 case STUB: return "STUB"; 9113 case STUB: return "STUB";
9107 case BUILTIN: return "BUILTIN"; 9114 case BUILTIN: return "BUILTIN";
9108 case LOAD_IC: return "LOAD_IC"; 9115 case LOAD_IC: return "LOAD_IC";
9109 case KEYED_LOAD_IC: return "KEYED_LOAD_IC"; 9116 case KEYED_LOAD_IC: return "KEYED_LOAD_IC";
9110 case STORE_IC: return "STORE_IC"; 9117 case STORE_IC: return "STORE_IC";
9111 case KEYED_STORE_IC: return "KEYED_STORE_IC"; 9118 case KEYED_STORE_IC: return "KEYED_STORE_IC";
9112 case CALL_IC: return "CALL_IC"; 9119 case CALL_IC: return "CALL_IC";
9113 case KEYED_CALL_IC: return "KEYED_CALL_IC"; 9120 case KEYED_CALL_IC: return "KEYED_CALL_IC";
9114 case UNARY_OP_IC: return "UNARY_OP_IC"; 9121 case UNARY_OP_IC: return "UNARY_OP_IC";
9115 case BINARY_OP_IC: return "BINARY_OP_IC"; 9122 case BINARY_OP_IC: return "BINARY_OP_IC";
(...skipping 99 matching lines...)
9215 DeoptimizationOutputData* data = 9222 DeoptimizationOutputData* data =
9216 DeoptimizationOutputData::cast(this->deoptimization_data()); 9223 DeoptimizationOutputData::cast(this->deoptimization_data());
9217 data->DeoptimizationOutputDataPrint(out); 9224 data->DeoptimizationOutputDataPrint(out);
9218 } else if (kind() == OPTIMIZED_FUNCTION) { 9225 } else if (kind() == OPTIMIZED_FUNCTION) {
9219 DeoptimizationInputData* data = 9226 DeoptimizationInputData* data =
9220 DeoptimizationInputData::cast(this->deoptimization_data()); 9227 DeoptimizationInputData::cast(this->deoptimization_data());
9221 data->DeoptimizationInputDataPrint(out); 9228 data->DeoptimizationInputDataPrint(out);
9222 } 9229 }
9223 PrintF("\n"); 9230 PrintF("\n");
9224 9231
9225 if (kind() == OPTIMIZED_FUNCTION) { 9232 if (kind() == OPTIMIZED_FUNCTION || kind() == COMPILED_STUB) {
9226 SafepointTable table(this); 9233 SafepointTable table(this);
9227 PrintF(out, "Safepoints (size = %u)\n", table.size()); 9234 PrintF(out, "Safepoints (size = %u)\n", table.size());
9228 for (unsigned i = 0; i < table.length(); i++) { 9235 for (unsigned i = 0; i < table.length(); i++) {
9229 unsigned pc_offset = table.GetPcOffset(i); 9236 unsigned pc_offset = table.GetPcOffset(i);
9230 PrintF(out, "%p %4d ", (instruction_start() + pc_offset), pc_offset); 9237 PrintF(out, "%p %4d ", (instruction_start() + pc_offset), pc_offset);
9231 table.PrintEntry(i); 9238 table.PrintEntry(i);
9232 PrintF(out, " (sp -> fp)"); 9239 PrintF(out, " (sp -> fp)");
9233 SafepointEntry entry = table.GetEntry(i); 9240 SafepointEntry entry = table.GetEntry(i);
9234 if (entry.deoptimization_index() != Safepoint::kNoDeoptimizationIndex) { 9241 if (entry.deoptimization_index() != Safepoint::kNoDeoptimizationIndex) {
9235 PrintF(out, " %6d", entry.deoptimization_index()); 9242 PrintF(out, " %6d", entry.deoptimization_index());
(...skipping 4649 matching lines...)
13885 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13892 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13886 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13893 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13887 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13894 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13888 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13895 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13889 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13896 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13890 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13897 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13891 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13898 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13892 } 13899 }
13893 13900
13894 } } // namespace v8::internal 13901 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine