Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: src/objects.cc

Issue 19248002: Fix unaligned accesses in back_edge tables. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10768 matching lines...) Expand 10 before | Expand all | Expand 10 after
10779 // If there is no back edge table, the "table start" will be at or after 10779 // If there is no back edge table, the "table start" will be at or after
10780 // (due to alignment) the end of the instruction stream. 10780 // (due to alignment) the end of the instruction stream.
10781 if (static_cast<int>(offset) < instruction_size()) { 10781 if (static_cast<int>(offset) < instruction_size()) {
10782 Address back_edge_cursor = instruction_start() + offset; 10782 Address back_edge_cursor = instruction_start() + offset;
10783 uint32_t table_length = Memory::uint32_at(back_edge_cursor); 10783 uint32_t table_length = Memory::uint32_at(back_edge_cursor);
10784 PrintF(out, "Back edges (size = %u)\n", table_length); 10784 PrintF(out, "Back edges (size = %u)\n", table_length);
10785 PrintF(out, "ast_id pc_offset loop_depth\n"); 10785 PrintF(out, "ast_id pc_offset loop_depth\n");
10786 for (uint32_t i = 0; i < table_length; ++i) { 10786 for (uint32_t i = 0; i < table_length; ++i) {
10787 uint32_t ast_id = Memory::uint32_at(back_edge_cursor); 10787 uint32_t ast_id = Memory::uint32_at(back_edge_cursor);
10788 uint32_t pc_offset = Memory::uint32_at(back_edge_cursor + kIntSize); 10788 uint32_t pc_offset = Memory::uint32_at(back_edge_cursor + kIntSize);
10789 uint8_t loop_depth = Memory::uint8_at(back_edge_cursor + 2 * kIntSize); 10789 uint32_t loop_depth = Memory::uint32_at(back_edge_cursor +
10790 2 * kIntSize);
10790 PrintF(out, "%6u %9u %10u\n", ast_id, pc_offset, loop_depth); 10791 PrintF(out, "%6u %9u %10u\n", ast_id, pc_offset, loop_depth);
10791 back_edge_cursor += FullCodeGenerator::kBackEdgeEntrySize; 10792 back_edge_cursor += FullCodeGenerator::kBackEdgeEntrySize;
10792 } 10793 }
10793 PrintF(out, "\n"); 10794 PrintF(out, "\n");
10794 } 10795 }
10795 #ifdef OBJECT_PRINT 10796 #ifdef OBJECT_PRINT
10796 if (!type_feedback_info()->IsUndefined()) { 10797 if (!type_feedback_info()->IsUndefined()) {
10797 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out); 10798 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out);
10798 PrintF(out, "\n"); 10799 PrintF(out, "\n");
10799 } 10800 }
(...skipping 5148 matching lines...) Expand 10 before | Expand all | Expand 10 after
15948 15949
15949 void PropertyCell::AddDependentCode(Handle<Code> code) { 15950 void PropertyCell::AddDependentCode(Handle<Code> code) {
15950 Handle<DependentCode> codes = DependentCode::Insert( 15951 Handle<DependentCode> codes = DependentCode::Insert(
15951 Handle<DependentCode>(dependent_code()), 15952 Handle<DependentCode>(dependent_code()),
15952 DependentCode::kPropertyCellChangedGroup, code); 15953 DependentCode::kPropertyCellChangedGroup, code);
15953 if (*codes != dependent_code()) set_dependent_code(*codes); 15954 if (*codes != dependent_code()) set_dependent_code(*codes);
15954 } 15955 }
15955 15956
15956 15957
15957 } } // namespace v8::internal 15958 } } // namespace v8::internal
OLDNEW
« src/deoptimizer.cc ('K') | « src/full-codegen.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698