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

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

Issue 392043003: The dart version of typeddata library has changed to be compatible with the dart2js implementation (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 months 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 | « runtime/lib/typed_data.dart ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after
3027 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 3027 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
3028 field ^= fields_array.At(1); 3028 field ^= fields_array.At(1);
3029 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset()); 3029 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset());
3030 name ^= field.name(); 3030 name ^= field.name();
3031 expected_name ^= String::New("_offset"); 3031 expected_name ^= String::New("_offset");
3032 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 3032 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
3033 field ^= fields_array.At(2); 3033 field ^= fields_array.At(2);
3034 ASSERT(field.Offset() == TypedDataView::length_offset()); 3034 ASSERT(field.Offset() == TypedDataView::length_offset());
3035 name ^= field.name(); 3035 name ^= field.name();
3036 ASSERT(name.Equals("length")); 3036 ASSERT(name.Equals("length"));
3037
3038 // Now verify field offsets of '_ByteBuffer' class.
3039 cls = class_table.At(kByteBufferCid);
3040 error = cls.EnsureIsFinalized(isolate);
3041 ASSERT(error.IsNull());
3042 fields_array ^= cls.fields();
3043 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields());
3044 field ^= fields_array.At(0);
3045 ASSERT(field.Offset() == ByteBuffer::data_offset());
3046 name ^= field.name();
3047 expected_name ^= String::New("_data");
3048 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
3037 #endif 3049 #endif
3038 } 3050 }
3039 3051
3040 } // namespace dart 3052 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/typed_data.dart ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698