Lines Matching defs:base
109 const AnyConstructor& base,
111 auto baseArguments = base.argumentSpan();
113 const Type& exprType = base.type();
135 int numConstructorArgs = base.type().columns();
229 base.fLine,
237 std::unique_ptr<Expression> base,
261 context.fErrors->error(base->fLine,
266 return Convert(context, std::move(base), std::move(components));
270 // '.x1w0'. A naive approach might turn that into 'float4(base.x, 1, base.w, 0)', but that evaluates
271 // 'base' twice. We instead group the swizzle mask ('xw') and constants ('1, 0') together and use a
273 // 'float4(base.xw, 1, 0).xzyw'.
275 std::unique_ptr<Expression> base,
278 context.fErrors->error(base->fLine,
283 const int line = base->fLine;
284 const Type& baseType = base->type();
344 // The swizzle component references a field that doesn't exist in the base type.
353 context.fErrors->error(line, "swizzle must refer to base expression");
358 base = baseType.scalarTypeForLiteral().coerceExpression(std::move(base), context);
359 if (!base) {
368 std::unique_ptr<Expression> expr = Swizzle::Make(context, std::move(base), maskComponents);
381 // The constructor will have at most three arguments: { base expr, constant 0, constant 1 }
461 // Detect identity swizzles like `color.rgba` and return the base-expression as-is.
477 Swizzle& base = expr->as<Swizzle>();
480 combined.push_back(base.components()[c]);
485 return Swizzle::Make(context, std::move(base.base()), combined);
511 // The swizzle could not be simplified, so apply the requested swizzle to the base expression.