# HAL mulorshift, and divorshift,

mulorshift, ( op -- )
  If "op" is an immediate and is also a power of 2, generate a left shift with
  "<<,". If immediate is 1, nothing is generated. Otherwise, do "*,"

divorshift, ( op -- )
  If "op" is an immediate and is also a power of 2, generate a right shift with
  ">>,". If immediate is 1, nothing is generated. Otherwise, do "/mod,"

modorand, ( op -- )
  If "op" is an immediate and is also a power of 2, generate a "&,".
  Otherwise, do "/mod," followed by a copy of S to dst.

[*n] ( n -- n ) *I*
  Compiles a "mulordiv," of n by immediate value fetched by "n<" [doc/dict].

[*n+] ( n a -- a ) *I*
  Compile a multiplication of "n" by an immediate value fetched by "n<" followed
  by an addition to "a". In other words, an indexing operation.

[]{ ( idx -- a )
  A [lib/bm] "subscript" action that takes advantage of mulorshift, for speed.
  It takes "idx" from runtime PS or from "#" literal, multiplies it by the
  moustache's width in bytes and adds it to the moustache target. This can only
  be used with "&". See "Working with arrays" below.
