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