| OLD | NEW | 
|---|
| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 303 #ifdef DEBUG | 303 #ifdef DEBUG | 
| 304 void StoreBuffer::Clean() { | 304 void StoreBuffer::Clean() { | 
| 305   ClearFilteringHashSets(); | 305   ClearFilteringHashSets(); | 
| 306   Uniq();  // Also removes things that no longer point to new space. | 306   Uniq();  // Also removes things that no longer point to new space. | 
| 307   EnsureSpace(kStoreBufferSize / 2); | 307   EnsureSpace(kStoreBufferSize / 2); | 
| 308 } | 308 } | 
| 309 | 309 | 
| 310 | 310 | 
| 311 static Address* in_store_buffer_1_element_cache = NULL; | 311 static Address* in_store_buffer_1_element_cache = NULL; | 
| 312 | 312 | 
| 313 |  | 
| 314 bool StoreBuffer::CellIsInStoreBuffer(Address cell_address) { | 313 bool StoreBuffer::CellIsInStoreBuffer(Address cell_address) { | 
| 315   if (!FLAG_enable_slow_asserts) return true; | 314   if (!FLAG_enable_slow_asserts) return true; | 
| 316   if (in_store_buffer_1_element_cache != NULL && | 315   if (in_store_buffer_1_element_cache != NULL && | 
| 317       *in_store_buffer_1_element_cache == cell_address) { | 316       *in_store_buffer_1_element_cache == cell_address) { | 
| 318     return true; | 317     return true; | 
| 319   } | 318   } | 
| 320   Address* top = reinterpret_cast<Address*>(heap_->store_buffer_top()); | 319   Address* top = reinterpret_cast<Address*>(heap_->store_buffer_top()); | 
| 321   for (Address* current = top - 1; current >= start_; current--) { | 320   for (Address* current = top - 1; current >= start_; current--) { | 
| 322     if (*current == cell_address) { | 321     if (*current == cell_address) { | 
| 323       in_store_buffer_1_element_cache = current; | 322       in_store_buffer_1_element_cache = current; | 
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 724     } | 723     } | 
| 725     old_buffer_is_sorted_ = false; | 724     old_buffer_is_sorted_ = false; | 
| 726     old_buffer_is_filtered_ = false; | 725     old_buffer_is_filtered_ = false; | 
| 727     *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); | 726     *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); | 
| 728     ASSERT(old_top_ <= old_limit_); | 727     ASSERT(old_top_ <= old_limit_); | 
| 729   } | 728   } | 
| 730   heap_->isolate()->counters()->store_buffer_compactions()->Increment(); | 729   heap_->isolate()->counters()->store_buffer_compactions()->Increment(); | 
| 731 } | 730 } | 
| 732 | 731 | 
| 733 } }  // namespace v8::internal | 732 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|