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

Unified Diff: runtime/vm/allocation.cc

Issue 855533002: Isolate/Thread split: Isolate -> Zone for LocationSummary. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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/allocation.h ('k') | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/allocation.cc
===================================================================
--- runtime/vm/allocation.cc (revision 42919)
+++ runtime/vm/allocation.cc (working copy)
@@ -10,23 +10,29 @@
namespace dart {
-static void* Allocate(uword size, BaseIsolate* isolate) {
- ASSERT(isolate != NULL);
- ASSERT(isolate->current_zone() != NULL);
+static void* Allocate(uword size, Zone* zone) {
+ ASSERT(zone != NULL);
if (size > static_cast<uword>(kIntptrMax)) {
FATAL1("ZoneAllocated object has unexpectedly large size %" Pu "", size);
}
- return reinterpret_cast<void*>(isolate->current_zone()->AllocUnsafe(size));
+ return reinterpret_cast<void*>(zone->AllocUnsafe(size));
}
void* ZoneAllocated::operator new(uword size) {
- return Allocate(size, Isolate::Current());
+ return Allocate(size, Isolate::Current()->current_zone());
}
void* ZoneAllocated::operator new(uword size, BaseIsolate* isolate) {
- return Allocate(size, isolate);
+ ASSERT(isolate != NULL);
+ return Allocate(size, isolate->current_zone());
}
+
+void* ZoneAllocated::operator new(uword size, Zone* zone) {
+ ASSERT(zone == Isolate::Current()->current_zone());
+ return Allocate(size, zone);
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/allocation.h ('k') | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698