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

Unified Diff: runtime/vm/class_finalizer.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/bootstrap_natives.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 15794)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -220,6 +220,8 @@
ASSERT(ImmutableArray::InstanceSize() == cls.instance_size());
cls = object_store->uint8_array_class();
ASSERT(Uint8Array::InstanceSize() == cls.instance_size());
+ cls = object_store->uint8_clamped_array_class();
+ ASSERT(Uint8ClampedArray::InstanceSize() == cls.instance_size());
cls = object_store->int16_array_class();
ASSERT(Int16Array::InstanceSize() == cls.instance_size());
cls = object_store->uint16_array_class();
@@ -238,8 +240,8 @@
ASSERT(Float64Array::InstanceSize() == cls.instance_size());
cls = object_store->external_int8_array_class();
ASSERT(ExternalInt8Array::InstanceSize() == cls.instance_size());
- cls = object_store->external_uint8_array_class();
- ASSERT(ExternalUint8Array::InstanceSize() == cls.instance_size());
+ cls = object_store->external_uint8_clamped_array_class();
+ ASSERT(ExternalUint8ClampedArray::InstanceSize() == cls.instance_size());
cls = object_store->external_int16_array_class();
ASSERT(ExternalInt16Array::InstanceSize() == cls.instance_size());
cls = object_store->external_uint16_array_class();
@@ -321,7 +323,7 @@
const Class& super_class = Class::Handle(super_type.type_class());
// If cls belongs to core lib or to core lib's implementation, restrictions
// about allowed interfaces are lifted.
- if (cls.library() != Library::CoreLibrary()) {
+ if ((cls.library() != Library::CoreLibrary())) {
// Prevent extending core implementation classes.
bool is_error = false;
switch (super_class.id()) {
@@ -342,7 +344,9 @@
case kInt8ArrayCid:
case kExternalInt8ArrayCid:
case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
case kExternalUint8ArrayCid:
+ case kExternalUint8ClampedArrayCid:
case kInt16ArrayCid:
case kExternalInt16ArrayCid:
case kUint16ArrayCid:
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698