Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
dmd.arrayop
Compiler implementation of the
D programming language.
Authors:
License:
Source: arrayop.d
- bool
isArrayOpValid
(Expressione
); - Check that there are no uses of arrays without [].
- Expression
arrayOp
(BinExpe
, Scope*sc
);
ExpressionarrayOp
(BinAssignExpe
, Scope*sc
); - Construct the array operation expression, call object.arrayOp!(tiargs)(args). Encode operand types and operations into tiargs using reverse polish notation (RPN) to preserve precedence. Unary operations are prefixed with "u" (
e
.g. "u~"). Pass operand values (slices or scalars) as args.Scalar expression sub-trees ofe
are evaluated before calling into druntime to hoist them out of the loop. This is a valid evaluation order as the actual array operations have no side-effect. - void
buildArrayOp
(Scope*sc
, Expressione
, Objects*tiargs
, Expressions*args
); - Convert the expression tree
e
to template and function arguments, using reverse polish notation (RPN) to encode order of operations. Encode operations as string arguments, using a "u" prefix for unary operations. - bool
isUnaArrayOp
(TOKop
); - Test if expression is a unary array
op
. - bool
isBinArrayOp
(TOKop
); - Test if expression is a binary array
op
. - bool
isBinAssignArrayOp
(TOKop
); - Test if expression is a binary assignment array
op
. - bool
isArrayOpOperand
(Expressione
); - Test if operand is a valid array op operand.
- ErrorExp
arrayOpInvalidError
(Expressione
); - Print error message about invalid array operation.Parameters:
Expression e
expression with the invalid array operation Returns:instance of ErrorExp
Copyright © 1999-2018 by the D Language Foundation | Page generated by
Ddoc on (no date time)