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

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

Issue 10915260: Reduce space usage of simple transitions and descriptors holders. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 3 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-inl.h ('k') | src/transitions.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 // 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 template<typename StaticVisitor> 324 template<typename StaticVisitor>
325 void StaticMarkingVisitor<StaticVisitor>::MarkTransitionArray( 325 void StaticMarkingVisitor<StaticVisitor>::MarkTransitionArray(
326 Heap* heap, TransitionArray* transitions) { 326 Heap* heap, TransitionArray* transitions) {
327 if (!StaticVisitor::MarkObjectWithoutPush(heap, transitions)) return; 327 if (!StaticVisitor::MarkObjectWithoutPush(heap, transitions)) return;
328 328
329 // Skip recording the descriptors_pointer slot since the cell space 329 // Skip recording the descriptors_pointer slot since the cell space
330 // is not compacted and descriptors are referenced through a cell. 330 // is not compacted and descriptors are referenced through a cell.
331 StaticVisitor::MarkObject(heap, transitions->descriptors_pointer()); 331 StaticVisitor::MarkObject(heap, transitions->descriptors_pointer());
332 332
333 // Simple transitions do not have keys nor prototype transitions.
334 if (transitions->IsSimpleTransition()) return;
335
333 if (transitions->HasPrototypeTransitions()) { 336 if (transitions->HasPrototypeTransitions()) {
334 // Mark prototype transitions array but do not push it onto marking 337 // Mark prototype transitions array but do not push it onto marking
335 // stack, this will make references from it weak. We will clean dead 338 // stack, this will make references from it weak. We will clean dead
336 // prototype transitions in ClearNonLiveTransitions. 339 // prototype transitions in ClearNonLiveTransitions.
337 Object** slot = transitions->GetPrototypeTransitionsSlot(); 340 Object** slot = transitions->GetPrototypeTransitionsSlot();
338 HeapObject* obj = HeapObject::cast(*slot); 341 HeapObject* obj = HeapObject::cast(*slot);
339 heap->mark_compact_collector()->RecordSlot(slot, slot, obj); 342 heap->mark_compact_collector()->RecordSlot(slot, slot, obj);
340 StaticVisitor::MarkObjectWithoutPush(heap, obj); 343 StaticVisitor::MarkObjectWithoutPush(heap, obj);
341 } 344 }
342 345
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 RelocIterator it(this, mode_mask); 400 RelocIterator it(this, mode_mask);
398 for (; !it.done(); it.next()) { 401 for (; !it.done(); it.next()) {
399 it.rinfo()->template Visit<StaticVisitor>(heap); 402 it.rinfo()->template Visit<StaticVisitor>(heap);
400 } 403 }
401 } 404 }
402 405
403 406
404 } } // namespace v8::internal 407 } } // namespace v8::internal
405 408
406 #endif // V8_OBJECTS_VISITING_INL_H_ 409 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/transitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698