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

Side by Side Diff: src/objects.h

Issue 8245007: Refactor how embedded pointers are visited. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Vyacheslav Egorov. Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.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 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 7516 matching lines...) Expand 10 before | Expand all | Expand 10 after
7527 virtual void VisitExternalTwoByteString( 7527 virtual void VisitExternalTwoByteString(
7528 v8::String::ExternalStringResource** resource) {} 7528 v8::String::ExternalStringResource** resource) {}
7529 7529
7530 // Visits a debug call target in the instruction stream. 7530 // Visits a debug call target in the instruction stream.
7531 virtual void VisitDebugTarget(RelocInfo* rinfo); 7531 virtual void VisitDebugTarget(RelocInfo* rinfo);
7532 7532
7533 // Handy shorthand for visiting a single pointer. 7533 // Handy shorthand for visiting a single pointer.
7534 virtual void VisitPointer(Object** p) { VisitPointers(p, p + 1); } 7534 virtual void VisitPointer(Object** p) { VisitPointers(p, p + 1); }
7535 7535
7536 // Visit pointer embedded into a code object. 7536 // Visit pointer embedded into a code object.
7537 virtual void VisitEmbeddedPointer(Code* host, Object** p) { 7537 virtual void VisitEmbeddedPointer(RelocInfo* rinfo);
7538 // Default implementation for the convenience of users that do
7539 // not care about the host object.
7540 VisitPointer(p);
7541 }
7542 7538
7543 // Visits a contiguous arrays of external references (references to the C++ 7539 // Visits a contiguous arrays of external references (references to the C++
7544 // heap) in the half-open range [start, end). Any or all of the values 7540 // heap) in the half-open range [start, end). Any or all of the values
7545 // may be modified on return. 7541 // may be modified on return.
7546 virtual void VisitExternalReferences(Address* start, Address* end) {} 7542 virtual void VisitExternalReferences(Address* start, Address* end) {}
7547 7543
7548 inline void VisitExternalReference(Address* p) { 7544 inline void VisitExternalReference(Address* p) {
7549 VisitExternalReferences(p, p + 1); 7545 VisitExternalReferences(p, p + 1);
7550 } 7546 }
7551 7547
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
7593 } else { 7589 } else {
7594 value &= ~(1 << bit_position); 7590 value &= ~(1 << bit_position);
7595 } 7591 }
7596 return value; 7592 return value;
7597 } 7593 }
7598 }; 7594 };
7599 7595
7600 } } // namespace v8::internal 7596 } } // namespace v8::internal
7601 7597
7602 #endif // V8_OBJECTS_H_ 7598 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698