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

Side by Side Diff: src/objects-visiting-inl.h

Issue 395713002: Allow embedding of ConsString objects into code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed moar comments by Yang Guo. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/x64/assembler-x64-inl.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_VISITING_INL_H_ 5 #ifndef V8_OBJECTS_VISITING_INL_H_
6 #define V8_OBJECTS_VISITING_INL_H_ 6 #define V8_OBJECTS_VISITING_INL_H_
7 7
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address)); 230 Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address));
231 heap->mark_compact_collector()->RecordCodeEntrySlot(entry_address, code); 231 heap->mark_compact_collector()->RecordCodeEntrySlot(entry_address, code);
232 StaticVisitor::MarkObject(heap, code); 232 StaticVisitor::MarkObject(heap, code);
233 } 233 }
234 234
235 235
236 template<typename StaticVisitor> 236 template<typename StaticVisitor>
237 void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer( 237 void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer(
238 Heap* heap, RelocInfo* rinfo) { 238 Heap* heap, RelocInfo* rinfo) {
239 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); 239 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
240 ASSERT(!rinfo->target_object()->IsConsString());
241 HeapObject* object = HeapObject::cast(rinfo->target_object()); 240 HeapObject* object = HeapObject::cast(rinfo->target_object());
242 heap->mark_compact_collector()->RecordRelocSlot(rinfo, object); 241 heap->mark_compact_collector()->RecordRelocSlot(rinfo, object);
243 // TODO(ulan): It could be better to record slots only for strongly embedded 242 // TODO(ulan): It could be better to record slots only for strongly embedded
244 // objects here and record slots for weakly embedded object during clearing 243 // objects here and record slots for weakly embedded object during clearing
245 // of non-live references in mark-compact. 244 // of non-live references in mark-compact.
246 if (!rinfo->host()->IsWeakObject(object)) { 245 if (!rinfo->host()->IsWeakObject(object)) {
247 StaticVisitor::MarkObject(heap, object); 246 StaticVisitor::MarkObject(heap, object);
248 } 247 }
249 } 248 }
250 249
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 RelocIterator it(this, mode_mask); 959 RelocIterator it(this, mode_mask);
961 for (; !it.done(); it.next()) { 960 for (; !it.done(); it.next()) {
962 it.rinfo()->template Visit<StaticVisitor>(heap); 961 it.rinfo()->template Visit<StaticVisitor>(heap);
963 } 962 }
964 } 963 }
965 964
966 965
967 } } // namespace v8::internal 966 } } // namespace v8::internal
968 967
969 #endif // V8_OBJECTS_VISITING_INL_H_ 968 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/x64/assembler-x64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698