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

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

Issue 468423002: Add support for TypedData in full snapshot. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 V(Float64x2) \ 65 V(Float64x2) \
66 V(TypedData) \ 66 V(TypedData) \
67 V(ExternalTypedData) \ 67 V(ExternalTypedData) \
68 V(Capability) \ 68 V(Capability) \
69 V(ReceivePort) \ 69 V(ReceivePort) \
70 V(SendPort) \ 70 V(SendPort) \
71 V(Stacktrace) \ 71 V(Stacktrace) \
72 V(JSRegExp) \ 72 V(JSRegExp) \
73 V(WeakProperty) \ 73 V(WeakProperty) \
74 V(MirrorReference) \ 74 V(MirrorReference) \
75 V(LinkedHashMap) \ 75 V(LinkedHashMap) \
76 V(UserTag) \ 76 V(UserTag) \
77 77
78 #define CLASS_LIST_ARRAYS(V) \ 78 #define CLASS_LIST_ARRAYS(V) \
79 V(Array) \ 79 V(Array) \
80 V(ImmutableArray) \ 80 V(ImmutableArray) \
81 81
82 #define CLASS_LIST_STRINGS(V) \ 82 #define CLASS_LIST_STRINGS(V) \
83 V(String) \ 83 V(String) \
84 V(OneByteString) \ 84 V(OneByteString) \
85 V(TwoByteString) \ 85 V(TwoByteString) \
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 protected: 1612 protected:
1613 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } 1613 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); }
1614 RawSmi* length_; 1614 RawSmi* length_;
1615 // Variable length data follows here. 1615 // Variable length data follows here.
1616 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); } 1616 uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
1617 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } 1617 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); }
1618 1618
1619 friend class Api; 1619 friend class Api;
1620 friend class Object; 1620 friend class Object;
1621 friend class Instance; 1621 friend class Instance;
1622 friend class SnapshotReader;
1622 }; 1623 };
1623 1624
1624 1625
1625 class RawExternalTypedData : public RawInstance { 1626 class RawExternalTypedData : public RawInstance {
1626 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData); 1627 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData);
1627 1628
1628 protected: 1629 protected:
1629 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); } 1630 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->length_); }
1630 RawSmi* length_; 1631 RawSmi* length_;
1631 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } 1632 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); }
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 1978 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
1978 kTypedDataInt8ArrayViewCid + 15); 1979 kTypedDataInt8ArrayViewCid + 15);
1979 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 1980 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
1980 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 1981 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
1981 return (kNullCid - kTypedDataInt8ArrayCid); 1982 return (kNullCid - kTypedDataInt8ArrayCid);
1982 } 1983 }
1983 1984
1984 } // namespace dart 1985 } // namespace dart
1985 1986
1986 #endif // VM_RAW_OBJECT_H_ 1987 #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