| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 RUNTIME_VM_MESSAGE_H_ | 5 #ifndef RUNTIME_VM_MESSAGE_H_ |
| 6 #define RUNTIME_VM_MESSAGE_H_ | 6 #define RUNTIME_VM_MESSAGE_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (len_ > 0) { | 80 if (len_ > 0) { |
| 81 free(data_); | 81 free(data_); |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 | 84 |
| 85 Dart_Port dest_port() const { return dest_port_; } | 85 Dart_Port dest_port() const { return dest_port_; } |
| 86 uint8_t* data() const { | 86 uint8_t* data() const { |
| 87 ASSERT(len_ > 0); | 87 ASSERT(len_ > 0); |
| 88 return data_; | 88 return data_; |
| 89 } | 89 } |
| 90 intptr_t len() const { | 90 intptr_t len() const { return len_; } |
| 91 return len_; | |
| 92 } | |
| 93 RawObject* raw_obj() const { | 91 RawObject* raw_obj() const { |
| 94 ASSERT(len_ == 0); | 92 ASSERT(len_ == 0); |
| 95 return reinterpret_cast<RawObject*>(data_); | 93 return reinterpret_cast<RawObject*>(data_); |
| 96 } | 94 } |
| 97 Priority priority() const { return priority_; } | 95 Priority priority() const { return priority_; } |
| 98 | 96 |
| 99 bool IsOOB() const { return priority_ == Message::kOOBPriority; } | 97 bool IsOOB() const { return priority_ == Message::kOOBPriority; } |
| 100 bool IsRaw() const { return len_ == 0; } | 98 bool IsRaw() const { return len_ == 0; } |
| 101 | 99 |
| 102 bool RedirectToDeliveryFailurePort(); | 100 bool RedirectToDeliveryFailurePort(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 private: | 161 private: |
| 164 Message* head_; | 162 Message* head_; |
| 165 Message* tail_; | 163 Message* tail_; |
| 166 | 164 |
| 167 DISALLOW_COPY_AND_ASSIGN(MessageQueue); | 165 DISALLOW_COPY_AND_ASSIGN(MessageQueue); |
| 168 }; | 166 }; |
| 169 | 167 |
| 170 } // namespace dart | 168 } // namespace dart |
| 171 | 169 |
| 172 #endif // RUNTIME_VM_MESSAGE_H_ | 170 #endif // RUNTIME_VM_MESSAGE_H_ |
| OLD | NEW |