Skip to content

tippers, squads, experts

Ori Roth edited this page Apr 2, 2017 · 3 revisions

Squads

Expression

  • The arithmetical squad

    • Converts cast to double by multiplying by 1.0
    • Applies arithmetical operations at compile time
    • Careful not to divide by zero and not mod zero.
    • Relies on the type engine
    • Multiplication by zero? Remove whole when item has no side effect.
  • The strings squad

    • Clever pushdown
    • changes equals
    • convert X.toString() to X + "" when possible
    • convert X.toString() to `"" + X' when above not possible
    • moves "" to end when possible
    • remove concatenation of empty string
    • contains
  • The Boolean squad

    • Compare to true / false
    • and with true, eliminate
    • or with false, eliminate
    • X && false: convert to false when possible, i.e., X has no side effect
    • X || true: convert to false when possible, i.e., X has no side effect

Statements

Methods

Experts

Clone this wiki locally