code: private void protectSideEffects() {
      if (!problemNodes.isEmpty()) {
        if (!preserveFunctionInjected) {
          addExtern(compiler);
        }
        for (Node n : problemNodes) {
          Node name = IR.name(PROTECTOR_FN).srcref(n);
          name.putBooleanProp(Node.IS_CONSTANT_NAME, true);
          Node replacement = IR.call(name).srcref(n);
          replacement.putBooleanProp(Node.FREE_CALL, true);
          n.replaceWith(replacement);
          replacement.addChildToBack(n);
          compiler.reportChangeToEnclosingScope(replacement);
        }
      }
    }
docs: Protect side-effect free nodes by making them parameters
  to a extern function call.  This call will be removed
  after all the optimizations passes have run.