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

Unified Diff: runtime/vm/object.cc

Issue 12907010: Fix some of teh scalarlist tests to use the TypedData VM class. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/benchmark_test.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 20500)
+++ runtime/vm/object.cc (working copy)
@@ -575,7 +575,7 @@
// Make unused space in an object whose type has been transformed safe
// for traversing during GC.
-// The unused part of the transformed object is marked as an Int8Array
+// The unused part of the transformed object is marked as an TypedDataInt8Array
// object.
void Object::MakeUnusedSpaceTraversable(const Object& obj,
intptr_t original_size,
@@ -587,16 +587,16 @@
intptr_t leftover_size = original_size - used_size;
uword addr = RawObject::ToAddr(obj.raw()) + used_size;
- ASSERT(Int8Array::InstanceSize(0) == Object::InstanceSize());
- // Update the leftover space as an Int8Array object.
- RawInt8Array* raw =
- reinterpret_cast<RawInt8Array*>(RawObject::FromAddr(addr));
+ ASSERT(TypedData::InstanceSize(0) == Object::InstanceSize());
+ // Update the leftover space as an TypedDataInt8Array object.
+ RawTypedData* raw =
+ reinterpret_cast<RawTypedData*>(RawObject::FromAddr(addr));
uword tags = 0;
tags = RawObject::SizeTag::update(leftover_size, tags);
- tags = RawObject::ClassIdTag::update(kInt8ArrayCid, tags);
+ tags = RawObject::ClassIdTag::update(kTypedDataInt8ArrayCid, tags);
raw->ptr()->tags_ = tags;
- intptr_t leftover_len = (leftover_size - Int8Array::InstanceSize(0));
- ASSERT(Int8Array::InstanceSize(leftover_len) == leftover_size);
+ intptr_t leftover_len = (leftover_size - TypedData::InstanceSize(0));
+ ASSERT(TypedData::InstanceSize(leftover_len) == leftover_size);
raw->ptr()->length_ = Smi::New(leftover_len);
}
}
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698