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

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

Issue 2719603002: Rename Closure instance field type_arguments_ to instantiator_. (Closed)
Patch Set: work in progress Created 3 years, 9 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
« no previous file with comments | « runtime/lib/function.dart ('k') | runtime/vm/bootstrap.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) 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 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 // The VM uses separate Functions for tear-offs, but the mirrors consider 1460 // The VM uses separate Functions for tear-offs, but the mirrors consider
1461 // the tear-offs to be the same as the torn-off methods. Avoid handing out 1461 // the tear-offs to be the same as the torn-off methods. Avoid handing out
1462 // a reference to the tear-off here to avoid a special case in the 1462 // a reference to the tear-off here to avoid a special case in the
1463 // the equality test. 1463 // the equality test.
1464 function = function.parent_function(); 1464 function = function.parent_function();
1465 } 1465 }
1466 1466
1467 Type& instantiator = Type::Handle(); 1467 Type& instantiator = Type::Handle();
1468 if (closure.IsClosure()) { 1468 if (closure.IsClosure()) {
1469 const TypeArguments& arguments = 1469 const TypeArguments& arguments =
1470 TypeArguments::Handle(closure.GetTypeArguments()); 1470 TypeArguments::Handle(Closure::Cast(closure).instantiator());
1471 const Class& cls = 1471 const Class& cls =
1472 Class::Handle(Isolate::Current()->object_store()->object_class()); 1472 Class::Handle(Isolate::Current()->object_store()->object_class());
1473 instantiator = Type::New(cls, arguments, TokenPosition::kNoSource); 1473 instantiator = Type::New(cls, arguments, TokenPosition::kNoSource);
1474 instantiator.SetIsFinalized(); 1474 instantiator.SetIsFinalized();
1475 } 1475 }
1476 return CreateMethodMirror(function, Instance::null_instance(), 1476 return CreateMethodMirror(function, Instance::null_instance(),
1477 instantiator); 1477 instantiator);
1478 } 1478 }
1479 return Instance::null(); 1479 return Instance::null();
1480 } 1480 }
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
2088 2088
2089 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { 2089 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
2090 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2090 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2091 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2091 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2092 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); 2092 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw();
2093 } 2093 }
2094 2094
2095 #endif // !PRODUCT && !DART_PRECOMPILED_RUNTIME 2095 #endif // !PRODUCT && !DART_PRECOMPILED_RUNTIME
2096 2096
2097 } // namespace dart 2097 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/function.dart ('k') | runtime/vm/bootstrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698