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

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

Issue 1584443002: VM: Precompiled rodata snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: compute string hash if necessary Created 4 years, 10 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 | « runtime/vm/isolate.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 6561 matching lines...) Expand 10 before | Expand all | Expand 10 after
6572 friend class Symbols; 6572 friend class Symbols;
6573 friend class StringSlice; // SetHash 6573 friend class StringSlice; // SetHash
6574 template<typename CharType> friend class CharArray; // SetHash 6574 template<typename CharType> friend class CharArray; // SetHash
6575 friend class ConcatString; // SetHash 6575 friend class ConcatString; // SetHash
6576 friend class OneByteString; 6576 friend class OneByteString;
6577 friend class TwoByteString; 6577 friend class TwoByteString;
6578 friend class ExternalOneByteString; 6578 friend class ExternalOneByteString;
6579 friend class ExternalTwoByteString; 6579 friend class ExternalTwoByteString;
6580 // So that SkippedCodeFunctions can print a debug string from a NoHandleScope. 6580 // So that SkippedCodeFunctions can print a debug string from a NoHandleScope.
6581 friend class SkippedCodeFunctions; 6581 friend class SkippedCodeFunctions;
6582 friend class RawOneByteString;
6582 }; 6583 };
6583 6584
6584 6585
6585 class OneByteString : public AllStatic { 6586 class OneByteString : public AllStatic {
6586 public: 6587 public:
6587 static uint16_t CharAt(const String& str, intptr_t index) { 6588 static uint16_t CharAt(const String& str, intptr_t index) {
6588 ASSERT((index >= 0) && (index < str.Length())); 6589 ASSERT((index >= 0) && (index < str.Length()));
6589 ASSERT(str.IsOneByteString()); 6590 ASSERT(str.IsOneByteString());
6590 return raw_ptr(str)->data()[index]; 6591 return raw_ptr(str)->data()[index];
6591 } 6592 }
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after
8427 8428
8428 8429
8429 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8430 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8430 intptr_t index) { 8431 intptr_t index) {
8431 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8432 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8432 } 8433 }
8433 8434
8434 } // namespace dart 8435 } // namespace dart
8435 8436
8436 #endif // VM_OBJECT_H_ 8437 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698