class Context; class ExpressionArray; class FunctionDefinition; struct Modifiers; class Position; class Type; class Variable;
/** * A function declaration (not a definition -- does not contain a body).
*/ class FunctionDeclaration final : public Symbol { public: inlinestatic constexpr Kind kIRNodeKind = Kind::kFunctionDeclaration;
/** * If this function is main(), and it has the requested parameter, returns that parameter. * For instance, only a runtime-blend program will have a dest-color parameter, in parameter 1; * `getMainDestColorParameter` will return that parameter if this is a runtime-blend main() * function. Otherwise, null is returned.
*/ const Variable* getMainCoordsParameter() const { return fHasMainCoordsParameter ? fParameters[0] : nullptr;
} const Variable* getMainInputColorParameter() const { return fHasMainInputColorParameter ? fParameters[0] : nullptr;
} const Variable* getMainDestColorParameter() const { return fHasMainDestColorParameter ? fParameters[1] : nullptr;
}
/** * Determine the effective types of this function's parameters and return value when called with * the given arguments. This is relevant for functions with generic parameter types, where this * will collapse the generic types down into specific concrete types. * * Returns true if it was able to select a concrete set of types for the generic function, false * if there is no possible way this can match the argument types. Note that even a true return * does not guarantee that the function can be successfully called with those arguments, merely * indicates that an attempt should be made. If false is returned, the state of * outParameterTypes and outReturnType are undefined. * * This always assumes narrowing conversions are *allowed*. The calling code needs to verify * that each argument can actually be coerced to the final parameter type, respecting the * narrowing-conversions flag. This is handled in callCost(), or in convertCall() (via coerce).
*/ using ParamTypes = skia_private::STArray<8, const Type*>; bool determineFinalTypes(const ExpressionArray& arguments,
ParamTypes* outParameterTypes, const Type** outReturnType) const;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.