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

Side by Side Diff: runtime/vm/object.h

Issue 209003009: Fix memory-issue String::fromCharCodes, where a GC could invalidate an address. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months 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
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5288 matching lines...) Expand 10 before | Expand all | Expand 10 after
5299 intptr_t len, 5299 intptr_t len,
5300 Heap::Space space); 5300 Heap::Space space);
5301 static RawOneByteString* New(const String& str, 5301 static RawOneByteString* New(const String& str,
5302 Heap::Space space); 5302 Heap::Space space);
5303 // 'other' must be OneByteString. 5303 // 'other' must be OneByteString.
5304 static RawOneByteString* New(const String& other_one_byte_string, 5304 static RawOneByteString* New(const String& other_one_byte_string,
5305 intptr_t other_start_index, 5305 intptr_t other_start_index,
5306 intptr_t other_len, 5306 intptr_t other_len,
5307 Heap::Space space); 5307 Heap::Space space);
5308 5308
5309 static RawOneByteString* New(const TypedData& other_typed_data,
5310 intptr_t other_start_index,
5311 intptr_t other_len,
5312 Heap::Space space = Heap::kNew);
5313
5314 static RawOneByteString* New(const ExternalTypedData& other_typed_data,
5315 intptr_t other_start_index,
5316 intptr_t other_len,
5317 Heap::Space space = Heap::kNew);
5318
5309 static RawOneByteString* Concat(const String& str1, 5319 static RawOneByteString* Concat(const String& str1,
5310 const String& str2, 5320 const String& str2,
5311 Heap::Space space); 5321 Heap::Space space);
5312 static RawOneByteString* ConcatAll(const Array& strings, 5322 static RawOneByteString* ConcatAll(const Array& strings,
5313 intptr_t start, 5323 intptr_t start,
5314 intptr_t end, 5324 intptr_t end,
5315 intptr_t len, 5325 intptr_t len,
5316 Heap::Space space); 5326 Heap::Space space);
5317 5327
5318 static RawOneByteString* Transform(int32_t (*mapping)(int32_t ch), 5328 static RawOneByteString* Transform(int32_t (*mapping)(int32_t ch),
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
6746 6756
6747 6757
6748 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6758 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6749 intptr_t index) { 6759 intptr_t index) {
6750 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6760 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6751 } 6761 }
6752 6762
6753 } // namespace dart 6763 } // namespace dart
6754 6764
6755 #endif // VM_OBJECT_H_ 6765 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698