| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void IteratePointersToNewSpace(ObjectSlotCallback callback); | 82 void IteratePointersToNewSpace(ObjectSlotCallback callback); |
| 83 | 83 |
| 84 static const int kStoreBufferOverflowBit = 1 << 16; | 84 static const int kStoreBufferOverflowBit = 1 << 16; |
| 85 static const int kStoreBufferSize = kStoreBufferOverflowBit; | 85 static const int kStoreBufferSize = kStoreBufferOverflowBit; |
| 86 static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address); | 86 static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address); |
| 87 static const int kOldStoreBufferLength = kStoreBufferLength * 16; | 87 static const int kOldStoreBufferLength = kStoreBufferLength * 16; |
| 88 static const int kHashMapLengthLog2 = 12; | 88 static const int kHashMapLengthLog2 = 12; |
| 89 static const int kHashMapLength = 1 << kHashMapLengthLog2; | 89 static const int kHashMapLength = 1 << kHashMapLengthLog2; |
| 90 | 90 |
| 91 void Compact(); | 91 void Compact(); |
| 92 static void GCPrologue(GCType type, GCCallbackFlags flags); | 92 |
| 93 static void GCEpilogue(GCType type, GCCallbackFlags flags); | 93 void GCPrologue(); |
| 94 void GCEpilogue(); |
| 94 | 95 |
| 95 Object*** Limit() { return reinterpret_cast<Object***>(old_limit_); } | 96 Object*** Limit() { return reinterpret_cast<Object***>(old_limit_); } |
| 96 Object*** Start() { return reinterpret_cast<Object***>(old_start_); } | 97 Object*** Start() { return reinterpret_cast<Object***>(old_start_); } |
| 97 Object*** Top() { return reinterpret_cast<Object***>(old_top_); } | 98 Object*** Top() { return reinterpret_cast<Object***>(old_top_); } |
| 98 void SetTop(Object*** top) { | 99 void SetTop(Object*** top) { |
| 99 ASSERT(top >= Start()); | 100 ASSERT(top >= Start()); |
| 100 ASSERT(top <= Limit()); | 101 ASSERT(top <= Limit()); |
| 101 old_top_ = reinterpret_cast<Address*>(top); | 102 old_top_ = reinterpret_cast<Address*>(top); |
| 102 } | 103 } |
| 103 | 104 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 239 } |
| 239 | 240 |
| 240 private: | 241 private: |
| 241 StoreBuffer* store_buffer_; | 242 StoreBuffer* store_buffer_; |
| 242 bool stored_state_; | 243 bool stored_state_; |
| 243 }; | 244 }; |
| 244 | 245 |
| 245 } } // namespace v8::internal | 246 } } // namespace v8::internal |
| 246 | 247 |
| 247 #endif // V8_STORE_BUFFER_H_ | 248 #endif // V8_STORE_BUFFER_H_ |
| OLD | NEW |