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 6907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6918 public: | 6918 public: |
6919 RawSendPort* send_port() const { return raw_ptr()->send_port_; } | 6919 RawSendPort* send_port() const { return raw_ptr()->send_port_; } |
6920 Dart_Port Id() const { return send_port()->ptr()->id_; } | 6920 Dart_Port Id() const { return send_port()->ptr()->id_; } |
6921 | 6921 |
6922 RawInstance* handler() const { return raw_ptr()->handler_; } | 6922 RawInstance* handler() const { return raw_ptr()->handler_; } |
6923 void set_handler(const Instance& value) const; | 6923 void set_handler(const Instance& value) const; |
6924 | 6924 |
6925 static intptr_t InstanceSize() { | 6925 static intptr_t InstanceSize() { |
6926 return RoundedAllocationSize(sizeof(RawReceivePort)); | 6926 return RoundedAllocationSize(sizeof(RawReceivePort)); |
6927 } | 6927 } |
6928 static RawReceivePort* New(Dart_Port id, Heap::Space space = Heap::kNew); | 6928 static RawReceivePort* New(Dart_Port id, |
| 6929 bool is_control_port, |
| 6930 Heap::Space space = Heap::kNew); |
6929 | 6931 |
6930 private: | 6932 private: |
6931 FINAL_HEAP_OBJECT_IMPLEMENTATION(ReceivePort, Instance); | 6933 FINAL_HEAP_OBJECT_IMPLEMENTATION(ReceivePort, Instance); |
6932 friend class Class; | 6934 friend class Class; |
6933 }; | 6935 }; |
6934 | 6936 |
6935 | 6937 |
6936 class SendPort : public Instance { | 6938 class SendPort : public Instance { |
6937 public: | 6939 public: |
6938 Dart_Port Id() const { return raw_ptr()->id_; } | 6940 Dart_Port Id() const { return raw_ptr()->id_; } |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7319 | 7321 |
7320 | 7322 |
7321 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7323 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
7322 intptr_t index) { | 7324 intptr_t index) { |
7323 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7325 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
7324 } | 7326 } |
7325 | 7327 |
7326 } // namespace dart | 7328 } // namespace dart |
7327 | 7329 |
7328 #endif // VM_OBJECT_H_ | 7330 #endif // VM_OBJECT_H_ |
OLD | NEW |