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

Side by Side Diff: src/store-buffer.cc

Issue 7015043: Fix the GC branch so it compiles and runs on 64 bit. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 7 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/x64/assembler-x64.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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback callback) { 364 void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback callback) {
365 // We do not sort or remove duplicated entries from the store buffer because 365 // We do not sort or remove duplicated entries from the store buffer because
366 // we expect that callback will rebuild the store buffer thus removing 366 // we expect that callback will rebuild the store buffer thus removing
367 // all duplicates and pointers to old space. 367 // all duplicates and pointers to old space.
368 bool some_pages_to_scan = PrepareForIteration(); 368 bool some_pages_to_scan = PrepareForIteration();
369 369
370 Address* limit = old_top_; 370 Address* limit = old_top_;
371 old_top_ = old_start_; 371 old_top_ = old_start_;
372 { 372 {
373 DontMoveStoreBufferEntriesScope scope(this); 373 DontMoveStoreBufferEntriesScope scope(this);
374 if (FLAG_trace_gc) {
375 PrintF("Store buffer: %d entries\n", limit - old_start_);
376 }
377 for (Address* current = old_start_; current < limit; current++) { 374 for (Address* current = old_start_; current < limit; current++) {
378 #ifdef DEBUG 375 #ifdef DEBUG
379 Address* saved_top = old_top_; 376 Address* saved_top = old_top_;
380 #endif 377 #endif
381 Object** cell = reinterpret_cast<Object**>(*current); 378 Object** cell = reinterpret_cast<Object**>(*current);
382 Object* object = *cell; 379 Object* object = *cell;
383 // May be invalid if object is not in new space. 380 // May be invalid if object is not in new space.
384 HeapObject* heap_object = reinterpret_cast<HeapObject*>(object); 381 HeapObject* heap_object = reinterpret_cast<HeapObject*>(object);
385 if (heap_->InFromSpace(object)) { 382 if (heap_->InFromSpace(object)) {
386 callback(reinterpret_cast<HeapObject**>(cell), heap_object); 383 callback(reinterpret_cast<HeapObject**>(cell), heap_object);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 } 478 }
482 479
483 480
484 void StoreBuffer::CheckForFullBuffer() { 481 void StoreBuffer::CheckForFullBuffer() {
485 if (old_limit_ - old_top_ < kStoreBufferSize * 2) { 482 if (old_limit_ - old_top_ < kStoreBufferSize * 2) {
486 HandleFullness(); 483 HandleFullness();
487 } 484 }
488 } 485 }
489 486
490 } } // namespace v8::internal 487 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698