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

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

Issue 14296006: Fast copy between TypedData and ExternalTypedData (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 }; 165 };
166 166
167 enum { 167 enum {
168 kSmiTag = 0, 168 kSmiTag = 0,
169 kHeapObjectTag = 1, 169 kHeapObjectTag = 1,
170 kSmiTagSize = 1, 170 kSmiTagSize = 1,
171 kSmiTagMask = 1, 171 kSmiTagMask = 1,
172 kSmiTagShift = 1, 172 kSmiTagShift = 1,
173 }; 173 };
174 174
175 enum TypeDataElementType {
176 #define V(name) k##name##Element,
177 CLASS_LIST_TYPED_DATA(V)
178 #undef V
179 };
180
175 #define SNAPSHOT_WRITER_SUPPORT() \ 181 #define SNAPSHOT_WRITER_SUPPORT() \
176 void WriteTo( \ 182 void WriteTo( \
177 SnapshotWriter* writer, intptr_t object_id, Snapshot::Kind kind); \ 183 SnapshotWriter* writer, intptr_t object_id, Snapshot::Kind kind); \
178 friend class SnapshotWriter; \ 184 friend class SnapshotWriter; \
179 185
180 #define VISITOR_SUPPORT(object) \ 186 #define VISITOR_SUPPORT(object) \
181 static intptr_t Visit##object##Pointers(Raw##object* raw_obj, \ 187 static intptr_t Visit##object##Pointers(Raw##object* raw_obj, \
182 ObjectPointerVisitor* visitor); 188 ObjectPointerVisitor* visitor);
183 189
184 #define HEAP_PROFILER_SUPPORT() \ 190 #define HEAP_PROFILER_SUPPORT() \
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 // Make sure this is updated when new TypedData types are added. 1674 // Make sure this is updated when new TypedData types are added.
1669 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); 1675 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12);
1670 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); 1676 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13);
1671 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); 1677 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12);
1672 return (kNullCid - kTypedDataInt8ArrayCid); 1678 return (kNullCid - kTypedDataInt8ArrayCid);
1673 } 1679 }
1674 1680
1675 } // namespace dart 1681 } // namespace dart
1676 1682
1677 #endif // VM_RAW_OBJECT_H_ 1683 #endif // VM_RAW_OBJECT_H_
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698