| 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 3014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3025 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 3025 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
| 3026 field ^= fields_array.At(1); | 3026 field ^= fields_array.At(1); |
| 3027 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset()); | 3027 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset()); |
| 3028 name ^= field.name(); | 3028 name ^= field.name(); |
| 3029 expected_name ^= String::New("_offset"); | 3029 expected_name ^= String::New("_offset"); |
| 3030 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 3030 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
| 3031 field ^= fields_array.At(2); | 3031 field ^= fields_array.At(2); |
| 3032 ASSERT(field.Offset() == TypedDataView::length_offset()); | 3032 ASSERT(field.Offset() == TypedDataView::length_offset()); |
| 3033 name ^= field.name(); | 3033 name ^= field.name(); |
| 3034 ASSERT(name.Equals("length")); | 3034 ASSERT(name.Equals("length")); |
| 3035 |
| 3036 // Now verify field offsets of '_ByteBuffer' class. |
| 3037 cls = class_table.At(kByteBufferCid); |
| 3038 error = cls.EnsureIsFinalized(isolate); |
| 3039 ASSERT(error.IsNull()); |
| 3040 fields_array ^= cls.fields(); |
| 3041 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); |
| 3042 field ^= fields_array.At(0); |
| 3043 ASSERT(field.Offset() == ByteBuffer::data_offset()); |
| 3044 name ^= field.name(); |
| 3045 expected_name ^= String::New("_data"); |
| 3046 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
| 3035 #endif | 3047 #endif |
| 3036 } | 3048 } |
| 3037 | 3049 |
| 3038 } // namespace dart | 3050 } // namespace dart |
| OLD | NEW |