| 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_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
| 6 #define VM_RAW_OBJECT_H_ | 6 #define VM_RAW_OBJECT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 return peer_; | 1116 return peer_; |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 private: | 1119 private: |
| 1120 const T* data_; | 1120 const T* data_; |
| 1121 void* peer_; | 1121 void* peer_; |
| 1122 Dart_PeerFinalizer callback_; | 1122 Dart_PeerFinalizer callback_; |
| 1123 }; | 1123 }; |
| 1124 | 1124 |
| 1125 | 1125 |
| 1126 DART_EXTERN_C { |
| 1127 Dart_Handle Dart_ExternalStringGetPeer(Dart_Handle, void**); |
| 1128 } |
| 1129 |
| 1130 |
| 1126 class RawExternalOneByteString : public RawString { | 1131 class RawExternalOneByteString : public RawString { |
| 1127 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalOneByteString); | 1132 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalOneByteString); |
| 1128 | 1133 |
| 1129 ExternalStringData<uint8_t>* external_data_; | 1134 ExternalStringData<uint8_t>* external_data_; |
| 1135 friend Dart_Handle Dart_ExternalStringGetPeer(Dart_Handle, void**); |
| 1130 }; | 1136 }; |
| 1131 | 1137 |
| 1132 | 1138 |
| 1133 class RawExternalTwoByteString : public RawString { | 1139 class RawExternalTwoByteString : public RawString { |
| 1134 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTwoByteString); | 1140 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTwoByteString); |
| 1135 | 1141 |
| 1136 ExternalStringData<uint16_t>* external_data_; | 1142 ExternalStringData<uint16_t>* external_data_; |
| 1143 friend Dart_Handle Dart_ExternalStringGetPeer(Dart_Handle, void**); |
| 1137 }; | 1144 }; |
| 1138 | 1145 |
| 1139 | 1146 |
| 1140 class RawExternalFourByteString : public RawString { | 1147 class RawExternalFourByteString : public RawString { |
| 1141 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFourByteString); | 1148 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFourByteString); |
| 1142 | 1149 |
| 1143 ExternalStringData<uint32_t>* external_data_; | 1150 ExternalStringData<uint32_t>* external_data_; |
| 1151 friend Dart_Handle Dart_ExternalStringGetPeer(Dart_Handle, void**); |
| 1144 }; | 1152 }; |
| 1145 | 1153 |
| 1146 | 1154 |
| 1147 class RawBool : public RawInstance { | 1155 class RawBool : public RawInstance { |
| 1148 RAW_HEAP_OBJECT_IMPLEMENTATION(Bool); | 1156 RAW_HEAP_OBJECT_IMPLEMENTATION(Bool); |
| 1149 | 1157 |
| 1150 bool value_; | 1158 bool value_; |
| 1151 }; | 1159 }; |
| 1152 | 1160 |
| 1153 | 1161 |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 kExternalUint64ArrayCid == kByteArrayCid + 18 && | 1588 kExternalUint64ArrayCid == kByteArrayCid + 18 && |
| 1581 kExternalFloat32ArrayCid == kByteArrayCid + 19 && | 1589 kExternalFloat32ArrayCid == kByteArrayCid + 19 && |
| 1582 kExternalFloat64ArrayCid == kByteArrayCid + 20 && | 1590 kExternalFloat64ArrayCid == kByteArrayCid + 20 && |
| 1583 kStacktraceCid == kByteArrayCid + 21); | 1591 kStacktraceCid == kByteArrayCid + 21); |
| 1584 return (index >= kByteArrayCid && index <= kExternalFloat64ArrayCid); | 1592 return (index >= kByteArrayCid && index <= kExternalFloat64ArrayCid); |
| 1585 } | 1593 } |
| 1586 | 1594 |
| 1587 } // namespace dart | 1595 } // namespace dart |
| 1588 | 1596 |
| 1589 #endif // VM_RAW_OBJECT_H_ | 1597 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |