| 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 6298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6309 return &str.UnsafeMutableNonPointer(raw_ptr(str)->data())[index]; | 6309 return &str.UnsafeMutableNonPointer(raw_ptr(str)->data())[index]; |
| 6310 } | 6310 } |
| 6311 | 6311 |
| 6312 static RawOneByteString* ReadFrom(SnapshotReader* reader, | 6312 static RawOneByteString* ReadFrom(SnapshotReader* reader, |
| 6313 intptr_t object_id, | 6313 intptr_t object_id, |
| 6314 intptr_t tags, | 6314 intptr_t tags, |
| 6315 Snapshot::Kind kind); | 6315 Snapshot::Kind kind); |
| 6316 | 6316 |
| 6317 friend class Class; | 6317 friend class Class; |
| 6318 friend class String; | 6318 friend class String; |
| 6319 friend class Symbols; |
| 6319 friend class ExternalOneByteString; | 6320 friend class ExternalOneByteString; |
| 6320 friend class SnapshotReader; | 6321 friend class SnapshotReader; |
| 6321 friend class StringHasher; | 6322 friend class StringHasher; |
| 6322 }; | 6323 }; |
| 6323 | 6324 |
| 6324 | 6325 |
| 6325 class TwoByteString : public AllStatic { | 6326 class TwoByteString : public AllStatic { |
| 6326 public: | 6327 public: |
| 6327 static uint16_t CharAt(const String& str, intptr_t index) { | 6328 static uint16_t CharAt(const String& str, intptr_t index) { |
| 6328 ASSERT((index >= 0) && (index < str.Length())); | 6329 ASSERT((index >= 0) && (index < str.Length())); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6424 } | 6425 } |
| 6425 | 6426 |
| 6426 static RawTwoByteString* ReadFrom(SnapshotReader* reader, | 6427 static RawTwoByteString* ReadFrom(SnapshotReader* reader, |
| 6427 intptr_t object_id, | 6428 intptr_t object_id, |
| 6428 intptr_t tags, | 6429 intptr_t tags, |
| 6429 Snapshot::Kind kind); | 6430 Snapshot::Kind kind); |
| 6430 | 6431 |
| 6431 friend class Class; | 6432 friend class Class; |
| 6432 friend class String; | 6433 friend class String; |
| 6433 friend class SnapshotReader; | 6434 friend class SnapshotReader; |
| 6435 friend class Symbols; |
| 6434 }; | 6436 }; |
| 6435 | 6437 |
| 6436 | 6438 |
| 6437 class ExternalOneByteString : public AllStatic { | 6439 class ExternalOneByteString : public AllStatic { |
| 6438 public: | 6440 public: |
| 6439 static uint16_t CharAt(const String& str, intptr_t index) { | 6441 static uint16_t CharAt(const String& str, intptr_t index) { |
| 6440 NoSafepointScope no_safepoint; | 6442 NoSafepointScope no_safepoint; |
| 6441 return *CharAddr(str, index); | 6443 return *CharAddr(str, index); |
| 6442 } | 6444 } |
| 6443 | 6445 |
| (...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8051 | 8053 |
| 8052 | 8054 |
| 8053 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8055 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 8054 intptr_t index) { | 8056 intptr_t index) { |
| 8055 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8057 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 8056 } | 8058 } |
| 8057 | 8059 |
| 8058 } // namespace dart | 8060 } // namespace dart |
| 8059 | 8061 |
| 8060 #endif // VM_OBJECT_H_ | 8062 #endif // VM_OBJECT_H_ |
| OLD | NEW |