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

Side by Side Diff: runtime/lib/mirrors.cc

Issue 1513493002: Improve upper bound finalization in VM and fix #25122. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | tests/language/regress_25122_test.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "lib/mirrors.h" 5 #include "lib/mirrors.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/bootstrap_natives.h" 8 #include "vm/bootstrap_natives.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 } 1199 }
1200 } 1200 }
1201 1201
1202 return member_mirrors.raw(); 1202 return member_mirrors.raw();
1203 } 1203 }
1204 1204
1205 1205
1206 DEFINE_NATIVE_ENTRY(ClassMirror_type_variables, 1) { 1206 DEFINE_NATIVE_ENTRY(ClassMirror_type_variables, 1) {
1207 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); 1207 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
1208 const Class& klass = Class::Handle(ref.GetClassReferent()); 1208 const Class& klass = Class::Handle(ref.GetClassReferent());
1209 const Error& error = Error::Handle(zone, klass.EnsureIsFinalized(thread));
1210 if (!error.IsNull()) {
1211 Exceptions::PropagateError(error);
1212 UNREACHABLE();
1213 }
1209 return CreateTypeVariableList(klass); 1214 return CreateTypeVariableList(klass);
1210 } 1215 }
1211 1216
1212 1217
1213 DEFINE_NATIVE_ENTRY(ClassMirror_type_arguments, 1) { 1218 DEFINE_NATIVE_ENTRY(ClassMirror_type_arguments, 1) {
1214 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0)); 1219 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
1215 1220
1216 const Class& cls = Class::Handle(type.type_class()); 1221 const Class& cls = Class::Handle(type.type_class());
1217 const intptr_t num_params = cls.NumTypeParameters(); 1222 const intptr_t num_params = cls.NumTypeParameters();
1218 1223
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 } 2111 }
2107 2112
2108 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { 2113 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
2109 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2114 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2110 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2115 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2111 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw(); 2116 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw();
2112 } 2117 }
2113 2118
2114 2119
2115 } // namespace dart 2120 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | tests/language/regress_25122_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698