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

Unified Diff: vm/store_buffer.cc

Issue 10758008: - On store buffer block overflow call a VM leaf function to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/store_buffer.h ('k') | vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/store_buffer.cc
===================================================================
--- vm/store_buffer.cc (revision 9489)
+++ vm/store_buffer.cc (working copy)
@@ -5,15 +5,31 @@
#include "vm/store_buffer.h"
#include "platform/assert.h"
+#include "vm/runtime_entry.h"
namespace dart {
+DEFINE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, Isolate* isolate) {
+ isolate->store_buffer_block()->ProcessBuffer(isolate);
+}
+END_LEAF_RUNTIME_ENTRY
+
+
void StoreBufferBlock::ProcessBuffer() {
- // TODO(iposva): Do the right thing for store buffer overflow.
- top_ = 0; // Currently just reset back to the beginning.
+ ProcessBuffer(Isolate::Current());
}
+void StoreBufferBlock::ProcessBuffer(Isolate* isolate) {
+ StoreBuffer* buffer = isolate->store_buffer();
+ int32_t end = top_;
+ for (int32_t i = 0; i < end; i++) {
+ buffer->AddPointer(pointers_[i]);
+ }
+ top_ = 0; // Reset back to the beginning.
+}
+
+
bool StoreBufferBlock::Contains(uword pointer) {
for (int32_t i = 0; i < top_; i++) {
if (pointers_[i] == pointer) {
« no previous file with comments | « vm/store_buffer.h ('k') | vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698