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

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

Issue 23453024: Keep track of type parameter processing in mixin application classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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/class_finalizer.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) 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/invocation_mirror.h" 5 #include "lib/invocation_mirror.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/exceptions.h" 9 #include "vm/exceptions.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // represents the declaration or a non-null runtime type if it represents an 315 // represents the declaration or a non-null runtime type if it represents an
316 // instantiation. 316 // instantiation.
317 ASSERT(!(cls.NumTypeParameters() == 0) || !type.IsNull()); 317 ASSERT(!(cls.NumTypeParameters() == 0) || !type.IsNull());
318 318
319 const Array& args = Array::Handle(Array::New(5)); 319 const Array& args = Array::Handle(Array::New(5));
320 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(cls))); 320 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(cls)));
321 args.SetAt(1, type); 321 args.SetAt(1, type);
322 // We do not set the names of anonymous mixin applications because the mirrors 322 // We do not set the names of anonymous mixin applications because the mirrors
323 // use a different naming convention than the VM (lib.S with lib.M and S&M 323 // use a different naming convention than the VM (lib.S with lib.M and S&M
324 // respectively). 324 // respectively).
325 if ((cls.mixin() == Type::null()) || cls.is_mixin_typedef()) { 325 if (!cls.IsMixinApplication() || cls.is_mixin_typedef()) {
326 args.SetAt(2, String::Handle(cls.UserVisibleName())); 326 args.SetAt(2, String::Handle(cls.UserVisibleName()));
327 } 327 }
328 args.SetAt(3, is_generic); 328 args.SetAt(3, is_generic);
329 args.SetAt(4, is_mixin_typedef); 329 args.SetAt(4, is_mixin_typedef);
330 return CreateMirror(Symbols::_LocalClassMirrorImpl(), args); 330 return CreateMirror(Symbols::_LocalClassMirrorImpl(), args);
331 } 331 }
332 332
333 333
334 static RawInstance* CreateLibraryMirror(const Library& lib) { 334 static RawInstance* CreateLibraryMirror(const Library& lib) {
335 const Array& args = Array::Handle(Array::New(3)); 335 const Array& args = Array::Handle(Array::New(3));
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 } 1444 }
1445 1445
1446 1446
1447 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) { 1447 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) {
1448 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); 1448 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
1449 const Field& field = Field::Handle(ref.GetFieldReferent()); 1449 const Field& field = Field::Handle(ref.GetFieldReferent());
1450 return field.type(); 1450 return field.type();
1451 } 1451 }
1452 1452
1453 } // namespace dart 1453 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698