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

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

Issue 10786003: Ensure objects emitted in code are allocated in old space. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 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/intermediate_language.h ('k') | runtime/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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 bool IsNew() const { return raw()->IsNewObject(); } 228 bool IsNew() const { return raw()->IsNewObject(); }
229 bool IsOld() const { return raw()->IsOldObject(); } 229 bool IsOld() const { return raw()->IsOldObject(); }
230 230
231 // Print the object on stdout for debugging. 231 // Print the object on stdout for debugging.
232 void Print() const; 232 void Print() const;
233 233
234 bool IsZoneHandle() const { 234 bool IsZoneHandle() const {
235 return VMHandles::IsZoneHandle(reinterpret_cast<uword>(this)); 235 return VMHandles::IsZoneHandle(reinterpret_cast<uword>(this));
236 } 236 }
237 237
238 static RawObject* Clone(const Object& src, Heap::Space space = Heap::kNew);
239
238 static Object& Handle(Isolate* isolate, RawObject* raw_ptr) { 240 static Object& Handle(Isolate* isolate, RawObject* raw_ptr) {
239 Object* obj = reinterpret_cast<Object*>(VMHandles::AllocateHandle(isolate)); 241 Object* obj = reinterpret_cast<Object*>(VMHandles::AllocateHandle(isolate));
240 obj->SetRaw(raw_ptr); 242 obj->SetRaw(raw_ptr);
241 return *obj; 243 return *obj;
242 } 244 }
243 245
244 static Object& Handle() { 246 static Object& Handle() {
245 return Handle(Isolate::Current(), null_); 247 return Handle(Isolate::Current(), null_);
246 } 248 }
247 249
(...skipping 4886 matching lines...) Expand 10 before | Expand all | Expand 10 after
5134 } 5136 }
5135 5137
5136 5138
5137 intptr_t Stackmap::SizeInBits() const { 5139 intptr_t Stackmap::SizeInBits() const {
5138 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); 5140 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte);
5139 } 5141 }
5140 5142
5141 } // namespace dart 5143 } // namespace dart
5142 5144
5143 #endif // VM_OBJECT_H_ 5145 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698