Lines Matching defs:function
36 // ...append a line to the end of the function body which fixes up sk_Position.
74 const FunctionDeclaration& function,
79 Finalizer(const Context& context, const FunctionDeclaration& function,
82 , fFunction(function)
90 void copyIntrinsicIfNeeded(const FunctionDeclaration& function) {
92 fContext.fIntrinsics->findAndInclude(function.description())) {
127 const FunctionDeclaration& func = expr.as<FunctionCall>().function();
164 // Early returns from a vertex main() function will bypass sk_Position
173 // Verify that the return statement matches the function's return type.
177 // Coerce return expression to the function's return type.
181 // Returning something from a function with a void return type.
184 "may not return a value from a void function");
188 // Returning nothing from a function with a non-void return type.
190 "expected function to return '" +
241 // which intrinsics have we encountered in this function
245 // number of slots consumed by all variables declared in the function
255 Finalizer(context, function, &referencedIntrinsics).visitStatement(*body);
256 if (function.isMain() && context.fConfig->fKind == ProgramKind::kVertex) {
257 append_rtadjust_fixup_to_vertex_main(context, function, body->as<Block>());
260 if (Analysis::CanExitWithoutReturningValue(function, *body)) {
261 context.fErrors->error(function.fLine, "function '" + function.name() +
265 return std::make_unique<FunctionDefinition>(line, &function, builtin, std::move(body),