Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index 2183fb434a9d24400ec9814a941daa0d120de2db..c23de9448582b7439697fcc354d9bb281049779f 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -10325,6 +10325,17 @@ void Code::ClearTypeFeedbackCells(Heap* heap) { |
| } |
| +BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
|
titzer
2013/09/04 09:23:23
ASSERT(kind() == FUNCTION)
Yang
2013/09/04 12:55:12
Done. The BackEdgeTableIterator asserts the same,
|
| + DisallowHeapAllocation no_gc; |
| + for (FullCodeGenerator::BackEdgeTableIterator it(this, &no_gc); |
| + !it.Done(); |
| + it.Next()) { |
| + if (it.pc_offset() == pc_offset) return it.ast_id(); |
| + } |
| + return BailoutId::None(); |
| +} |
| + |
| + |
| bool Code::allowed_in_shared_map_code_cache() { |
| return is_keyed_load_stub() || is_keyed_store_stub() || |
| (is_compare_ic_stub() && |
| @@ -10785,7 +10796,8 @@ void Code::Disassemble(const char* name, FILE* out) { |
| // 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()) { |
| - FullCodeGenerator::BackEdgeTableIterator back_edges(this); |
| + DisallowHeapAllocation no_gc; |
| + FullCodeGenerator::BackEdgeTableIterator back_edges(this, &no_gc); |
| PrintF(out, "Back edges (size = %u)\n", back_edges.table_length()); |
| PrintF(out, "ast_id pc_offset loop_depth\n"); |