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 23026004: Clean up VM class DartFunction. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « no previous file | runtime/vm/object.h » ('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 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 case kArrayCid: 1920 case kArrayCid:
1921 case kImmutableArrayCid: 1921 case kImmutableArrayCid:
1922 case kGrowableObjectArrayCid: 1922 case kGrowableObjectArrayCid:
1923 #define DO_NOT_EXTEND_TYPED_DATA_CLASSES(clazz) \ 1923 #define DO_NOT_EXTEND_TYPED_DATA_CLASSES(clazz) \
1924 case kTypedData##clazz##Cid: \ 1924 case kTypedData##clazz##Cid: \
1925 case kTypedData##clazz##ViewCid: \ 1925 case kTypedData##clazz##ViewCid: \
1926 case kExternalTypedData##clazz##Cid: 1926 case kExternalTypedData##clazz##Cid:
1927 CLASS_LIST_TYPED_DATA(DO_NOT_EXTEND_TYPED_DATA_CLASSES) 1927 CLASS_LIST_TYPED_DATA(DO_NOT_EXTEND_TYPED_DATA_CLASSES)
1928 #undef DO_NOT_EXTEND_TYPED_DATA_CLASSES 1928 #undef DO_NOT_EXTEND_TYPED_DATA_CLASSES
1929 case kByteDataViewCid: 1929 case kByteDataViewCid:
1930 case kDartFunctionCid:
1931 case kWeakPropertyCid: 1930 case kWeakPropertyCid:
1932 is_error = true; 1931 is_error = true;
1933 break; 1932 break;
1934 default: { 1933 default: {
1935 // Special case: classes for which we don't have a known class id. 1934 // Special case: classes for which we don't have a known class id.
1936 if (super_type.IsDoubleType() || 1935 if (super_type.IsDoubleType() ||
1937 super_type.IsIntType() || 1936 super_type.IsIntType() ||
1938 super_type.IsStringType()) { 1937 super_type.IsStringType() ||
1938 super_type.IsFunctionType()) {
1939 is_error = true; 1939 is_error = true;
1940 } 1940 }
1941 break; 1941 break;
1942 } 1942 }
1943 } 1943 }
1944 if (is_error) { 1944 if (is_error) {
1945 const Script& script = Script::Handle(cls.script()); 1945 const Script& script = Script::Handle(cls.script());
1946 ReportError(Error::Handle(), // No previous error. 1946 ReportError(Error::Handle(), // No previous error.
1947 script, cls.token_pos(), 1947 script, cls.token_pos(),
1948 "'%s' is not allowed to extend '%s'", 1948 "'%s' is not allowed to extend '%s'",
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 expected_name ^= String::New("_offset"); 2224 expected_name ^= String::New("_offset");
2225 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 2225 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
2226 field ^= fields_array.At(2); 2226 field ^= fields_array.At(2);
2227 ASSERT(field.Offset() == TypedDataView::length_offset()); 2227 ASSERT(field.Offset() == TypedDataView::length_offset());
2228 name ^= field.name(); 2228 name ^= field.name();
2229 ASSERT(name.Equals("length")); 2229 ASSERT(name.Equals("length"));
2230 #endif 2230 #endif
2231 } 2231 }
2232 2232
2233 } // namespace dart 2233 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698