Lines Matching defs:context

24 static ExpressionArray negate_operands(const Context& context, const ExpressionArray& operands);
26 static std::unique_ptr<Expression> simplify_negation(const Context& context,
35 if (type.checkForOutOfRangeLiteral(context, negated, value->fLine)) {
52 return ConstructorArray::Make(context, originalExpr.fLine, ctor.type(),
53 negate_operands(context, ctor.arguments()));
61 if (std::unique_ptr<Expression> simplified = simplify_negation(context,
63 return ConstructorDiagonalMatrix::Make(context, originalExpr.fLine, ctor.type(),
73 if (std::unique_ptr<Expression> simplified = simplify_negation(context,
75 return ConstructorSplat::Make(context, originalExpr.fLine, ctor.type(),
85 return ConstructorCompound::Make(context, originalExpr.fLine, ctor.type(),
86 negate_operands(context, ctor.arguments()));
96 static ExpressionArray negate_operands(const Context& context, const ExpressionArray& array) {
101 if (std::unique_ptr<Expression> simplified = simplify_negation(context, *expr)) {
111 static std::unique_ptr<Expression> negate_operand(const Context& context,
114 if (std::unique_ptr<Expression> simplified = simplify_negation(context, *value)) {
122 static std::unique_ptr<Expression> logical_not_operand(const Context& context,
148 std::unique_ptr<Expression> PrefixExpression::Convert(const Context& context,
155 context.fErrors->error(base->fLine,
163 context.fErrors->error(base->fLine,
172 context.fErrors->error(base->fLine,
178 context.fErrors)) {
185 context.fErrors->error(base->fLine,
193 if (context.fConfig->strictES2Mode()) {
195 context.fErrors->error(
201 context.fErrors->error(base->fLine,
208 base = baseType.scalarTypeForLiteral().coerceExpression(std::move(base), context);
219 return PrefixExpression::Make(context, op, std::move(base));
222 std::unique_ptr<Expression> PrefixExpression::Make(const Context& context, Operator op,
233 return negate_operand(context, std::move(base));
237 return logical_not_operand(context, std::move(base));
246 SkASSERT(!context.fConfig->strictES2Mode());