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

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: Fixed nit. 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
« no previous file with comments | « src/full-codegen.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10774 matching lines...) Expand 10 before | Expand all | Expand 10 after
10785 // If there is no back edge table, the "table start" will be at or after 10785 // 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. 10786 // (due to alignment) the end of the instruction stream.
10787 if (static_cast<int>(offset) < instruction_size()) { 10787 if (static_cast<int>(offset) < instruction_size()) {
10788 Address back_edge_cursor = instruction_start() + offset; 10788 Address back_edge_cursor = instruction_start() + offset;
10789 uint32_t table_length = Memory::uint32_at(back_edge_cursor); 10789 uint32_t table_length = Memory::uint32_at(back_edge_cursor);
10790 PrintF(out, "Back edges (size = %u)\n", table_length); 10790 PrintF(out, "Back edges (size = %u)\n", table_length);
10791 PrintF(out, "ast_id pc_offset loop_depth\n"); 10791 PrintF(out, "ast_id pc_offset loop_depth\n");
10792 for (uint32_t i = 0; i < table_length; ++i) { 10792 for (uint32_t i = 0; i < table_length; ++i) {
10793 uint32_t ast_id = Memory::uint32_at(back_edge_cursor); 10793 uint32_t ast_id = Memory::uint32_at(back_edge_cursor);
10794 uint32_t pc_offset = Memory::uint32_at(back_edge_cursor + kIntSize); 10794 uint32_t pc_offset = Memory::uint32_at(back_edge_cursor + kIntSize);
10795 uint8_t loop_depth = Memory::uint8_at(back_edge_cursor + 2 * kIntSize); 10795 uint32_t loop_depth = Memory::uint32_at(back_edge_cursor +
10796 2 * kIntSize);
10796 PrintF(out, "%6u %9u %10u\n", ast_id, pc_offset, loop_depth); 10797 PrintF(out, "%6u %9u %10u\n", ast_id, pc_offset, loop_depth);
10797 back_edge_cursor += FullCodeGenerator::kBackEdgeEntrySize; 10798 back_edge_cursor += FullCodeGenerator::kBackEdgeEntrySize;
10798 } 10799 }
10799 PrintF(out, "\n"); 10800 PrintF(out, "\n");
10800 } 10801 }
10801 #ifdef OBJECT_PRINT 10802 #ifdef OBJECT_PRINT
10802 if (!type_feedback_info()->IsUndefined()) { 10803 if (!type_feedback_info()->IsUndefined()) {
10803 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out); 10804 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out);
10804 PrintF(out, "\n"); 10805 PrintF(out, "\n");
10805 } 10806 }
(...skipping 5149 matching lines...) Expand 10 before | Expand all | Expand 10 after
15955 15956
15956 void PropertyCell::AddDependentCode(Handle<Code> code) { 15957 void PropertyCell::AddDependentCode(Handle<Code> code) {
15957 Handle<DependentCode> codes = DependentCode::Insert( 15958 Handle<DependentCode> codes = DependentCode::Insert(
15958 Handle<DependentCode>(dependent_code()), 15959 Handle<DependentCode>(dependent_code()),
15959 DependentCode::kPropertyCellChangedGroup, code); 15960 DependentCode::kPropertyCellChangedGroup, code);
15960 if (*codes != dependent_code()) set_dependent_code(*codes); 15961 if (*codes != dependent_code()) set_dependent_code(*codes);
15961 } 15962 }
15962 15963
15963 15964
15964 } } // namespace v8::internal 15965 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698