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

Side by Side Diff: runtime/vm/class_finalizer.cc

Issue 8429027: Add an external array type to support typed arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/object.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #include "vm/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 cls = object_store->mint_class(); 208 cls = object_store->mint_class();
209 ASSERT(Mint::InstanceSize() == cls.instance_size()); 209 ASSERT(Mint::InstanceSize() == cls.instance_size());
210 cls = object_store->bigint_class(); 210 cls = object_store->bigint_class();
211 ASSERT(Bigint::InstanceSize() == cls.instance_size()); 211 ASSERT(Bigint::InstanceSize() == cls.instance_size());
212 cls = object_store->bool_class(); 212 cls = object_store->bool_class();
213 ASSERT(Bool::InstanceSize() == cls.instance_size()); 213 ASSERT(Bool::InstanceSize() == cls.instance_size());
214 cls = object_store->array_class(); 214 cls = object_store->array_class();
215 ASSERT(Array::InstanceSize() == cls.instance_size()); 215 ASSERT(Array::InstanceSize() == cls.instance_size());
216 cls = object_store->immutable_array_class(); 216 cls = object_store->immutable_array_class();
217 ASSERT(Array::InstanceSize() == cls.instance_size()); 217 ASSERT(Array::InstanceSize() == cls.instance_size());
218 cls = object_store->external_array_class();
219 ASSERT(ExternalArray::InstanceSize() == cls.instance_size());
218 #endif // defined(DEBUG) 220 #endif // defined(DEBUG)
219 221
220 // Remember the currently pending classes. 222 // Remember the currently pending classes.
221 const Array& class_array = Array::Handle(object_store->pending_classes()); 223 const Array& class_array = Array::Handle(object_store->pending_classes());
222 for (intptr_t i = 0; i < class_array.Length(); i++) { 224 for (intptr_t i = 0; i < class_array.Length(); i++) {
223 // TODO(iposva): Add real checks. 225 // TODO(iposva): Add real checks.
224 cls ^= class_array.At(i); 226 cls ^= class_array.At(i);
225 if (cls.is_finalized() || cls.is_prefinalized()) { 227 if (cls.is_finalized() || cls.is_prefinalized()) {
226 // Pre-finalized bootstrap classes must not define any fields. 228 // Pre-finalized bootstrap classes must not define any fields.
227 ASSERT(Array::Handle(cls.fields()).Length() == 0); 229 ASSERT(Array::Handle(cls.fields()).Length() == 0);
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 ASSERT(msg_buffer != NULL); 1071 ASSERT(msg_buffer != NULL);
1070 va_list args; 1072 va_list args;
1071 va_start(args, format); 1073 va_start(args, format);
1072 OS::VSNPrint(msg_buffer, kBufferLength, format, args); 1074 OS::VSNPrint(msg_buffer, kBufferLength, format, args);
1073 va_end(args); 1075 va_end(args);
1074 isolate->long_jump_base()->Jump(1, msg_buffer); 1076 isolate->long_jump_base()->Jump(1, msg_buffer);
1075 UNREACHABLE(); 1077 UNREACHABLE();
1076 } 1078 }
1077 1079
1078 } // namespace dart 1080 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698