| OLD | NEW |
| 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 7229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7240 private: | 7240 private: |
| 7241 FINAL_HEAP_OBJECT_IMPLEMENTATION(ReceivePort, Instance); | 7241 FINAL_HEAP_OBJECT_IMPLEMENTATION(ReceivePort, Instance); |
| 7242 friend class Class; | 7242 friend class Class; |
| 7243 }; | 7243 }; |
| 7244 | 7244 |
| 7245 | 7245 |
| 7246 class SendPort : public Instance { | 7246 class SendPort : public Instance { |
| 7247 public: | 7247 public: |
| 7248 Dart_Port Id() const { return raw_ptr()->id_; } | 7248 Dart_Port Id() const { return raw_ptr()->id_; } |
| 7249 | 7249 |
| 7250 Dart_Port origin_id() const { return raw_ptr()->origin_id_; } |
| 7251 void set_origin_id(Dart_Port id) const { |
| 7252 ASSERT(origin_id() == 0); |
| 7253 StoreNonPointer(&(raw_ptr()->origin_id_), id); |
| 7254 } |
| 7255 |
| 7250 static intptr_t InstanceSize() { | 7256 static intptr_t InstanceSize() { |
| 7251 return RoundedAllocationSize(sizeof(RawSendPort)); | 7257 return RoundedAllocationSize(sizeof(RawSendPort)); |
| 7252 } | 7258 } |
| 7253 static RawSendPort* New(Dart_Port id, Heap::Space space = Heap::kNew); | 7259 static RawSendPort* New(Dart_Port id, |
| 7260 Heap::Space space = Heap::kNew); |
| 7261 static RawSendPort* New(Dart_Port id, |
| 7262 Dart_Port origin_id, |
| 7263 Heap::Space space = Heap::kNew); |
| 7254 | 7264 |
| 7255 private: | 7265 private: |
| 7256 FINAL_HEAP_OBJECT_IMPLEMENTATION(SendPort, Instance); | 7266 FINAL_HEAP_OBJECT_IMPLEMENTATION(SendPort, Instance); |
| 7257 friend class Class; | 7267 friend class Class; |
| 7258 }; | 7268 }; |
| 7259 | 7269 |
| 7260 | 7270 |
| 7261 // Internal stacktrace object used in exceptions for printing stack traces. | 7271 // Internal stacktrace object used in exceptions for printing stack traces. |
| 7262 class Stacktrace : public Instance { | 7272 class Stacktrace : public Instance { |
| 7263 public: | 7273 public: |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7690 | 7700 |
| 7691 | 7701 |
| 7692 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7702 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7693 intptr_t index) { | 7703 intptr_t index) { |
| 7694 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7704 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7695 } | 7705 } |
| 7696 | 7706 |
| 7697 } // namespace dart | 7707 } // namespace dart |
| 7698 | 7708 |
| 7699 #endif // VM_OBJECT_H_ | 7709 #endif // VM_OBJECT_H_ |
| OLD | NEW |