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

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

Issue 8498013: Fix size of store buffer to depend on pointer size. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 | « no previous file | no next file » | 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // exempt from the store buffer and process the promotion queue. These steps 74 // exempt from the store buffer and process the promotion queue. These steps
75 // can overflow this buffer. We check for this and on overflow we call the 75 // can overflow this buffer. We check for this and on overflow we call the
76 // callback set up with the StoreBufferRebuildScope object. 76 // callback set up with the StoreBufferRebuildScope object.
77 inline void EnterDirectlyIntoStoreBuffer(Address addr); 77 inline void EnterDirectlyIntoStoreBuffer(Address addr);
78 78
79 // Iterates over all pointers that go from old space to new space. It will 79 // Iterates over all pointers that go from old space to new space. It will
80 // delete the store buffer as it starts so the callback should reenter 80 // delete the store buffer as it starts so the callback should reenter
81 // surviving old-to-new pointers into the store buffer to rebuild it. 81 // surviving old-to-new pointers into the store buffer to rebuild it.
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 << (14 + kPointerSizeLog2);
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 92
93 void GCPrologue(); 93 void GCPrologue();
94 void GCEpilogue(); 94 void GCEpilogue();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 240
241 private: 241 private:
242 StoreBuffer* store_buffer_; 242 StoreBuffer* store_buffer_;
243 bool stored_state_; 243 bool stored_state_;
244 }; 244 };
245 245
246 } } // namespace v8::internal 246 } } // namespace v8::internal
247 247
248 #endif // V8_STORE_BUFFER_H_ 248 #endif // V8_STORE_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698