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

Side by Side Diff: runtime/vm/handles.h

Issue 19974002: Reuse the top ApiLocalScope so that we do not allocate and free an ApiLocalScope (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_state.h ('k') | runtime/vm/handles_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_HANDLES_H_ 5 #ifndef VM_HANDLES_H_
6 #define VM_HANDLES_H_ 6 #define VM_HANDLES_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // Visit all blocks that have been added since the last time 92 // Visit all blocks that have been added since the last time
93 // this method was called. 93 // this method was called.
94 // Be careful with this, since multiple users of this method could 94 // Be careful with this, since multiple users of this method could
95 // interfere with eachother. 95 // interfere with eachother.
96 // Currently only used by GC trace facility. 96 // Currently only used by GC trace facility.
97 void VisitUnvisitedScopedHandles(ObjectPointerVisitor* visitor); 97 void VisitUnvisitedScopedHandles(ObjectPointerVisitor* visitor);
98 98
99 // Visit all of the various handles. 99 // Visit all of the various handles.
100 void Visit(HandleVisitor* visitor); 100 void Visit(HandleVisitor* visitor);
101 101
102 // Reset the handles so that we can reuse.
103 void Reset();
104
102 // Allocates a handle in the current handle scope. This handle is valid only 105 // Allocates a handle in the current handle scope. This handle is valid only
103 // in the current handle scope and is destroyed when the current handle 106 // in the current handle scope and is destroyed when the current handle
104 // scope ends. 107 // scope ends.
105 static uword AllocateHandle(Isolate* isolate); 108 static uword AllocateHandle(Isolate* isolate);
106 109
107 // Allocates a handle in the current zone. This handle will be destroyed 110 // Allocates a handle in the current zone. This handle will be destroyed
108 // when the current zone is destroyed. 111 // when the current zone is destroyed.
109 static uword AllocateZoneHandle(Isolate* isolate); 112 static uword AllocateZoneHandle(Isolate* isolate);
110 113
111 // Returns true if specified handle is a zone handle. 114 // Returns true if specified handle is a zone handle.
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 }; 341 };
339 #endif // defined(DEBUG) 342 #endif // defined(DEBUG)
340 343
341 // Macro to start a no handles scope in the code. 344 // Macro to start a no handles scope in the code.
342 #define NOHANDLESCOPE(isolate) \ 345 #define NOHANDLESCOPE(isolate) \
343 dart::NoHandleScope no_vm_internal_handles_scope_(isolate); 346 dart::NoHandleScope no_vm_internal_handles_scope_(isolate);
344 347
345 } // namespace dart 348 } // namespace dart
346 349
347 #endif // VM_HANDLES_H_ 350 #endif // VM_HANDLES_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_state.h ('k') | runtime/vm/handles_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698