Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1141)

Side by Side Diff: vm/object.h

Issue 11411341: Fix for issue 7089 (Symbols::New was not quite working correctly (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3801 matching lines...) Expand 10 before | Expand all | Expand 10 after
3812 // an Array object or a regular Object so that it can be traversed during 3812 // an Array object or a regular Object so that it can be traversed during
3813 // garbage collection. 3813 // garbage collection.
3814 RawString* MakeExternal(void* array, 3814 RawString* MakeExternal(void* array,
3815 intptr_t length, 3815 intptr_t length,
3816 void* peer, 3816 void* peer,
3817 Dart_PeerFinalizer cback) const; 3817 Dart_PeerFinalizer cback) const;
3818 3818
3819 3819
3820 // Creates a new String object from a C string that is assumed to contain 3820 // Creates a new String object from a C string that is assumed to contain
3821 // UTF-8 encoded characters and '\0' is considered a termination character. 3821 // UTF-8 encoded characters and '\0' is considered a termination character.
3822 // TODO(asiva) - Maybe rename this to FromCString(....).
3822 static RawString* New(const char* cstr, Heap::Space space = Heap::kNew); 3823 static RawString* New(const char* cstr, Heap::Space space = Heap::kNew);
3823 3824
3824 // Creates a new String object from an array of UTF-8 encoded characters. 3825 // Creates a new String object from an array of UTF-8 encoded characters.
3825 static RawString* New(const uint8_t* utf8_array, 3826 static RawString* FromUTF8(const uint8_t* utf8_array,
3827 intptr_t array_len,
3828 Heap::Space space = Heap::kNew);
3829
3830 // Creates a new String object from an array of Latin-1 encoded characters.
3831 static RawString* New(const uint8_t* latin1_array,
3826 intptr_t array_len, 3832 intptr_t array_len,
3827 Heap::Space space = Heap::kNew); 3833 Heap::Space space = Heap::kNew);
3828 3834
3829 // Creates a new String object from an array of UTF-16 encoded characters. 3835 // Creates a new String object from an array of UTF-16 encoded characters.
3830 static RawString* New(const uint16_t* utf16_array, 3836 static RawString* New(const uint16_t* utf16_array,
3831 intptr_t array_len, 3837 intptr_t array_len,
3832 Heap::Space space = Heap::kNew); 3838 Heap::Space space = Heap::kNew);
3833 3839
3834 // Creates a new String object from an array of UTF-32 encoded characters. 3840 // Creates a new String object from an array of UTF-32 encoded characters.
3835 static RawString* New(const int32_t* utf32_array, 3841 static RawString* New(const int32_t* utf32_array,
(...skipping 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after
5973 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5979 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5974 return false; 5980 return false;
5975 } 5981 }
5976 } 5982 }
5977 return true; 5983 return true;
5978 } 5984 }
5979 5985
5980 } // namespace dart 5986 } // namespace dart
5981 5987
5982 #endif // VM_OBJECT_H_ 5988 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « vm/double_conversion.cc ('k') | vm/object.cc » ('j') | vm/symbols.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698