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

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

Issue 1933933002: Use a reusable handle in SubString instead of creating one as this path is now used when creating S… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: pass-thread Created 4 years, 7 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
« no previous file with comments | « no previous file | 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 6557 matching lines...) Expand 10 before | Expand all | Expand 10 after
6568 intptr_t start, 6568 intptr_t start,
6569 intptr_t end, 6569 intptr_t end,
6570 Heap::Space space = Heap::kNew); 6570 Heap::Space space = Heap::kNew);
6571 6571
6572 static RawString* SubString(const String& str, 6572 static RawString* SubString(const String& str,
6573 intptr_t begin_index, 6573 intptr_t begin_index,
6574 Heap::Space space = Heap::kNew); 6574 Heap::Space space = Heap::kNew);
6575 static RawString* SubString(const String& str, 6575 static RawString* SubString(const String& str,
6576 intptr_t begin_index, 6576 intptr_t begin_index,
6577 intptr_t length, 6577 intptr_t length,
6578 Heap::Space space = Heap::kNew) {
6579 return SubString(Thread::Current(), str, begin_index, length, space);
6580 }
6581 static RawString* SubString(Thread* thread,
6582 const String& str,
6583 intptr_t begin_index,
6584 intptr_t length,
6578 Heap::Space space = Heap::kNew); 6585 Heap::Space space = Heap::kNew);
6579 6586
6580 static RawString* Transform(int32_t (*mapping)(int32_t ch), 6587 static RawString* Transform(int32_t (*mapping)(int32_t ch),
6581 const String& str, 6588 const String& str,
6582 Heap::Space space = Heap::kNew); 6589 Heap::Space space = Heap::kNew);
6583 6590
6584 static RawString* ToUpperCase(const String& str, 6591 static RawString* ToUpperCase(const String& str,
6585 Heap::Space space = Heap::kNew); 6592 Heap::Space space = Heap::kNew);
6586 static RawString* ToLowerCase(const String& str, 6593 static RawString* ToLowerCase(const String& str,
6587 Heap::Space space = Heap::kNew); 6594 Heap::Space space = Heap::kNew);
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
8507 8514
8508 8515
8509 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8516 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8510 intptr_t index) { 8517 intptr_t index) {
8511 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8518 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8512 } 8519 }
8513 8520
8514 } // namespace dart 8521 } // namespace dart
8515 8522
8516 #endif // VM_OBJECT_H_ 8523 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698