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) { | |
titzer
2013/09/04 09:23:23
ASSERT(kind() == FUNCTION)
Yang
2013/09/04 12:55:12
Done. The BackEdgeTableIterator asserts the same,
| |
10329 DisallowHeapAllocation no_gc; | |
10330 for (FullCodeGenerator::BackEdgeTableIterator it(this, &no_gc); | |
10331 !it.Done(); | |
10332 it.Next()) { | |
10333 if (it.pc_offset() == pc_offset) return it.ast_id(); | |
10334 } | |
10335 return BailoutId::None(); | |
10336 } | |
10337 | |
10338 | |
10328 bool Code::allowed_in_shared_map_code_cache() { | 10339 bool Code::allowed_in_shared_map_code_cache() { |
10329 return is_keyed_load_stub() || is_keyed_store_stub() || | 10340 return is_keyed_load_stub() || is_keyed_store_stub() || |
10330 (is_compare_ic_stub() && | 10341 (is_compare_ic_stub() && |
10331 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT); | 10342 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT); |
10332 } | 10343 } |
10333 | 10344 |
10334 | 10345 |
10335 void Code::MakeCodeAgeSequenceYoung(byte* sequence) { | 10346 void Code::MakeCodeAgeSequenceYoung(byte* sequence) { |
10336 PatchPlatformCodeAge(sequence, kNoAge, NO_MARKING_PARITY); | 10347 PatchPlatformCodeAge(sequence, kNoAge, NO_MARKING_PARITY); |
10337 } | 10348 } |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10778 PrintF(out, " argc: %d", entry.argument_count()); | 10789 PrintF(out, " argc: %d", entry.argument_count()); |
10779 } | 10790 } |
10780 PrintF(out, "\n"); | 10791 PrintF(out, "\n"); |
10781 } | 10792 } |
10782 PrintF(out, "\n"); | 10793 PrintF(out, "\n"); |
10783 } else if (kind() == FUNCTION) { | 10794 } else if (kind() == FUNCTION) { |
10784 unsigned offset = back_edge_table_offset(); | 10795 unsigned offset = back_edge_table_offset(); |
10785 // If there is no back edge table, the "table start" will be at or after | 10796 // 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. | 10797 // (due to alignment) the end of the instruction stream. |
10787 if (static_cast<int>(offset) < instruction_size()) { | 10798 if (static_cast<int>(offset) < instruction_size()) { |
10788 FullCodeGenerator::BackEdgeTableIterator back_edges(this); | 10799 DisallowHeapAllocation no_gc; |
10800 FullCodeGenerator::BackEdgeTableIterator back_edges(this, &no_gc); | |
10789 | 10801 |
10790 PrintF(out, "Back edges (size = %u)\n", back_edges.table_length()); | 10802 PrintF(out, "Back edges (size = %u)\n", back_edges.table_length()); |
10791 PrintF(out, "ast_id pc_offset loop_depth\n"); | 10803 PrintF(out, "ast_id pc_offset loop_depth\n"); |
10792 | 10804 |
10793 for ( ; !back_edges.Done(); back_edges.Next()) { | 10805 for ( ; !back_edges.Done(); back_edges.Next()) { |
10794 PrintF(out, "%6d %9u %10u\n", back_edges.ast_id().ToInt(), | 10806 PrintF(out, "%6d %9u %10u\n", back_edges.ast_id().ToInt(), |
10795 back_edges.pc_offset(), | 10807 back_edges.pc_offset(), |
10796 back_edges.loop_depth()); | 10808 back_edges.loop_depth()); |
10797 } | 10809 } |
10798 | 10810 |
(...skipping 5169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15968 #define ERROR_MESSAGES_TEXTS(C, T) T, | 15980 #define ERROR_MESSAGES_TEXTS(C, T) T, |
15969 static const char* error_messages_[] = { | 15981 static const char* error_messages_[] = { |
15970 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 15982 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
15971 }; | 15983 }; |
15972 #undef ERROR_MESSAGES_TEXTS | 15984 #undef ERROR_MESSAGES_TEXTS |
15973 return error_messages_[reason]; | 15985 return error_messages_[reason]; |
15974 } | 15986 } |
15975 | 15987 |
15976 | 15988 |
15977 } } // namespace v8::internal | 15989 } } // namespace v8::internal |
OLD | NEW |