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

Unified Diff: src/objects.cc

Issue 13811014: Fix OSR for nested loops. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 1dc170410951f7e01238815dae3b62340e6f6721..e2d42abb92a2dfd82b207aed000ba5494b433104 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9097,13 +9097,6 @@ SafepointEntry Code::GetSafepointEntry(Address pc) {
}
-void Code::SetNoStackCheckTable() {
- // Indicate the absence of a stack-check table by a table start after the
- // end of the instructions. Table start must be aligned, so round up.
- set_stack_check_table_offset(RoundUp(instruction_size(), kIntSize));
-}
-
-
Map* Code::FindFirstMap() {
ASSERT(is_inline_cache_stub());
AssertNoAllocation no_allocation;
@@ -9622,18 +9615,20 @@ void Code::Disassemble(const char* name, FILE* out) {
}
PrintF(out, "\n");
} else if (kind() == FUNCTION) {
- unsigned offset = stack_check_table_offset();
- // If there is no stack check table, the "table start" will at or after
+ unsigned offset = back_edge_table_offset();
+ // If there is no back edge table, the "table start" will be at or after
// (due to alignment) the end of the instruction stream.
if (static_cast<int>(offset) < instruction_size()) {
- unsigned* address =
- reinterpret_cast<unsigned*>(instruction_start() + offset);
- unsigned length = address[0];
- PrintF(out, "Stack checks (size = %u)\n", length);
- PrintF(out, "ast_id pc_offset\n");
- for (unsigned i = 0; i < length; ++i) {
- unsigned index = (2 * i) + 1;
- PrintF(out, "%6u %9u\n", address[index], address[index + 1]);
+ Address back_edge_cursor = instruction_start() + offset;
+ uint32_t table_length = Memory::uint32_at(back_edge_cursor);
+ PrintF(out, "Back edges (size = %u)\n", table_length);
+ PrintF(out, "ast_id pc_offset loop_depth\n");
+ for (uint32_t i = 0; i < table_length; ++i) {
+ uint32_t ast_id = Memory::uint32_at(back_edge_cursor);
+ uint32_t pc_offset = Memory::uint32_at(back_edge_cursor + kIntSize);
+ uint8_t loop_depth = Memory::uint8_at(back_edge_cursor + 2 * kIntSize);
+ PrintF(out, "%6u %9u %10u\n", ast_id, pc_offset, loop_depth);
+ back_edge_cursor += FullCodeGenerator::kBackEdgeEntrySize;
}
PrintF(out, "\n");
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698