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

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

Issue 868913002: Add Zone-based handle allocation interface and reduce use of Isolate-based interfaces. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/handles.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "vm/handles.h" 5 #include "vm/handles.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 38
39 void VMHandles::VisitObjectPointers(ObjectPointerVisitor* visitor) { 39 void VMHandles::VisitObjectPointers(ObjectPointerVisitor* visitor) {
40 return Handles<kVMHandleSizeInWords, 40 return Handles<kVMHandleSizeInWords,
41 kVMHandlesPerChunk, 41 kVMHandlesPerChunk,
42 kOffsetOfRawPtr>::VisitObjectPointers(visitor); 42 kOffsetOfRawPtr>::VisitObjectPointers(visitor);
43 } 43 }
44 44
45 45
46 uword VMHandles::AllocateHandle(Isolate* isolate) { 46 uword VMHandles::AllocateHandle(Zone* zone) {
47 return Handles<kVMHandleSizeInWords, 47 return Handles<kVMHandleSizeInWords,
48 kVMHandlesPerChunk, 48 kVMHandlesPerChunk,
49 kOffsetOfRawPtr>::AllocateHandle(isolate); 49 kOffsetOfRawPtr>::AllocateHandle(zone);
50 } 50 }
51 51
52 52
53 uword VMHandles::AllocateZoneHandle(Isolate* isolate) { 53 uword VMHandles::AllocateZoneHandle(Zone* zone) {
54 return Handles<kVMHandleSizeInWords, 54 return Handles<kVMHandleSizeInWords,
55 kVMHandlesPerChunk, 55 kVMHandlesPerChunk,
56 kOffsetOfRawPtr>::AllocateZoneHandle(isolate); 56 kOffsetOfRawPtr>::AllocateZoneHandle(zone);
57 } 57 }
58 58
59 59
60 bool VMHandles::IsZoneHandle(uword handle) { 60 bool VMHandles::IsZoneHandle(uword handle) {
61 return Handles<kVMHandleSizeInWords, 61 return Handles<kVMHandleSizeInWords,
62 kVMHandlesPerChunk, 62 kVMHandlesPerChunk,
63 kOffsetOfRawPtr >::IsZoneHandle(handle); 63 kOffsetOfRawPtr >::IsZoneHandle(handle);
64 } 64 }
65 65
66 66
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 isolate()->IncrementNoHandleScopeDepth(); 118 isolate()->IncrementNoHandleScopeDepth();
119 } 119 }
120 120
121 121
122 NoHandleScope::~NoHandleScope() { 122 NoHandleScope::~NoHandleScope() {
123 isolate()->DecrementNoHandleScopeDepth(); 123 isolate()->DecrementNoHandleScopeDepth();
124 } 124 }
125 #endif // defined(DEBUG) 125 #endif // defined(DEBUG)
126 126
127 } // namespace dart 127 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/handles.h ('k') | runtime/vm/handles_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698