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

Side by Side Diff: src/objects.cc

Issue 9265004: Support inlining at call-sites with mismatched number of arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: finished implementation, extended tests, ported to x64&arm Created 8 years, 11 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 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 8095 matching lines...) Expand 10 before | Expand all | Expand 10 after
8106 PrintF(out, "\n"); 8106 PrintF(out, "\n");
8107 continue; 8107 continue;
8108 } 8108 }
8109 // Print details of the frame translation. 8109 // Print details of the frame translation.
8110 int translation_index = TranslationIndex(i)->value(); 8110 int translation_index = TranslationIndex(i)->value();
8111 TranslationIterator iterator(TranslationByteArray(), translation_index); 8111 TranslationIterator iterator(TranslationByteArray(), translation_index);
8112 Translation::Opcode opcode = 8112 Translation::Opcode opcode =
8113 static_cast<Translation::Opcode>(iterator.Next()); 8113 static_cast<Translation::Opcode>(iterator.Next());
8114 ASSERT(Translation::BEGIN == opcode); 8114 ASSERT(Translation::BEGIN == opcode);
8115 int frame_count = iterator.Next(); 8115 int frame_count = iterator.Next();
8116 PrintF(out, " %s {count=%d}\n", Translation::StringFor(opcode), 8116 int jsframe_count = iterator.Next();
8117 frame_count); 8117 PrintF(out, " %s {frame count=%d, js frame count=%d}\n",
8118 Translation::StringFor(opcode),
8119 frame_count,
8120 jsframe_count);
8118 8121
8119 while (iterator.HasNext() && 8122 while (iterator.HasNext() &&
8120 Translation::BEGIN != 8123 Translation::BEGIN !=
8121 (opcode = static_cast<Translation::Opcode>(iterator.Next()))) { 8124 (opcode = static_cast<Translation::Opcode>(iterator.Next()))) {
8122 PrintF(out, "%24s %s ", "", Translation::StringFor(opcode)); 8125 PrintF(out, "%24s %s ", "", Translation::StringFor(opcode));
8123 8126
8124 switch (opcode) { 8127 switch (opcode) {
8125 case Translation::BEGIN: 8128 case Translation::BEGIN:
8126 UNREACHABLE(); 8129 UNREACHABLE();
8127 break; 8130 break;
8128 8131
8129 case Translation::FRAME: { 8132 case Translation::JS_FRAME: {
8130 int ast_id = iterator.Next(); 8133 int ast_id = iterator.Next();
8131 int function_id = iterator.Next(); 8134 int function_id = iterator.Next();
8132 JSFunction* function = 8135 JSFunction* function =
8133 JSFunction::cast(LiteralArray()->get(function_id)); 8136 JSFunction::cast(LiteralArray()->get(function_id));
8134 unsigned height = iterator.Next(); 8137 unsigned height = iterator.Next();
8135 PrintF(out, "{ast_id=%d, function=", ast_id); 8138 PrintF(out, "{ast_id=%d, function=", ast_id);
8136 function->PrintName(out); 8139 function->PrintName(out);
8137 PrintF(out, ", height=%u}", height); 8140 PrintF(out, ", height=%u}", height);
8138 break; 8141 break;
8139 } 8142 }
8140 8143
8144 case Translation::ARGUMENTS_ADAPTOR_FRAME: {
8145 unsigned height = iterator.Next();
8146 PrintF(out, "{arguments adaptor, height=%d}", height);
8147 break;
8148 }
8149
8141 case Translation::DUPLICATE: 8150 case Translation::DUPLICATE:
8142 break; 8151 break;
8143 8152
8144 case Translation::REGISTER: { 8153 case Translation::REGISTER: {
8145 int reg_code = iterator.Next(); 8154 int reg_code = iterator.Next();
8146 PrintF(out, "{input=%s}", converter.NameOfCPURegister(reg_code)); 8155 PrintF(out, "{input=%s}", converter.NameOfCPURegister(reg_code));
8147 break; 8156 break;
8148 } 8157 }
8149 8158
8150 case Translation::INT32_REGISTER: { 8159 case Translation::INT32_REGISTER: {
(...skipping 4774 matching lines...) Expand 10 before | Expand all | Expand 10 after
12925 if (break_point_objects()->IsUndefined()) return 0; 12934 if (break_point_objects()->IsUndefined()) return 0;
12926 // Single break point. 12935 // Single break point.
12927 if (!break_point_objects()->IsFixedArray()) return 1; 12936 if (!break_point_objects()->IsFixedArray()) return 1;
12928 // Multiple break points. 12937 // Multiple break points.
12929 return FixedArray::cast(break_point_objects())->length(); 12938 return FixedArray::cast(break_point_objects())->length();
12930 } 12939 }
12931 #endif // ENABLE_DEBUGGER_SUPPORT 12940 #endif // ENABLE_DEBUGGER_SUPPORT
12932 12941
12933 12942
12934 } } // namespace v8::internal 12943 } } // namespace v8::internal
OLDNEW
« src/ia32/frames-ia32.h ('K') | « src/lithium.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698