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

Unified Diff: runtime/vm/snapshot.cc

Issue 12093071: - Change the layout of external typed array objects to avoid the extra indirection when accessing e… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
===================================================================
--- runtime/vm/snapshot.cc (revision 17875)
+++ runtime/vm/snapshot.cc (working copy)
@@ -422,12 +422,9 @@
uint8_t* array = const_cast<uint8_t*>(CurrentBufferAddress());
ASSERT(array != NULL);
Advance(len);
- ExternalByteArrayData<uint8_t>* external_data =
- new ExternalByteArrayData<uint8_t>(array, NULL, NULL);
- ASSERT(external_data != NULL);
data_ = reinterpret_cast<RawExternalUint8Array*>(
AllocateUninitialized(cls_, ExternalUint8Array::InstanceSize()));
- data_.SetExternalData(external_data);
+ data_.SetData(array);
data_.SetLength(len);
stream_.SetStream(data_);
return stream_.raw();
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698