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

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

Issue 1723733002: Simplify various name flavors in VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 264 }
265 265
266 266
267 static RawInstance* CreateMethodMirror(const Function& func, 267 static RawInstance* CreateMethodMirror(const Function& func,
268 const Instance& owner_mirror, 268 const Instance& owner_mirror,
269 const AbstractType& instantiator) { 269 const AbstractType& instantiator) {
270 const Array& args = Array::Handle(Array::New(6)); 270 const Array& args = Array::Handle(Array::New(6));
271 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(func))); 271 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(func)));
272 272
273 String& name = String::Handle(func.name()); 273 String& name = String::Handle(func.name());
274 name = String::IdentifierPrettyNameRetainPrivate(name); 274 name = String::ScrubNameRetainPrivate(name);
275 args.SetAt(1, name); 275 args.SetAt(1, name);
276 args.SetAt(2, owner_mirror); 276 args.SetAt(2, owner_mirror);
277 args.SetAt(3, instantiator); 277 args.SetAt(3, instantiator);
278 args.SetAt(4, Bool::Get(func.is_static())); 278 args.SetAt(4, Bool::Get(func.is_static()));
279 279
280 intptr_t kind_flags = 0; 280 intptr_t kind_flags = 0;
281 kind_flags |= (func.is_abstract() << Mirrors::kAbstract); 281 kind_flags |= (func.is_abstract() << Mirrors::kAbstract);
282 kind_flags |= (func.IsGetterFunction() << Mirrors::kGetter); 282 kind_flags |= (func.IsGetterFunction() << Mirrors::kGetter);
283 kind_flags |= (func.IsSetterFunction() << Mirrors::kSetter); 283 kind_flags |= (func.IsSetterFunction() << Mirrors::kSetter);
284 bool is_ctor = (func.kind() == RawFunction::kConstructor); 284 bool is_ctor = (func.kind() == RawFunction::kConstructor);
(...skipping 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after
2087 2087
2088 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { 2088 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
2089 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2089 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2090 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2090 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2091 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); 2091 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw();
2092 } 2092 }
2093 2093
2094 #endif // !PRODUCT 2094 #endif // !PRODUCT
2095 2095
2096 } // namespace dart 2096 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698