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 6897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6908 public: | 6908 public: |
6909 RawSendPort* send_port() const { return raw_ptr()->send_port_; } | 6909 RawSendPort* send_port() const { return raw_ptr()->send_port_; } |
6910 Dart_Port Id() const { return send_port()->ptr()->id_; } | 6910 Dart_Port Id() const { return send_port()->ptr()->id_; } |
6911 | 6911 |
6912 RawInstance* handler() const { return raw_ptr()->handler_; } | 6912 RawInstance* handler() const { return raw_ptr()->handler_; } |
6913 void set_handler(const Instance& value) const; | 6913 void set_handler(const Instance& value) const; |
6914 | 6914 |
6915 static intptr_t InstanceSize() { | 6915 static intptr_t InstanceSize() { |
6916 return RoundedAllocationSize(sizeof(RawReceivePort)); | 6916 return RoundedAllocationSize(sizeof(RawReceivePort)); |
6917 } | 6917 } |
6918 static RawReceivePort* New(Dart_Port id, Heap::Space space = Heap::kNew); | 6918 static RawReceivePort* New(Dart_Port id, |
| 6919 bool is_control_port, |
| 6920 Heap::Space space = Heap::kNew); |
6919 | 6921 |
6920 private: | 6922 private: |
6921 FINAL_HEAP_OBJECT_IMPLEMENTATION(ReceivePort, Instance); | 6923 FINAL_HEAP_OBJECT_IMPLEMENTATION(ReceivePort, Instance); |
6922 friend class Class; | 6924 friend class Class; |
6923 }; | 6925 }; |
6924 | 6926 |
6925 | 6927 |
6926 class SendPort : public Instance { | 6928 class SendPort : public Instance { |
6927 public: | 6929 public: |
6928 Dart_Port Id() const { return raw_ptr()->id_; } | 6930 Dart_Port Id() const { return raw_ptr()->id_; } |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7309 | 7311 |
7310 | 7312 |
7311 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7313 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
7312 intptr_t index) { | 7314 intptr_t index) { |
7313 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7315 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
7314 } | 7316 } |
7315 | 7317 |
7316 } // namespace dart | 7318 } // namespace dart |
7317 | 7319 |
7318 #endif // VM_OBJECT_H_ | 7320 #endif // VM_OBJECT_H_ |
OLD | NEW |