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

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

Issue 864463002: Create string efficiently from Uint16List/View. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
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 6106 matching lines...) Expand 10 before | Expand all | Expand 10 after
6117 static RawTwoByteString* New(const uint16_t* characters, 6117 static RawTwoByteString* New(const uint16_t* characters,
6118 intptr_t len, 6118 intptr_t len,
6119 Heap::Space space); 6119 Heap::Space space);
6120 static RawTwoByteString* New(intptr_t utf16_len, 6120 static RawTwoByteString* New(intptr_t utf16_len,
6121 const int32_t* characters, 6121 const int32_t* characters,
6122 intptr_t len, 6122 intptr_t len,
6123 Heap::Space space); 6123 Heap::Space space);
6124 static RawTwoByteString* New(const String& str, 6124 static RawTwoByteString* New(const String& str,
6125 Heap::Space space); 6125 Heap::Space space);
6126 6126
6127 static RawTwoByteString* New(const TypedData& other_typed_data,
6128 intptr_t other_start_index,
6129 intptr_t other_len,
6130 Heap::Space space = Heap::kNew);
6131
6132 static RawTwoByteString* New(const ExternalTypedData& other_typed_data,
6133 intptr_t other_start_index,
6134 intptr_t other_len,
6135 Heap::Space space = Heap::kNew);
6136
6127 static RawTwoByteString* Concat(const String& str1, 6137 static RawTwoByteString* Concat(const String& str1,
6128 const String& str2, 6138 const String& str2,
6129 Heap::Space space); 6139 Heap::Space space);
6130 static RawTwoByteString* ConcatAll(const Array& strings, 6140 static RawTwoByteString* ConcatAll(const Array& strings,
6131 intptr_t start, 6141 intptr_t start,
6132 intptr_t end, 6142 intptr_t end,
6133 intptr_t len, 6143 intptr_t len,
6134 Heap::Space space); 6144 Heap::Space space);
6135 6145
6136 static RawTwoByteString* Transform(int32_t (*mapping)(int32_t ch), 6146 static RawTwoByteString* Transform(int32_t (*mapping)(int32_t ch),
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
7700 7710
7701 7711
7702 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7712 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7703 intptr_t index) { 7713 intptr_t index) {
7704 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7714 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7705 } 7715 }
7706 7716
7707 } // namespace dart 7717 } // namespace dart
7708 7718
7709 #endif // VM_OBJECT_H_ 7719 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698