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

Unified Diff: runtime/vm/scavenger.h

Issue 10905251: Lazy peer API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
Index: runtime/vm/scavenger.h
diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h
index f803a85d362626b1c546a8837b5d6fa3e3fd6cb9..818fecb8d735e12953b3775a226a1ac98381866a 100644
--- a/runtime/vm/scavenger.h
+++ b/runtime/vm/scavenger.h
@@ -5,6 +5,8 @@
#ifndef VM_SCAVENGER_H_
#define VM_SCAVENGER_H_
+#include <map>
+
#include "platform/assert.h"
#include "platform/utils.h"
#include "vm/flags.h"
@@ -87,6 +89,12 @@ class Scavenger {
void WriteProtect(bool read_only);
+ void SetPeer(RawObject* raw_obj, void* peer);
+
+ void* GetPeer(RawObject* raw_obj);
+
+ int64_t PeerCount() const;
+
private:
uword FirstObjectStart() const { return to_->start() | object_alignment_; }
void Prologue(Isolate* isolate, bool invoke_api_callbacks);
@@ -125,12 +133,16 @@ class Scavenger {
return end_ < to_->end();
}
+ void ProcessPeerReferents();
+
VirtualMemory* space_;
MemoryRegion* to_;
MemoryRegion* from_;
Heap* heap_;
+ std::map<RawObject*, void*> peer_;
siva 2012/09/14 00:03:46 peer_table_ or peer_map_ ?
+
// Current allocation top and end. These values are being accessed directly
// from generated code.
uword top_;

Powered by Google App Engine
This is Rietveld 408576698