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

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

Issue 14426006: Rename dart:typeddata to dart:typed_data. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/vm/bootstrap.cc ('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/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 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 for (intptr_t cid = kTypedDataInt8ArrayViewCid; 1957 for (intptr_t cid = kTypedDataInt8ArrayViewCid;
1958 cid <= kTypedDataFloat32x4ArrayViewCid; 1958 cid <= kTypedDataFloat32x4ArrayViewCid;
1959 cid++) { 1959 cid++) {
1960 cls = class_table.At(cid); // Get the TypedDataView class. 1960 cls = class_table.At(cid); // Get the TypedDataView class.
1961 cls = cls.SuperClass(); // Get it's super class '_TypedListView'. 1961 cls = cls.SuperClass(); // Get it's super class '_TypedListView'.
1962 fields_array ^= cls.fields(); 1962 fields_array ^= cls.fields();
1963 ASSERT(fields_array.Length() == TypedDataView::NumberOfFields()); 1963 ASSERT(fields_array.Length() == TypedDataView::NumberOfFields());
1964 field ^= fields_array.At(0); 1964 field ^= fields_array.At(0);
1965 ASSERT(field.Offset() == TypedDataView::data_offset()); 1965 ASSERT(field.Offset() == TypedDataView::data_offset());
1966 name ^= field.name(); 1966 name ^= field.name();
1967 expected_name ^= String::New("_typeddata"); 1967 expected_name ^= String::New("_typed_data");
1968 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 1968 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
1969 field ^= fields_array.At(1); 1969 field ^= fields_array.At(1);
1970 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset()); 1970 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset());
1971 name ^= field.name(); 1971 name ^= field.name();
1972 ASSERT(name.Equals("offsetInBytes")); 1972 ASSERT(name.Equals("offsetInBytes"));
1973 field ^= fields_array.At(2); 1973 field ^= fields_array.At(2);
1974 ASSERT(field.Offset() == TypedDataView::length_offset()); 1974 ASSERT(field.Offset() == TypedDataView::length_offset());
1975 name ^= field.name(); 1975 name ^= field.name();
1976 ASSERT(name.Equals("length")); 1976 ASSERT(name.Equals("length"));
1977 } 1977 }
1978 1978
1979 // Now verify field offsets of '_ByteDataView' class. 1979 // Now verify field offsets of '_ByteDataView' class.
1980 cls = class_table.At(kByteDataViewCid); 1980 cls = class_table.At(kByteDataViewCid);
1981 fields_array ^= cls.fields(); 1981 fields_array ^= cls.fields();
1982 ASSERT(fields_array.Length() == TypedDataView::NumberOfFields()); 1982 ASSERT(fields_array.Length() == TypedDataView::NumberOfFields());
1983 field ^= fields_array.At(0); 1983 field ^= fields_array.At(0);
1984 ASSERT(field.Offset() == TypedDataView::data_offset()); 1984 ASSERT(field.Offset() == TypedDataView::data_offset());
1985 name ^= field.name(); 1985 name ^= field.name();
1986 expected_name ^= String::New("_typeddata"); 1986 expected_name ^= String::New("_typed_data");
1987 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 1987 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
1988 field ^= fields_array.At(1); 1988 field ^= fields_array.At(1);
1989 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset()); 1989 ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset());
1990 name ^= field.name(); 1990 name ^= field.name();
1991 expected_name ^= String::New("_offset"); 1991 expected_name ^= String::New("_offset");
1992 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 1992 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
1993 field ^= fields_array.At(2); 1993 field ^= fields_array.At(2);
1994 ASSERT(field.Offset() == TypedDataView::length_offset()); 1994 ASSERT(field.Offset() == TypedDataView::length_offset());
1995 name ^= field.name(); 1995 name ^= field.name();
1996 ASSERT(name.Equals("length")); 1996 ASSERT(name.Equals("length"));
1997 #endif 1997 #endif
1998 } 1998 }
1999 1999
2000 } // namespace dart 2000 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698