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

Side by Side Diff: src/objects.h

Issue 179813005: Special case the recording of constant pool entries in the slot buffer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 10680 matching lines...) Expand 10 before | Expand all | Expand 10 after
10691 // Visits a contiguous arrays of pointers in the half-open range 10691 // Visits a contiguous arrays of pointers in the half-open range
10692 // [start, end). Any or all of the values may be modified on return. 10692 // [start, end). Any or all of the values may be modified on return.
10693 virtual void VisitPointers(Object** start, Object** end) = 0; 10693 virtual void VisitPointers(Object** start, Object** end) = 0;
10694 10694
10695 // Handy shorthand for visiting a single pointer. 10695 // Handy shorthand for visiting a single pointer.
10696 virtual void VisitPointer(Object** p) { VisitPointers(p, p + 1); } 10696 virtual void VisitPointer(Object** p) { VisitPointers(p, p + 1); }
10697 10697
10698 // To allow lazy clearing of inline caches the visitor has 10698 // To allow lazy clearing of inline caches the visitor has
10699 // a rich interface for iterating over Code objects.. 10699 // a rich interface for iterating over Code objects..
10700 10700
10701 // Visits a code target in a constant pool entry.
10702 virtual void VisitCodeTarget(Address target_address_pointer);
Michael Starzinger 2014/03/07 14:36:59 Can we rename this to method to make it explicit t
Michael Starzinger 2014/03/07 15:34:04 Actually, the more I think about it: Is there any
rmcilroy 2014/03/10 12:25:23 Yes you are right, this is much better - done.
10703
10701 // Visits a code target in the instruction stream. 10704 // Visits a code target in the instruction stream.
10702 virtual void VisitCodeTarget(RelocInfo* rinfo); 10705 virtual void VisitCodeTarget(RelocInfo* rinfo);
10703 10706
10704 // Visits a code entry in a JS function. 10707 // Visits a code entry in a JS function.
10705 virtual void VisitCodeEntry(Address entry_address); 10708 virtual void VisitCodeEntry(Address entry_address);
10706 10709
10707 // Visits a global property cell reference in the instruction stream. 10710 // Visits a global property cell reference in the instruction stream.
10708 virtual void VisitCell(RelocInfo* rinfo); 10711 virtual void VisitCell(RelocInfo* rinfo);
10709 10712
10710 // Visits a runtime entry in the instruction stream. 10713 // Visits a runtime entry in the instruction stream.
(...skipping 21 matching lines...) Expand all
10732 // Visits an external reference. The value may be modified on return. 10735 // Visits an external reference. The value may be modified on return.
10733 virtual void VisitExternalReference(Address* p) {} 10736 virtual void VisitExternalReference(Address* p) {}
10734 10737
10735 // Visits a handle that has an embedder-assigned class ID. 10738 // Visits a handle that has an embedder-assigned class ID.
10736 virtual void VisitEmbedderReference(Object** p, uint16_t class_id) {} 10739 virtual void VisitEmbedderReference(Object** p, uint16_t class_id) {}
10737 10740
10738 // Intended for serialization/deserialization checking: insert, or 10741 // Intended for serialization/deserialization checking: insert, or
10739 // check for the presence of, a tag at this position in the stream. 10742 // check for the presence of, a tag at this position in the stream.
10740 // Also used for marking up GC roots in heap snapshots. 10743 // Also used for marking up GC roots in heap snapshots.
10741 virtual void Synchronize(VisitorSynchronization::SyncTag tag) {} 10744 virtual void Synchronize(VisitorSynchronization::SyncTag tag) {}
10745
10746 private:
10747 void VisitCodeTargetCommon(Address target_address);
Michael Starzinger 2014/03/07 14:36:59 See comment in the .cc file.
rmcilroy 2014/03/10 12:25:23 Removed VisitCodeTarget(Address) as discussed, so
10742 }; 10748 };
10743 10749
10744 10750
10745 class StructBodyDescriptor : public 10751 class StructBodyDescriptor : public
10746 FlexibleBodyDescriptor<HeapObject::kHeaderSize> { 10752 FlexibleBodyDescriptor<HeapObject::kHeaderSize> {
10747 public: 10753 public:
10748 static inline int SizeOf(Map* map, HeapObject* object) { 10754 static inline int SizeOf(Map* map, HeapObject* object) {
10749 return map->instance_size(); 10755 return map->instance_size();
10750 } 10756 }
10751 }; 10757 };
(...skipping 21 matching lines...) Expand all
10773 } else { 10779 } else {
10774 value &= ~(1 << bit_position); 10780 value &= ~(1 << bit_position);
10775 } 10781 }
10776 return value; 10782 return value;
10777 } 10783 }
10778 }; 10784 };
10779 10785
10780 } } // namespace v8::internal 10786 } } // namespace v8::internal
10781 10787
10782 #endif // V8_OBJECTS_H_ 10788 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698