OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_KERNEL_TO_IL_H_ | 5 #ifndef RUNTIME_VM_KERNEL_TO_IL_H_ |
6 #define RUNTIME_VM_KERNEL_TO_IL_H_ | 6 #define RUNTIME_VM_KERNEL_TO_IL_H_ |
7 | 7 |
8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
9 | 9 |
10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 void SetStringOffsets(const TypedData& string_offsets); | 277 void SetStringOffsets(const TypedData& string_offsets); |
278 | 278 |
279 const TypedData& string_data() { return string_data_; } | 279 const TypedData& string_data() { return string_data_; } |
280 void SetStringData(const TypedData& string_data); | 280 void SetStringData(const TypedData& string_data); |
281 | 281 |
282 const TypedData& canonical_names() { return canonical_names_; } | 282 const TypedData& canonical_names() { return canonical_names_; } |
283 void SetCanonicalNames(const TypedData& canonical_names); | 283 void SetCanonicalNames(const TypedData& canonical_names); |
284 | 284 |
285 intptr_t StringOffset(StringIndex index) const; | 285 intptr_t StringOffset(StringIndex index) const; |
286 intptr_t StringSize(StringIndex index) const; | 286 intptr_t StringSize(StringIndex index) const; |
| 287 |
| 288 // The address of the backing store of the string with a given index. If the |
| 289 // backing store is in the VM's heap this address is not safe for GC (call the |
| 290 // function and use the result within a NoSafepointScope). |
| 291 uint8_t* StringBuffer(StringIndex index) const; |
| 292 |
287 uint8_t CharacterAt(StringIndex string_index, intptr_t index); | 293 uint8_t CharacterAt(StringIndex string_index, intptr_t index); |
288 bool StringEquals(StringIndex string_index, const char* other); | 294 bool StringEquals(StringIndex string_index, const char* other); |
289 | 295 |
290 // Accessors and predicates for canonical names. | 296 // Accessors and predicates for canonical names. |
291 NameIndex CanonicalNameParent(NameIndex name); | 297 NameIndex CanonicalNameParent(NameIndex name); |
292 StringIndex CanonicalNameString(NameIndex name); | 298 StringIndex CanonicalNameString(NameIndex name); |
293 bool IsAdministrative(NameIndex name); | 299 bool IsAdministrative(NameIndex name); |
294 bool IsPrivate(NameIndex name); | 300 bool IsPrivate(NameIndex name); |
295 bool IsRoot(NameIndex name); | 301 bool IsRoot(NameIndex name); |
296 bool IsLibrary(NameIndex name); | 302 bool IsLibrary(NameIndex name); |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 namespace kernel { | 942 namespace kernel { |
937 | 943 |
938 RawObject* EvaluateMetadata(const Field& metadata_field); | 944 RawObject* EvaluateMetadata(const Field& metadata_field); |
939 RawObject* BuildParameterDescriptor(const Function& function); | 945 RawObject* BuildParameterDescriptor(const Function& function); |
940 | 946 |
941 } // namespace kernel | 947 } // namespace kernel |
942 } // namespace dart | 948 } // namespace dart |
943 | 949 |
944 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 950 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
945 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ | 951 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ |
OLD | NEW |