OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 9079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9090 return statement_position; | 9090 return statement_position; |
9091 } | 9091 } |
9092 | 9092 |
9093 | 9093 |
9094 SafepointEntry Code::GetSafepointEntry(Address pc) { | 9094 SafepointEntry Code::GetSafepointEntry(Address pc) { |
9095 SafepointTable table(this); | 9095 SafepointTable table(this); |
9096 return table.FindEntry(pc); | 9096 return table.FindEntry(pc); |
9097 } | 9097 } |
9098 | 9098 |
9099 | 9099 |
9100 void Code::SetNoStackCheckTable() { | |
9101 // Indicate the absence of a stack-check table by a table start after the | |
9102 // end of the instructions. Table start must be aligned, so round up. | |
9103 set_stack_check_table_offset(RoundUp(instruction_size(), kIntSize)); | |
9104 } | |
9105 | |
9106 | |
9107 Map* Code::FindFirstMap() { | 9100 Map* Code::FindFirstMap() { |
9108 ASSERT(is_inline_cache_stub()); | 9101 ASSERT(is_inline_cache_stub()); |
9109 AssertNoAllocation no_allocation; | 9102 AssertNoAllocation no_allocation; |
9110 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | 9103 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
9111 for (RelocIterator it(this, mask); !it.done(); it.next()) { | 9104 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
9112 RelocInfo* info = it.rinfo(); | 9105 RelocInfo* info = it.rinfo(); |
9113 Object* object = info->target_object(); | 9106 Object* object = info->target_object(); |
9114 if (object->IsMap()) return Map::cast(object); | 9107 if (object->IsMap()) return Map::cast(object); |
9115 } | 9108 } |
9116 return NULL; | 9109 return NULL; |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9615 } else { | 9608 } else { |
9616 PrintF(out, " <none>"); | 9609 PrintF(out, " <none>"); |
9617 } | 9610 } |
9618 if (entry.argument_count() > 0) { | 9611 if (entry.argument_count() > 0) { |
9619 PrintF(out, " argc: %d", entry.argument_count()); | 9612 PrintF(out, " argc: %d", entry.argument_count()); |
9620 } | 9613 } |
9621 PrintF(out, "\n"); | 9614 PrintF(out, "\n"); |
9622 } | 9615 } |
9623 PrintF(out, "\n"); | 9616 PrintF(out, "\n"); |
9624 } else if (kind() == FUNCTION) { | 9617 } else if (kind() == FUNCTION) { |
9625 unsigned offset = stack_check_table_offset(); | 9618 unsigned offset = back_edge_table_offset(); |
9626 // If there is no stack check table, the "table start" will at or after | 9619 // If there is no back table, the "table start" will at or after |
Jakob Kummerow
2013/04/09 17:23:25
nit: s/back/back edge/, s/will at/will be at/
Yang
2013/04/10 08:08:30
Done.
| |
9627 // (due to alignment) the end of the instruction stream. | 9620 // (due to alignment) the end of the instruction stream. |
9628 if (static_cast<int>(offset) < instruction_size()) { | 9621 if (static_cast<int>(offset) < instruction_size()) { |
9629 unsigned* address = | 9622 Address back_edge_cursor = instruction_start() + offset; |
9630 reinterpret_cast<unsigned*>(instruction_start() + offset); | 9623 uint32_t table_length = Memory::uint32_at(back_edge_cursor); |
9631 unsigned length = address[0]; | 9624 PrintF(out, "Back edges (size = %u)\n", table_length); |
9632 PrintF(out, "Stack checks (size = %u)\n", length); | 9625 PrintF(out, "ast_id pc_offset loop_depth\n"); |
9633 PrintF(out, "ast_id pc_offset\n"); | 9626 static const int kBackEdgeEntrySize = 2 * kIntSize + kOneByteSize; |
9634 for (unsigned i = 0; i < length; ++i) { | 9627 for (uint32_t i = 0; i < table_length; ++i) { |
9635 unsigned index = (2 * i) + 1; | 9628 uint32_t ast_id = Memory::uint32_at(back_edge_cursor + kIntSize); |
Jakob Kummerow
2013/04/09 17:23:25
typo: should be Memory::uint32_at(back_edge_cursor
Yang
2013/04/10 08:08:30
Done.
| |
9636 PrintF(out, "%6u %9u\n", address[index], address[index + 1]); | 9629 uint32_t pc_offset = Memory::uint32_at(back_edge_cursor + kIntSize); |
9630 uint8_t loop_depth = Memory::uint8_at(back_edge_cursor + 2 * kIntSize); | |
9631 PrintF(out, "%6u %9u %10u\n", ast_id, pc_offset, loop_depth); | |
9632 back_edge_cursor += kBackEdgeEntrySize; | |
9637 } | 9633 } |
9638 PrintF(out, "\n"); | 9634 PrintF(out, "\n"); |
9639 } | 9635 } |
9640 #ifdef OBJECT_PRINT | 9636 #ifdef OBJECT_PRINT |
9641 if (!type_feedback_info()->IsUndefined()) { | 9637 if (!type_feedback_info()->IsUndefined()) { |
9642 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out); | 9638 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out); |
9643 PrintF(out, "\n"); | 9639 PrintF(out, "\n"); |
9644 } | 9640 } |
9645 #endif | 9641 #endif |
9646 } | 9642 } |
(...skipping 4818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
14465 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 14461 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
14466 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 14462 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
14467 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 14463 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
14468 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 14464 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
14469 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 14465 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
14470 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 14466 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
14471 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 14467 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
14472 } | 14468 } |
14473 | 14469 |
14474 } } // namespace v8::internal | 14470 } } // namespace v8::internal |
OLD | NEW |