| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 delete[] hash_set_1_; | 114 delete[] hash_set_1_; |
| 115 delete[] hash_set_2_; | 115 delete[] hash_set_2_; |
| 116 old_start_ = old_top_ = old_limit_ = old_reserved_limit_ = NULL; | 116 old_start_ = old_top_ = old_limit_ = old_reserved_limit_ = NULL; |
| 117 start_ = limit_ = NULL; | 117 start_ = limit_ = NULL; |
| 118 heap_->public_set_store_buffer_top(start_); | 118 heap_->public_set_store_buffer_top(start_); |
| 119 } | 119 } |
| 120 | 120 |
| 121 | 121 |
| 122 void StoreBuffer::StoreBufferOverflow(Isolate* isolate) { | 122 void StoreBuffer::StoreBufferOverflow(Isolate* isolate) { |
| 123 isolate->heap()->store_buffer()->Compact(); | 123 isolate->heap()->store_buffer()->Compact(); |
| 124 isolate->counters()->store_buffer_overflows()->Increment(); |
| 124 } | 125 } |
| 125 | 126 |
| 126 | 127 |
| 127 void StoreBuffer::Uniq() { | 128 void StoreBuffer::Uniq() { |
| 128 // Remove adjacent duplicates and cells that do not point at new space. | 129 // Remove adjacent duplicates and cells that do not point at new space. |
| 129 Address previous = NULL; | 130 Address previous = NULL; |
| 130 Address* write = old_start_; | 131 Address* write = old_start_; |
| 131 ASSERT(may_move_store_buffer_entries_); | 132 ASSERT(may_move_store_buffer_entries_); |
| 132 for (Address* read = old_start_; read < old_top_; read++) { | 133 for (Address* read = old_start_; read < old_top_; read++) { |
| 133 Address current = *read; | 134 Address current = *read; |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 } | 687 } |
| 687 old_buffer_is_sorted_ = false; | 688 old_buffer_is_sorted_ = false; |
| 688 old_buffer_is_filtered_ = false; | 689 old_buffer_is_filtered_ = false; |
| 689 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); | 690 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); |
| 690 ASSERT(old_top_ <= old_limit_); | 691 ASSERT(old_top_ <= old_limit_); |
| 691 } | 692 } |
| 692 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); | 693 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); |
| 693 } | 694 } |
| 694 | 695 |
| 695 } } // namespace v8::internal | 696 } } // namespace v8::internal |
| OLD | NEW |