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

Unified Diff: runtime/vm/object.h

Issue 8391007: Complete generic closure type checking. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 712)
+++ runtime/vm/object.h (working copy)
@@ -1193,14 +1193,24 @@
// Returns true if the type of this function is a subtype of the type of
// the other function.
- bool IsSubtypeOf(const Function& other) const {
- return TestType(kIsSubtypeOf, other);
+ bool IsSubtypeOf(const TypeArguments& type_arguments,
+ const Function& other,
+ const TypeArguments& other_type_arguments) const {
+ return TestType(kIsSubtypeOf,
+ type_arguments,
+ other,
+ other_type_arguments);
}
// Returns true if the type of this function can be assigned to the type of
// the destination function.
- bool IsAssignableTo(const Function& dst) const {
- return TestType(kIsAssignableTo, dst);
+ bool IsAssignableTo(const TypeArguments& type_arguments,
+ const Function& dst,
+ const TypeArguments& dst_type_arguments) const {
+ return TestType(kIsAssignableTo,
+ type_arguments,
+ dst,
+ dst_type_arguments);
}
// Returns true if this function represents a (possibly implicit) closure
@@ -1274,7 +1284,10 @@
// Checks the subtype or assignability relationship between the type of this
// function and the type of the other function.
- bool TestType(TypeTestKind test, const Function& other) const;
+ bool TestType(TypeTestKind test,
+ const TypeArguments& type_arguments,
+ const Function& other,
+ const TypeArguments& other_type_arguments) const;
HEAP_OBJECT_IMPLEMENTATION(Function, Object);
friend class Class;
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698