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

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

Issue 1322043002: More elimination of new space allocation, fix bugs in Symbols::FromConcatAll (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: synced Created 5 years, 3 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 6298 matching lines...) Expand 10 before | Expand all | Expand 10 after
6309 return &str.UnsafeMutableNonPointer(raw_ptr(str)->data())[index]; 6309 return &str.UnsafeMutableNonPointer(raw_ptr(str)->data())[index];
6310 } 6310 }
6311 6311
6312 static RawOneByteString* ReadFrom(SnapshotReader* reader, 6312 static RawOneByteString* ReadFrom(SnapshotReader* reader,
6313 intptr_t object_id, 6313 intptr_t object_id,
6314 intptr_t tags, 6314 intptr_t tags,
6315 Snapshot::Kind kind); 6315 Snapshot::Kind kind);
6316 6316
6317 friend class Class; 6317 friend class Class;
6318 friend class String; 6318 friend class String;
6319 friend class Symbols;
6319 friend class ExternalOneByteString; 6320 friend class ExternalOneByteString;
6320 friend class SnapshotReader; 6321 friend class SnapshotReader;
6321 friend class StringHasher; 6322 friend class StringHasher;
6322 }; 6323 };
6323 6324
6324 6325
6325 class TwoByteString : public AllStatic { 6326 class TwoByteString : public AllStatic {
6326 public: 6327 public:
6327 static uint16_t CharAt(const String& str, intptr_t index) { 6328 static uint16_t CharAt(const String& str, intptr_t index) {
6328 ASSERT((index >= 0) && (index < str.Length())); 6329 ASSERT((index >= 0) && (index < str.Length()));
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
6424 } 6425 }
6425 6426
6426 static RawTwoByteString* ReadFrom(SnapshotReader* reader, 6427 static RawTwoByteString* ReadFrom(SnapshotReader* reader,
6427 intptr_t object_id, 6428 intptr_t object_id,
6428 intptr_t tags, 6429 intptr_t tags,
6429 Snapshot::Kind kind); 6430 Snapshot::Kind kind);
6430 6431
6431 friend class Class; 6432 friend class Class;
6432 friend class String; 6433 friend class String;
6433 friend class SnapshotReader; 6434 friend class SnapshotReader;
6435 friend class Symbols;
6434 }; 6436 };
6435 6437
6436 6438
6437 class ExternalOneByteString : public AllStatic { 6439 class ExternalOneByteString : public AllStatic {
6438 public: 6440 public:
6439 static uint16_t CharAt(const String& str, intptr_t index) { 6441 static uint16_t CharAt(const String& str, intptr_t index) {
6440 NoSafepointScope no_safepoint; 6442 NoSafepointScope no_safepoint;
6441 return *CharAddr(str, index); 6443 return *CharAddr(str, index);
6442 } 6444 }
6443 6445
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
8051 8053
8052 8054
8053 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8055 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8054 intptr_t index) { 8056 intptr_t index) {
8055 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8057 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8056 } 8058 }
8057 8059
8058 } // namespace dart 8060 } // namespace dart
8059 8061
8060 #endif // VM_OBJECT_H_ 8062 #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