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

Side by Side Diff: src/objects.cc

Issue 8467010: Refactor embedded pointer visitors for the serializer (Closed)
Patch Set: Rebased on r9943, updated based on code review comments Created 9 years, 1 month 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/objects.h ('k') | src/serialize.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 7700 matching lines...) Expand 10 before | Expand all | Expand 10 after
7711 VisitPointer(&target); 7711 VisitPointer(&target);
7712 CHECK_EQ(target, old_target); // VisitPointer doesn't change Code* *target. 7712 CHECK_EQ(target, old_target); // VisitPointer doesn't change Code* *target.
7713 } 7713 }
7714 7714
7715 7715
7716 void ObjectVisitor::VisitEmbeddedPointer(RelocInfo* rinfo) { 7716 void ObjectVisitor::VisitEmbeddedPointer(RelocInfo* rinfo) {
7717 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); 7717 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
7718 VisitPointer(rinfo->target_object_address()); 7718 VisitPointer(rinfo->target_object_address());
7719 } 7719 }
7720 7720
7721 void ObjectVisitor::VisitExternalReference(RelocInfo* rinfo) {
7722 Address* p = rinfo->target_reference_address();
7723 VisitExternalReferences(p, p + 1);
7724 }
7721 7725
7722 void Code::InvalidateRelocation() { 7726 void Code::InvalidateRelocation() {
7723 set_relocation_info(GetHeap()->empty_byte_array()); 7727 set_relocation_info(GetHeap()->empty_byte_array());
7724 } 7728 }
7725 7729
7726 7730
7727 void Code::Relocate(intptr_t delta) { 7731 void Code::Relocate(intptr_t delta) {
7728 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { 7732 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) {
7729 it.rinfo()->apply(delta); 7733 it.rinfo()->apply(delta);
7730 } 7734 }
(...skipping 4784 matching lines...) Expand 10 before | Expand all | Expand 10 after
12515 if (break_point_objects()->IsUndefined()) return 0; 12519 if (break_point_objects()->IsUndefined()) return 0;
12516 // Single break point. 12520 // Single break point.
12517 if (!break_point_objects()->IsFixedArray()) return 1; 12521 if (!break_point_objects()->IsFixedArray()) return 1;
12518 // Multiple break points. 12522 // Multiple break points.
12519 return FixedArray::cast(break_point_objects())->length(); 12523 return FixedArray::cast(break_point_objects())->length();
12520 } 12524 }
12521 #endif // ENABLE_DEBUGGER_SUPPORT 12525 #endif // ENABLE_DEBUGGER_SUPPORT
12522 12526
12523 12527
12524 } } // namespace v8::internal 12528 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698