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 23 matching lines...) Expand all Loading... |
34 namespace internal { | 34 namespace internal { |
35 | 35 |
36 Address StoreBuffer::TopAddress() { | 36 Address StoreBuffer::TopAddress() { |
37 return reinterpret_cast<Address>(heap_->store_buffer_top_address()); | 37 return reinterpret_cast<Address>(heap_->store_buffer_top_address()); |
38 } | 38 } |
39 | 39 |
40 | 40 |
41 void StoreBuffer::Mark(Address addr) { | 41 void StoreBuffer::Mark(Address addr) { |
42 ASSERT(!heap_->cell_space()->Contains(addr)); | 42 ASSERT(!heap_->cell_space()->Contains(addr)); |
43 ASSERT(!heap_->code_space()->Contains(addr)); | 43 ASSERT(!heap_->code_space()->Contains(addr)); |
| 44 ASSERT(!heap_->old_data_space()->Contains(addr)); |
44 Address* top = reinterpret_cast<Address*>(heap_->store_buffer_top()); | 45 Address* top = reinterpret_cast<Address*>(heap_->store_buffer_top()); |
45 *top++ = addr; | 46 *top++ = addr; |
46 heap_->public_set_store_buffer_top(top); | 47 heap_->public_set_store_buffer_top(top); |
47 if ((reinterpret_cast<uintptr_t>(top) & kStoreBufferOverflowBit) != 0) { | 48 if ((reinterpret_cast<uintptr_t>(top) & kStoreBufferOverflowBit) != 0) { |
48 ASSERT(top == limit_); | 49 ASSERT(top == limit_); |
49 Compact(); | 50 Compact(); |
50 } else { | 51 } else { |
51 ASSERT(top < limit_); | 52 ASSERT(top < limit_); |
52 } | 53 } |
53 } | 54 } |
(...skipping 24 matching lines...) Expand all Loading... |
78 Address& map_field = Memory::Address_at(object->address()); | 79 Address& map_field = Memory::Address_at(object->address()); |
79 if (heap_->map_space()->Contains(map_field)) { | 80 if (heap_->map_space()->Contains(map_field)) { |
80 map_field = NULL; | 81 map_field = NULL; |
81 } | 82 } |
82 } | 83 } |
83 | 84 |
84 | 85 |
85 } } // namespace v8::internal | 86 } } // namespace v8::internal |
86 | 87 |
87 #endif // V8_STORE_BUFFER_INL_H_ | 88 #endif // V8_STORE_BUFFER_INL_H_ |
OLD | NEW |