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

Unified Diff: runtime/vm/handles.cc

Issue 16174008: - Create isolate specific resuable handles and use them in the hot lookup paths. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/handles.cc
===================================================================
--- runtime/vm/handles.cc (revision 24061)
+++ runtime/vm/handles.cc (working copy)
@@ -121,6 +121,25 @@
NoHandleScope::~NoHandleScope() {
isolate()->DecrementNoHandleScopeDepth();
}
+
+
+ReusableHandleScope::ReusableHandleScope(BaseIsolate* isolate)
+ : StackResource(isolate) {
+ ASSERT(!isolate->reusable_handle_scope_active());
+ isolate->set_reusable_handle_scope_active(true);
+}
+
+
+ReusableHandleScope::ReusableHandleScope() : StackResource(Isolate::Current()) {
+ ASSERT(!isolate()->reusable_handle_scope_active());
+ isolate()->set_reusable_handle_scope_active(true);
+}
+
+
+ReusableHandleScope::~ReusableHandleScope() {
+ ASSERT(isolate()->reusable_handle_scope_active());
+ isolate()->set_reusable_handle_scope_active(false);
+}
#endif // defined(DEBUG)
} // namespace dart
« runtime/vm/handles.h ('K') | « runtime/vm/handles.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698