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

Unified Diff: runtime/vm/raw_object.cc

Issue 11437028: Added Uint8ClampedList. COmpielr optimziations to follow in next CL. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.cc
===================================================================
--- runtime/vm/raw_object.cc (revision 15794)
+++ runtime/vm/raw_object.cc (working copy)
@@ -123,6 +123,13 @@
instance_size = Uint8Array::InstanceSize(byte_array_length);
break;
}
+ case kUint8ClampedArrayCid: {
+ const RawUint8ClampedArray* raw_byte_array =
+ reinterpret_cast<const RawUint8ClampedArray*>(this);
+ intptr_t byte_array_length = Smi::Value(raw_byte_array->ptr()->length_);
+ instance_size = Uint8ClampedArray::InstanceSize(byte_array_length);
+ break;
+ }
case kInt16ArrayCid: {
const RawInt16Array* raw_byte_array =
reinterpret_cast<const RawInt16Array*>(this);
@@ -763,6 +770,16 @@
}
+intptr_t RawUint8ClampedArray::VisitUint8ClampedArrayPointers(
+ RawUint8ClampedArray *raw_obj, ObjectPointerVisitor* visitor) {
+ // Make sure that we got here with the tagged pointer as this.
+ ASSERT(raw_obj->IsHeapObject());
+ intptr_t length = Smi::Value(raw_obj->ptr()->length_);
+ visitor->VisitPointers(raw_obj->from(), raw_obj->to());
+ return Uint8ClampedArray::InstanceSize(length);
+}
+
+
intptr_t RawInt16Array::VisitInt16ArrayPointers(
RawInt16Array *raw_obj, ObjectPointerVisitor* visitor) {
// Make sure that we got here with the tagged pointer as this.
@@ -861,6 +878,15 @@
}
+intptr_t RawExternalUint8ClampedArray::VisitExternalUint8ClampedArrayPointers(
+ RawExternalUint8ClampedArray* raw_obj, ObjectPointerVisitor* visitor) {
+ // Make sure that we got here with the tagged pointer as this.
+ ASSERT(raw_obj->IsHeapObject());
+ visitor->VisitPointers(raw_obj->from(), raw_obj->to());
+ return ExternalUint8ClampedArray::InstanceSize();
+}
+
+
intptr_t RawExternalInt16Array::VisitExternalInt16ArrayPointers(
RawExternalInt16Array* raw_obj, ObjectPointerVisitor* visitor) {
// Make sure that we got here with the tagged pointer as this.
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698