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 10307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10318 // Don't clear AllocationSites | 10318 // Don't clear AllocationSites |
10319 Object* value = cell->value(); | 10319 Object* value = cell->value(); |
10320 if (value == NULL || !value->IsAllocationSite()) { | 10320 if (value == NULL || !value->IsAllocationSite()) { |
10321 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); | 10321 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); |
10322 } | 10322 } |
10323 } | 10323 } |
10324 } | 10324 } |
10325 } | 10325 } |
10326 | 10326 |
10327 | 10327 |
| 10328 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset, |
| 10329 int* loop_depth_out) { |
| 10330 DisallowHeapAllocation no_gc; |
| 10331 for (FullCodeGenerator::BackEdgeTableIterator it(this, &no_gc); |
| 10332 !it.Done(); |
| 10333 it.Next()) { |
| 10334 if (it.pc_offset() == pc_offset) { |
| 10335 *loop_depth_out = it.loop_depth(); |
| 10336 return it.ast_id(); |
| 10337 } |
| 10338 } |
| 10339 return BailoutId::None(); |
| 10340 } |
| 10341 |
| 10342 |
10328 bool Code::allowed_in_shared_map_code_cache() { | 10343 bool Code::allowed_in_shared_map_code_cache() { |
10329 return is_keyed_load_stub() || is_keyed_store_stub() || | 10344 return is_keyed_load_stub() || is_keyed_store_stub() || |
10330 (is_compare_ic_stub() && | 10345 (is_compare_ic_stub() && |
10331 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT); | 10346 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT); |
10332 } | 10347 } |
10333 | 10348 |
10334 | 10349 |
10335 void Code::MakeCodeAgeSequenceYoung(byte* sequence) { | 10350 void Code::MakeCodeAgeSequenceYoung(byte* sequence) { |
10336 PatchPlatformCodeAge(sequence, kNoAge, NO_MARKING_PARITY); | 10351 PatchPlatformCodeAge(sequence, kNoAge, NO_MARKING_PARITY); |
10337 } | 10352 } |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10778 PrintF(out, " argc: %d", entry.argument_count()); | 10793 PrintF(out, " argc: %d", entry.argument_count()); |
10779 } | 10794 } |
10780 PrintF(out, "\n"); | 10795 PrintF(out, "\n"); |
10781 } | 10796 } |
10782 PrintF(out, "\n"); | 10797 PrintF(out, "\n"); |
10783 } else if (kind() == FUNCTION) { | 10798 } else if (kind() == FUNCTION) { |
10784 unsigned offset = back_edge_table_offset(); | 10799 unsigned offset = back_edge_table_offset(); |
10785 // If there is no back edge table, the "table start" will be at or after | 10800 // If there is no back edge table, the "table start" will be at or after |
10786 // (due to alignment) the end of the instruction stream. | 10801 // (due to alignment) the end of the instruction stream. |
10787 if (static_cast<int>(offset) < instruction_size()) { | 10802 if (static_cast<int>(offset) < instruction_size()) { |
10788 FullCodeGenerator::BackEdgeTableIterator back_edges(this); | 10803 DisallowHeapAllocation no_gc; |
| 10804 FullCodeGenerator::BackEdgeTableIterator back_edges(this, &no_gc); |
10789 | 10805 |
10790 PrintF(out, "Back edges (size = %u)\n", back_edges.table_length()); | 10806 PrintF(out, "Back edges (size = %u)\n", back_edges.table_length()); |
10791 PrintF(out, "ast_id pc_offset loop_depth\n"); | 10807 PrintF(out, "ast_id pc_offset loop_depth\n"); |
10792 | 10808 |
10793 for ( ; !back_edges.Done(); back_edges.Next()) { | 10809 for ( ; !back_edges.Done(); back_edges.Next()) { |
10794 PrintF(out, "%6d %9u %10u\n", back_edges.ast_id().ToInt(), | 10810 PrintF(out, "%6d %9u %10u\n", back_edges.ast_id().ToInt(), |
10795 back_edges.pc_offset(), | 10811 back_edges.pc_offset(), |
10796 back_edges.loop_depth()); | 10812 back_edges.loop_depth()); |
10797 } | 10813 } |
10798 | 10814 |
(...skipping 5169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15968 #define ERROR_MESSAGES_TEXTS(C, T) T, | 15984 #define ERROR_MESSAGES_TEXTS(C, T) T, |
15969 static const char* error_messages_[] = { | 15985 static const char* error_messages_[] = { |
15970 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 15986 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
15971 }; | 15987 }; |
15972 #undef ERROR_MESSAGES_TEXTS | 15988 #undef ERROR_MESSAGES_TEXTS |
15973 return error_messages_[reason]; | 15989 return error_messages_[reason]; |
15974 } | 15990 } |
15975 | 15991 |
15976 | 15992 |
15977 } } // namespace v8::internal | 15993 } } // namespace v8::internal |
OLD | NEW |