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 10349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10360 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); | 10360 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); |
10361 } | 10361 } |
10362 } | 10362 } |
10363 } | 10363 } |
10364 } | 10364 } |
10365 | 10365 |
10366 | 10366 |
10367 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10367 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
10368 DisallowHeapAllocation no_gc; | 10368 DisallowHeapAllocation no_gc; |
10369 ASSERT(kind() == FUNCTION); | 10369 ASSERT(kind() == FUNCTION); |
10370 for (FullCodeGenerator::BackEdgeTableIterator it(this, &no_gc); | 10370 BackEdgeTable back_edges(this, &no_gc); |
10371 !it.Done(); | 10371 for (uint32_t i = 0; i < back_edges.length(); i++) { |
10372 it.Next()) { | 10372 if (back_edges.pc_offset(i) == pc_offset) return back_edges.ast_id(i); |
10373 if (it.pc_offset() == pc_offset) return it.ast_id(); | |
10374 } | 10373 } |
10375 return BailoutId::None(); | 10374 return BailoutId::None(); |
10376 } | 10375 } |
10377 | 10376 |
10378 | 10377 |
10379 bool Code::allowed_in_shared_map_code_cache() { | 10378 bool Code::allowed_in_shared_map_code_cache() { |
10380 return is_keyed_load_stub() || is_keyed_store_stub() || | 10379 return is_keyed_load_stub() || is_keyed_store_stub() || |
10381 (is_compare_ic_stub() && | 10380 (is_compare_ic_stub() && |
10382 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT); | 10381 ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT); |
10383 } | 10382 } |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10831 } | 10830 } |
10832 PrintF(out, "\n"); | 10831 PrintF(out, "\n"); |
10833 } | 10832 } |
10834 PrintF(out, "\n"); | 10833 PrintF(out, "\n"); |
10835 } else if (kind() == FUNCTION) { | 10834 } else if (kind() == FUNCTION) { |
10836 unsigned offset = back_edge_table_offset(); | 10835 unsigned offset = back_edge_table_offset(); |
10837 // If there is no back edge table, the "table start" will be at or after | 10836 // If there is no back edge table, the "table start" will be at or after |
10838 // (due to alignment) the end of the instruction stream. | 10837 // (due to alignment) the end of the instruction stream. |
10839 if (static_cast<int>(offset) < instruction_size()) { | 10838 if (static_cast<int>(offset) < instruction_size()) { |
10840 DisallowHeapAllocation no_gc; | 10839 DisallowHeapAllocation no_gc; |
10841 FullCodeGenerator::BackEdgeTableIterator back_edges(this, &no_gc); | 10840 BackEdgeTable back_edges(this, &no_gc); |
10842 | 10841 |
10843 PrintF(out, "Back edges (size = %u)\n", back_edges.table_length()); | 10842 PrintF(out, "Back edges (size = %u)\n", back_edges.length()); |
10844 PrintF(out, "ast_id pc_offset loop_depth\n"); | 10843 PrintF(out, "ast_id pc_offset loop_depth\n"); |
10845 | 10844 |
10846 for ( ; !back_edges.Done(); back_edges.Next()) { | 10845 for (uint32_t i = 0; i < back_edges.length(); i++) { |
10847 PrintF(out, "%6d %9u %10u\n", back_edges.ast_id().ToInt(), | 10846 PrintF(out, "%6d %9u %10u\n", back_edges.ast_id(i).ToInt(), |
10848 back_edges.pc_offset(), | 10847 back_edges.pc_offset(i), |
10849 back_edges.loop_depth()); | 10848 back_edges.loop_depth(i)); |
10850 } | 10849 } |
10851 | 10850 |
10852 PrintF(out, "\n"); | 10851 PrintF(out, "\n"); |
10853 } | 10852 } |
10854 #ifdef OBJECT_PRINT | 10853 #ifdef OBJECT_PRINT |
10855 if (!type_feedback_info()->IsUndefined()) { | 10854 if (!type_feedback_info()->IsUndefined()) { |
10856 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out); | 10855 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out); |
10857 PrintF(out, "\n"); | 10856 PrintF(out, "\n"); |
10858 } | 10857 } |
10859 #endif | 10858 #endif |
(...skipping 5237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16097 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16096 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16098 static const char* error_messages_[] = { | 16097 static const char* error_messages_[] = { |
16099 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16098 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16100 }; | 16099 }; |
16101 #undef ERROR_MESSAGES_TEXTS | 16100 #undef ERROR_MESSAGES_TEXTS |
16102 return error_messages_[reason]; | 16101 return error_messages_[reason]; |
16103 } | 16102 } |
16104 | 16103 |
16105 | 16104 |
16106 } } // namespace v8::internal | 16105 } } // namespace v8::internal |
OLD | NEW |