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

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

Issue 26247007: Fix snapshot generation to ensure that the snapshot does not contain (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « no previous file | runtime/vm/raw_object_snapshot.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_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 static bool IsIntegerClassId(intptr_t index); 394 static bool IsIntegerClassId(intptr_t index);
395 static bool IsStringClassId(intptr_t index); 395 static bool IsStringClassId(intptr_t index);
396 static bool IsOneByteStringClassId(intptr_t index); 396 static bool IsOneByteStringClassId(intptr_t index);
397 static bool IsTwoByteStringClassId(intptr_t index); 397 static bool IsTwoByteStringClassId(intptr_t index);
398 static bool IsExternalStringClassId(intptr_t index); 398 static bool IsExternalStringClassId(intptr_t index);
399 static bool IsBuiltinListClassId(intptr_t index); 399 static bool IsBuiltinListClassId(intptr_t index);
400 static bool IsTypedDataClassId(intptr_t index); 400 static bool IsTypedDataClassId(intptr_t index);
401 static bool IsTypedDataViewClassId(intptr_t index); 401 static bool IsTypedDataViewClassId(intptr_t index);
402 static bool IsExternalTypedDataClassId(intptr_t index); 402 static bool IsExternalTypedDataClassId(intptr_t index);
403 static bool IsImplementationClassId(intptr_t index); 403 static bool IsImplementationClassId(intptr_t index);
404 static bool IsInternalVMdefinedClassId(intptr_t index);
404 405
405 static intptr_t NumberOfTypedDataClasses(); 406 static intptr_t NumberOfTypedDataClasses();
406 407
407 private: 408 private:
408 uword tags_; // Various object tags (bits). 409 uword tags_; // Various object tags (bits).
409 410
410 class WatchedBit : public BitField<bool, kWatchedBit, 1> {}; 411 class WatchedBit : public BitField<bool, kWatchedBit, 1> {};
411 412
412 class MarkBit : public BitField<bool, kMarkBit, 1> {}; 413 class MarkBit : public BitField<bool, kMarkBit, 1> {};
413 414
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 } 1701 }
1701 1702
1702 1703
1703 inline bool RawObject::IsImplementationClassId(intptr_t index) { 1704 inline bool RawObject::IsImplementationClassId(intptr_t index) {
1704 return IsBuiltinListClassId(index) || 1705 return IsBuiltinListClassId(index) ||
1705 IsStringClassId(index) || 1706 IsStringClassId(index) ||
1706 IsNumberClassId(index); 1707 IsNumberClassId(index);
1707 } 1708 }
1708 1709
1709 1710
1711 inline bool RawObject::IsInternalVMdefinedClassId(intptr_t index) {
1712 return ((index < kNumPredefinedCids) &&
1713 !RawObject::IsTypedDataViewClassId(index));
1714 }
1715
1716
1710 inline intptr_t RawObject::NumberOfTypedDataClasses() { 1717 inline intptr_t RawObject::NumberOfTypedDataClasses() {
1711 // Make sure this is updated when new TypedData types are added. 1718 // Make sure this is updated when new TypedData types are added.
1712 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); 1719 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12);
1713 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); 1720 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13);
1714 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); 1721 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12);
1715 return (kNullCid - kTypedDataInt8ArrayCid); 1722 return (kNullCid - kTypedDataInt8ArrayCid);
1716 } 1723 }
1717 1724
1718 } // namespace dart 1725 } // namespace dart
1719 1726
1720 #endif // VM_RAW_OBJECT_H_ 1727 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698