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 6150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6161 | 6161 |
6162 friend class Class; | 6162 friend class Class; |
6163 friend class Symbols; | 6163 friend class Symbols; |
6164 friend class StringSlice; // SetHash | 6164 friend class StringSlice; // SetHash |
6165 template<typename CharType> friend class CharArray; // SetHash | 6165 template<typename CharType> friend class CharArray; // SetHash |
6166 friend class ConcatString; // SetHash | 6166 friend class ConcatString; // SetHash |
6167 friend class OneByteString; | 6167 friend class OneByteString; |
6168 friend class TwoByteString; | 6168 friend class TwoByteString; |
6169 friend class ExternalOneByteString; | 6169 friend class ExternalOneByteString; |
6170 friend class ExternalTwoByteString; | 6170 friend class ExternalTwoByteString; |
6171 // So that the MarkingVisitor can print a debug string from a NoHandleScope. | 6171 // So that SkippedCodeFunctions can print a debug string from a NoHandleScope. |
6172 friend class MarkingVisitor; | 6172 friend class SkippedCodeFunctions; |
6173 }; | 6173 }; |
6174 | 6174 |
6175 | 6175 |
6176 class OneByteString : public AllStatic { | 6176 class OneByteString : public AllStatic { |
6177 public: | 6177 public: |
6178 static uint16_t CharAt(const String& str, intptr_t index) { | 6178 static uint16_t CharAt(const String& str, intptr_t index) { |
6179 ASSERT((index >= 0) && (index < str.Length())); | 6179 ASSERT((index >= 0) && (index < str.Length())); |
6180 ASSERT(str.IsOneByteString()); | 6180 ASSERT(str.IsOneByteString()); |
6181 return raw_ptr(str)->data()[index]; | 6181 return raw_ptr(str)->data()[index]; |
6182 } | 6182 } |
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8035 | 8035 |
8036 | 8036 |
8037 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8037 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8038 intptr_t index) { | 8038 intptr_t index) { |
8039 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8039 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8040 } | 8040 } |
8041 | 8041 |
8042 } // namespace dart | 8042 } // namespace dart |
8043 | 8043 |
8044 #endif // VM_OBJECT_H_ | 8044 #endif // VM_OBJECT_H_ |
OLD | NEW |