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

Unified Diff: runtime/vm/isolate.cc

Issue 187503002: 1. Restructure reusable handles to make individual Scopes for each handle type (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/isolate.h ('k') | runtime/vm/longjump.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
===================================================================
--- runtime/vm/isolate.cc (revision 33332)
+++ runtime/vm/isolate.cc (working copy)
@@ -273,8 +273,14 @@
void BaseIsolate::AssertCurrent(BaseIsolate* isolate) {
ASSERT(isolate == Isolate::Current());
}
-#endif
+#endif // defined(DEBUG)
+#if defined(DEBUG)
+#define REUSABLE_HANDLE_SCOPE_INIT(object) \
+ reusable_##object##_handle_scope_active_(false),
+#else
+#define REUSABLE_HANDLE_SCOPE_INIT(object)
+#endif // defined(DEBUG)
#define REUSABLE_HANDLE_INITIALIZERS(object) \
object##_handle_(NULL),
@@ -321,11 +327,13 @@
thread_state_(NULL),
next_(NULL),
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
+ REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
reusable_handles_() {
if (FLAG_print_object_histogram && (Dart::vm_isolate() != NULL)) {
object_histogram_ = new ObjectHistogram(this);
}
}
+#undef REUSABLE_HANDLE_SCOPE_INIT
#undef REUSABLE_HANDLE_INITIALIZERS
@@ -402,8 +410,7 @@
// Setup the isolate specific resuable handles.
#define REUSABLE_HANDLE_ALLOCATION(object) \
- result->object##_handle_ = result->AllocateReusableHandle<object>(); \
-
+ result->object##_handle_ = result->AllocateReusableHandle<object>();
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_ALLOCATION)
#undef REUSABLE_HANDLE_ALLOCATION
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/longjump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698