arrayOp

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 of e 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. References: https://github.com/dlang/druntime/blob/master/src/object.d#L3944

https://github.com/dlang/druntime/blob/master/src/core/internal/array/operations.d

  1. Expression arrayOp(BinExp e, Scope* sc)
  2. Expression arrayOp(BinAssignExp e, Scope* sc)
Suggestion Box / Bug Report