| 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 4756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4767 intptr_t src_offset, | 4767 intptr_t src_offset, |
| 4768 intptr_t len); | 4768 intptr_t len); |
| 4769 | 4769 |
| 4770 static RawString* EscapeSpecialCharacters(const String& str); | 4770 static RawString* EscapeSpecialCharacters(const String& str); |
| 4771 | 4771 |
| 4772 static RawString* Concat(const String& str1, | 4772 static RawString* Concat(const String& str1, |
| 4773 const String& str2, | 4773 const String& str2, |
| 4774 Heap::Space space = Heap::kNew); | 4774 Heap::Space space = Heap::kNew); |
| 4775 static RawString* ConcatAll(const Array& strings, | 4775 static RawString* ConcatAll(const Array& strings, |
| 4776 Heap::Space space = Heap::kNew); | 4776 Heap::Space space = Heap::kNew); |
| 4777 // Concat all strings in 'strings' from 'start' to 'end' (excluding). |
| 4778 static RawString* ConcatAllRange(const Array& strings, |
| 4779 intptr_t start, |
| 4780 intptr_t end, |
| 4781 Heap::Space space = Heap::kNew); |
| 4777 | 4782 |
| 4778 static RawString* SubString(const String& str, | 4783 static RawString* SubString(const String& str, |
| 4779 intptr_t begin_index, | 4784 intptr_t begin_index, |
| 4780 Heap::Space space = Heap::kNew); | 4785 Heap::Space space = Heap::kNew); |
| 4781 static RawString* SubString(const String& str, | 4786 static RawString* SubString(const String& str, |
| 4782 intptr_t begin_index, | 4787 intptr_t begin_index, |
| 4783 intptr_t length, | 4788 intptr_t length, |
| 4784 Heap::Space space = Heap::kNew); | 4789 Heap::Space space = Heap::kNew); |
| 4785 | 4790 |
| 4786 static RawString* Transform(int32_t (*mapping)(int32_t ch), | 4791 static RawString* Transform(int32_t (*mapping)(int32_t ch), |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4887 // 'other' must be OneByteString. | 4892 // 'other' must be OneByteString. |
| 4888 static RawOneByteString* New(const String& other_one_byte_string, | 4893 static RawOneByteString* New(const String& other_one_byte_string, |
| 4889 intptr_t other_start_index, | 4894 intptr_t other_start_index, |
| 4890 intptr_t other_len, | 4895 intptr_t other_len, |
| 4891 Heap::Space space); | 4896 Heap::Space space); |
| 4892 | 4897 |
| 4893 static RawOneByteString* Concat(const String& str1, | 4898 static RawOneByteString* Concat(const String& str1, |
| 4894 const String& str2, | 4899 const String& str2, |
| 4895 Heap::Space space); | 4900 Heap::Space space); |
| 4896 static RawOneByteString* ConcatAll(const Array& strings, | 4901 static RawOneByteString* ConcatAll(const Array& strings, |
| 4902 intptr_t start, |
| 4903 intptr_t end, |
| 4897 intptr_t len, | 4904 intptr_t len, |
| 4898 Heap::Space space); | 4905 Heap::Space space); |
| 4899 | 4906 |
| 4900 static RawOneByteString* Transform(int32_t (*mapping)(int32_t ch), | 4907 static RawOneByteString* Transform(int32_t (*mapping)(int32_t ch), |
| 4901 const String& str, | 4908 const String& str, |
| 4902 Heap::Space space); | 4909 Heap::Space space); |
| 4903 | 4910 |
| 4904 // High performance version of substring for one-byte strings. | 4911 // High performance version of substring for one-byte strings. |
| 4905 // "str" must be OneByteString. | 4912 // "str" must be OneByteString. |
| 4906 static RawOneByteString* SubStringUnchecked(const String& str, | 4913 static RawOneByteString* SubStringUnchecked(const String& str, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4983 const int32_t* characters, | 4990 const int32_t* characters, |
| 4984 intptr_t len, | 4991 intptr_t len, |
| 4985 Heap::Space space); | 4992 Heap::Space space); |
| 4986 static RawTwoByteString* New(const String& str, | 4993 static RawTwoByteString* New(const String& str, |
| 4987 Heap::Space space); | 4994 Heap::Space space); |
| 4988 | 4995 |
| 4989 static RawTwoByteString* Concat(const String& str1, | 4996 static RawTwoByteString* Concat(const String& str1, |
| 4990 const String& str2, | 4997 const String& str2, |
| 4991 Heap::Space space); | 4998 Heap::Space space); |
| 4992 static RawTwoByteString* ConcatAll(const Array& strings, | 4999 static RawTwoByteString* ConcatAll(const Array& strings, |
| 5000 intptr_t start, |
| 5001 intptr_t end, |
| 4993 intptr_t len, | 5002 intptr_t len, |
| 4994 Heap::Space space); | 5003 Heap::Space space); |
| 4995 | 5004 |
| 4996 static RawTwoByteString* Transform(int32_t (*mapping)(int32_t ch), | 5005 static RawTwoByteString* Transform(int32_t (*mapping)(int32_t ch), |
| 4997 const String& str, | 5006 const String& str, |
| 4998 Heap::Space space); | 5007 Heap::Space space); |
| 4999 | 5008 |
| 5000 static void SetPeer(const String& str, | 5009 static void SetPeer(const String& str, |
| 5001 void* peer, | 5010 void* peer, |
| 5002 Dart_PeerFinalizer cback); | 5011 Dart_PeerFinalizer cback); |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6215 | 6224 |
| 6216 | 6225 |
| 6217 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6226 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6218 intptr_t index) { | 6227 intptr_t index) { |
| 6219 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6228 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6220 } | 6229 } |
| 6221 | 6230 |
| 6222 } // namespace dart | 6231 } // namespace dart |
| 6223 | 6232 |
| 6224 #endif // VM_OBJECT_H_ | 6233 #endif // VM_OBJECT_H_ |
| OLD | NEW |