| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/code_generator.h" | 7 #include "vm/code_generator.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3094 Error& error = Error::Handle(isolate); | 3094 Error& error = Error::Handle(isolate); |
| 3095 | 3095 |
| 3096 // First verify field offsets of all the TypedDataView classes. | 3096 // First verify field offsets of all the TypedDataView classes. |
| 3097 for (intptr_t cid = kTypedDataInt8ArrayViewCid; | 3097 for (intptr_t cid = kTypedDataInt8ArrayViewCid; |
| 3098 cid <= kTypedDataFloat32x4ArrayViewCid; | 3098 cid <= kTypedDataFloat32x4ArrayViewCid; |
| 3099 cid++) { | 3099 cid++) { |
| 3100 cls = class_table.At(cid); // Get the TypedDataView class. | 3100 cls = class_table.At(cid); // Get the TypedDataView class. |
| 3101 error = cls.EnsureIsFinalized(isolate); | 3101 error = cls.EnsureIsFinalized(isolate); |
| 3102 ASSERT(error.IsNull()); | 3102 ASSERT(error.IsNull()); |
| 3103 cls = cls.SuperClass(); // Get it's super class '_TypedListView'. | 3103 cls = cls.SuperClass(); // Get it's super class '_TypedListView'. |
| 3104 cls = cls.SuperClass(); |
| 3104 fields_array ^= cls.fields(); | 3105 fields_array ^= cls.fields(); |
| 3105 ASSERT(fields_array.Length() == TypedDataView::NumberOfFields()); | 3106 ASSERT(fields_array.Length() == TypedDataView::NumberOfFields()); |
| 3106 field ^= fields_array.At(0); | 3107 field ^= fields_array.At(0); |
| 3107 ASSERT(field.Offset() == TypedDataView::data_offset()); | 3108 ASSERT(field.Offset() == TypedDataView::data_offset()); |
| 3108 name ^= field.name(); | 3109 name ^= field.name(); |
| 3109 expected_name ^= String::New("_typedData"); | 3110 expected_name ^= String::New("_typedData"); |
| 3110 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 3111 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
| 3111 field ^= fields_array.At(1); | 3112 field ^= fields_array.At(1); |
| 3112 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset()); | 3113 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset()); |
| 3113 name ^= field.name(); | 3114 name ^= field.name(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3147 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); | 3148 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); |
| 3148 field ^= fields_array.At(0); | 3149 field ^= fields_array.At(0); |
| 3149 ASSERT(field.Offset() == ByteBuffer::data_offset()); | 3150 ASSERT(field.Offset() == ByteBuffer::data_offset()); |
| 3150 name ^= field.name(); | 3151 name ^= field.name(); |
| 3151 expected_name ^= String::New("_data"); | 3152 expected_name ^= String::New("_data"); |
| 3152 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 3153 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
| 3153 #endif | 3154 #endif |
| 3154 } | 3155 } |
| 3155 | 3156 |
| 3156 } // namespace dart | 3157 } // namespace dart |
| OLD | NEW |