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

Side by Side Diff: src/heap-inl.h

Issue 7069017: Update write-barrier when short-circuiting strings during scavenge. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 6 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/heap.cc ('k') | test/mjsunit/regress/short-circuit.js » ('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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 // point to an old space, the code space, or the to space of the new 409 // point to an old space, the code space, or the to space of the new
410 // generation. 410 // generation.
411 MapWord first_word = object->map_word(); 411 MapWord first_word = object->map_word();
412 412
413 // If the first word is a forwarding address, the object has already been 413 // If the first word is a forwarding address, the object has already been
414 // copied. 414 // copied.
415 if (first_word.IsForwardingAddress()) { 415 if (first_word.IsForwardingAddress()) {
416 HeapObject* dest = first_word.ToForwardingAddress(); 416 HeapObject* dest = first_word.ToForwardingAddress();
417 ASSERT(HEAP->InFromSpace(*p)); 417 ASSERT(HEAP->InFromSpace(*p));
418 *p = dest; 418 *p = dest;
419 Address slot = reinterpret_cast<Address>(p);
420 if (HEAP->InNewSpace(dest) && !HEAP->InNewSpace(slot)) {
421 ASSERT(HEAP->InToSpace(dest));
422 HEAP->store_buffer_.EnterDirectlyIntoStoreBuffer(slot);
423 }
424 return; 419 return;
425 } 420 }
426 421
427 // Call the slow part of scavenge object. 422 // Call the slow part of scavenge object.
428 return ScavengeObjectSlow(p, object); 423 return ScavengeObjectSlow(p, object);
429 } 424 }
430 425
431 426
432 bool Heap::CollectGarbage(AllocationSpace space) { 427 bool Heap::CollectGarbage(AllocationSpace space) {
433 return CollectGarbage(space, SelectGarbageCollector(space)); 428 return CollectGarbage(space, SelectGarbageCollector(space));
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 688
694 689
695 Heap* _inline_get_heap_() { 690 Heap* _inline_get_heap_() {
696 return HEAP; 691 return HEAP;
697 } 692 }
698 693
699 694
700 } } // namespace v8::internal 695 } } // namespace v8::internal
701 696
702 #endif // V8_HEAP_INL_H_ 697 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | test/mjsunit/regress/short-circuit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698