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

Unified Diff: runtime/vm/object.h

Issue 982873004: Thread/Isolate refactoring: new(Isolate) -> new(Zone) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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 | « runtime/vm/native_entry.h ('k') | runtime/vm/regexp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 44266)
+++ runtime/vm/object.h (working copy)
@@ -374,12 +374,16 @@
return Handle(Isolate::Current(), raw_ptr);
}
- static Object& ZoneHandle(Isolate* isolate, RawObject* raw_ptr) {
+ static Object& ZoneHandle(Zone* zone, RawObject* raw_ptr) {
Object* obj = reinterpret_cast<Object*>(
- VMHandles::AllocateZoneHandle(isolate->current_zone()));
+ VMHandles::AllocateZoneHandle(zone));
initializeHandle(obj, raw_ptr);
return *obj;
}
+ // DEPRECATED: Use Zone version.
+ static Object& ZoneHandle(Isolate* isolate, RawObject* raw_ptr) {
+ return ZoneHandle(isolate->current_zone(), raw_ptr);
+ }
static Object& ZoneHandle() {
return ZoneHandle(Isolate::Current(), null_);
@@ -833,13 +837,18 @@
void operator^=(RawObject* value) {
raw_ = value;
}
- static PassiveObject& Handle(Isolate* I, RawObject* raw_ptr) {
+
+ static PassiveObject& Handle(Zone* zone, RawObject* raw_ptr) {
PassiveObject* obj = reinterpret_cast<PassiveObject*>(
- VMHandles::AllocateHandle(I->current_zone()));
+ VMHandles::AllocateHandle(zone));
obj->raw_ = raw_ptr;
obj->set_vtable(0);
return *obj;
}
+ // DEPRECATED - use Zone version.
+ static PassiveObject& Handle(Isolate* I, RawObject* raw_ptr) {
+ return Handle(I->current_zone(), raw_ptr);
+ }
static PassiveObject& Handle(RawObject* raw_ptr) {
return Handle(Isolate::Current(), raw_ptr);
}
@@ -846,20 +855,24 @@
static PassiveObject& Handle() {
return Handle(Isolate::Current(), Object::null());
}
- // DEPRECATED
- // TODO(koda): Add Zone version.
+ static PassiveObject& Handle(Zone* zone) {
+ return Handle(zone, Object::null());
+ }
+ // DEPRECATED - use Zone version.
static PassiveObject& Handle(Isolate* I) {
return Handle(I, Object::null());
}
- // DEPRECATED
- // TODO(koda): Add Zone version.
- static PassiveObject& ZoneHandle(Isolate* I, RawObject* raw_ptr) {
+ static PassiveObject& ZoneHandle(Zone* zone, RawObject* raw_ptr) {
PassiveObject* obj = reinterpret_cast<PassiveObject*>(
- VMHandles::AllocateZoneHandle(I->current_zone()));
+ VMHandles::AllocateZoneHandle(zone));
obj->raw_ = raw_ptr;
obj->set_vtable(0);
return *obj;
}
+ // DEPRECATED - use Zone version.
+ static PassiveObject& ZoneHandle(Isolate* I, RawObject* raw_ptr) {
+ return ZoneHandle(I->current_zone(), raw_ptr);
+ }
static PassiveObject& ZoneHandle(RawObject* raw_ptr) {
return ZoneHandle(Isolate::Current(), raw_ptr);
}
@@ -866,10 +879,12 @@
static PassiveObject& ZoneHandle() {
return ZoneHandle(Isolate::Current(), Object::null());
}
- // DEPRECATED
- // TODO(koda): Add Zone version.
+ static PassiveObject& ZoneHandle(Zone* zone) {
+ return ZoneHandle(zone, Object::null());
+ }
+ // DEPRECATED - use Zone version.
static PassiveObject& ZoneHandle(Isolate* I) {
- return ZoneHandle(I, Object::null());
+ return ZoneHandle(I->current_zone(), Object::null());
}
private:
« no previous file with comments | « runtime/vm/native_entry.h ('k') | runtime/vm/regexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698