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

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

Issue 15950010: Inline handle allocation. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 24 matching lines...) Expand all
35 } 35 }
36 36
37 37
38 void VMHandles::VisitObjectPointers(ObjectPointerVisitor* visitor) { 38 void VMHandles::VisitObjectPointers(ObjectPointerVisitor* visitor) {
39 return Handles<kVMHandleSizeInWords, 39 return Handles<kVMHandleSizeInWords,
40 kVMHandlesPerChunk, 40 kVMHandlesPerChunk,
41 kOffsetOfRawPtr>::VisitObjectPointers(visitor); 41 kOffsetOfRawPtr>::VisitObjectPointers(visitor);
42 } 42 }
43 43
44 44
45 uword VMHandles::AllocateHandle(Isolate* isolate) {
46 return Handles<kVMHandleSizeInWords,
47 kVMHandlesPerChunk,
48 kOffsetOfRawPtr>::AllocateHandle(isolate);
49 }
50
51
52 uword VMHandles::AllocateZoneHandle(Isolate* isolate) { 45 uword VMHandles::AllocateZoneHandle(Isolate* isolate) {
53 return Handles<kVMHandleSizeInWords, 46 return Handles<kVMHandleSizeInWords,
54 kVMHandlesPerChunk, 47 kVMHandlesPerChunk,
55 kOffsetOfRawPtr>::AllocateZoneHandle(isolate); 48 kOffsetOfRawPtr>::AllocateZoneHandle(isolate);
56 } 49 }
57 50
58 51
59 bool VMHandles::IsZoneHandle(uword handle) { 52 bool VMHandles::IsZoneHandle(uword handle) {
60 return Handles<kVMHandleSizeInWords, 53 return Handles<kVMHandleSizeInWords,
61 kVMHandlesPerChunk, 54 kVMHandlesPerChunk,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 isolate()->IncrementNoHandleScopeDepth(); 110 isolate()->IncrementNoHandleScopeDepth();
118 } 111 }
119 112
120 113
121 NoHandleScope::~NoHandleScope() { 114 NoHandleScope::~NoHandleScope() {
122 isolate()->DecrementNoHandleScopeDepth(); 115 isolate()->DecrementNoHandleScopeDepth();
123 } 116 }
124 #endif // defined(DEBUG) 117 #endif // defined(DEBUG)
125 118
126 } // namespace dart 119 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/handles_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698