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

Side by Side Diff: vm/object.h

Issue 11519006: Add read only handles for the following predefined symbols (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | « vm/intermediate_language_x64.cc ('k') | vm/object.cc » ('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 #ifndef VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 bool IsNew() const { return raw()->IsNewObject(); } 203 bool IsNew() const { return raw()->IsNewObject(); }
204 bool IsOld() const { return raw()->IsOldObject(); } 204 bool IsOld() const { return raw()->IsOldObject(); }
205 205
206 // Print the object on stdout for debugging. 206 // Print the object on stdout for debugging.
207 void Print() const; 207 void Print() const;
208 208
209 bool IsZoneHandle() const { 209 bool IsZoneHandle() const {
210 return VMHandles::IsZoneHandle(reinterpret_cast<uword>(this)); 210 return VMHandles::IsZoneHandle(reinterpret_cast<uword>(this));
211 } 211 }
212 212
213 bool IsNotTemporaryScopedHandle() const;
214
213 static RawObject* Clone(const Object& src, Heap::Space space = Heap::kNew); 215 static RawObject* Clone(const Object& src, Heap::Space space = Heap::kNew);
214 216
215 static Object& Handle(Isolate* isolate, RawObject* raw_ptr) { 217 static Object& Handle(Isolate* isolate, RawObject* raw_ptr) {
216 Object* obj = reinterpret_cast<Object*>(VMHandles::AllocateHandle(isolate)); 218 Object* obj = reinterpret_cast<Object*>(VMHandles::AllocateHandle(isolate));
217 initializeHandle(obj, raw_ptr); 219 initializeHandle(obj, raw_ptr);
218 return *obj; 220 return *obj;
219 } 221 }
220 222
221 static Object& Handle() { 223 static Object& Handle() {
222 return Handle(Isolate::Current(), null_); 224 return Handle(Isolate::Current(), null_);
(...skipping 5918 matching lines...) Expand 10 before | Expand all | Expand 10 after
6141 6143
6142 6144
6143 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6145 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6144 intptr_t index) { 6146 intptr_t index) {
6145 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6147 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6146 } 6148 }
6147 6149
6148 } // namespace dart 6150 } // namespace dart
6149 6151
6150 #endif // VM_OBJECT_H_ 6152 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « vm/intermediate_language_x64.cc ('k') | vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698