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

Unified Diff: runtime/vm/raw_object.h

Issue 2835513002: Process generic function type arguments in more places (function type tests, (Closed)
Patch Set: Created 3 years, 8 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
« runtime/vm/object.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 1413348aeffc678ad1ff61b2a08b608f57fa8bd7..b848a0ba4434c2ca1984594d5373ff24510c8ff1 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -1783,7 +1783,7 @@ class RawClosure : public RawInstance {
return reinterpret_cast<RawObject**>(&ptr()->instantiator_type_arguments_);
}
- // No instance fields should be declared before the following 3 fields whose
+ // No instance fields should be declared before the following 4 fields whose
// offsets must be identical in Dart and C++.
// These 4 fields are also declared in the Dart source of class _Closure.
@@ -1793,6 +1793,16 @@ class RawClosure : public RawInstance {
RawContext* context_;
RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->context_); }
+
+ // Note that instantiator_type_arguments_ and function_type_arguments_ are
+ // used to instantiate the signature of function_ when this closure is
+ // involved in a type test. In other words, these fields define the function
+ // type of this closure instance, but they are not used when invoking it.
+ // If this closure is generic, it can be invoked with function type arguments
+ // that will be processed in the prolog of the closure function_. For example,
+ // if the generic closure function_ has a generic parent function, the
+ // passed-in function type arguments get concatenated to the function type
+ // arguments of the parent that are found in the context_.
};
« runtime/vm/object.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698