Lines Matching defs:function
91 // If an argument is null, zero is passed to the coalesce function. If the arguments are a mix
208 // If an argument is null, zero is passed to the evaluation function. If the arguments are a mix
777 (this->function().modifiers().fFlags & Modifiers::kHasSideEffects_Flag)) {
795 fLine, &this->type(), &this->function(), std::move(cloned));
799 String result = String(this->function().name()) + "(";
811 * Determines the cost of coercing the arguments of a function to the required types. Cost has no
815 CoercionCost FunctionCall::CallCost(const Context& context, const FunctionDeclaration& function,
818 (function.modifiers().fFlags & Modifiers::kES3_Flag)) {
821 if (function.parameters().size() != arguments.size()) {
826 if (!function.determineFinalTypes(arguments, &types, &ignored)) {
866 const ExternalFunction& f = functionValue->as<ExternalFunctionReference>().function();
870 "external function expected " + to_string(count) +
930 context.fErrors->error(line, "not a function");
937 const FunctionDeclaration& function,
939 // Reject ES3 function calls in strict ES2 mode.
940 if (context.fConfig->strictES2Mode() && (function.modifiers().fFlags & Modifiers::kES3_Flag)) {
941 context.fErrors->error(line, "call to '" + function.description() + "' is not supported");
945 // Reject function calls with the wrong number of arguments.
946 if (function.parameters().size() != arguments.size()) {
947 String msg = "call to '" + function.name() + "' expected " +
948 to_string((int)function.parameters().size()) + " argument";
949 if (function.parameters().size() != 1) {
960 if (!function.determineFinalTypes(arguments, &types, &returnType)) {
961 String msg = "no match for " + function.name() + "(";
980 const Modifiers& paramModifiers = function.parameters()[i]->modifiers();
991 if (function.intrinsicKind() == k_eval_IntrinsicKind) {
999 return Make(context, line, returnType, function, std::move(arguments));
1005 const FunctionDeclaration& function,
1007 SkASSERT(function.parameters().size() == arguments.size());
1010 if (function.isIntrinsic() && has_compile_time_constant_arguments(arguments)) {
1011 // The function is an intrinsic and all inputs are compile-time constants. Optimize it.
1013 function.intrinsicKind(),
1020 return std::make_unique<FunctionCall>(line, returnType, &function, std::move(arguments));