NO_INLINE JsVar *jspeStatementIf() {
  bool cond;
  JsVar *var, *result = 0;
  JSP_ASSERT_MATCH(LEX_R_IF);
  JSP_MATCH('(');
  var = jspeExpression();
  if (JSP_SHOULDNT_PARSE) return var;
  JSP_MATCH(')');
  cond = JSP_SHOULD_EXECUTE && jsvGetBoolAndUnLock(jsvSkipName(var));
  jsvUnLock(var);

  JSP_SAVE_EXECUTE();
  if (!cond) jspSetNoExecute();
  JsExecFlags hasError = 0;
  JsVar *a = jspeBlockOrStatement();
  hasError |= execInfo.execute&EXEC_ERROR_MASK;
  if (!cond) {
    jsvUnLock(a);
    JSP_RESTORE_EXECUTE();
    execInfo.execute |= hasError;
  } else {
    result = a;
  }
  if (lex->tk==LEX_R_ELSE) {
    JSP_ASSERT_MATCH(LEX_R_ELSE);
    JSP_SAVE_EXECUTE();
    if (cond) jspSetNoExecute();
    JsVar *a = jspeBlockOrStatement();
    hasError |= execInfo.execute&EXEC_ERROR_MASK;
    if (cond) {
      jsvUnLock(a);
      JSP_RESTORE_EXECUTE();
      execInfo.execute |= hasError;
    } else {
      result = a;
    }
  }
  return result;
}
NO_INLINE JsVar *jspeStatementIf() {
  bool cond;
  JsVar *var, *result = 0;
  JSP_ASSERT_MATCH(LEX_R_IF);
  JSP_MATCH('(');
  var = jspeExpression();
  if (JSP_SHOULDNT_PARSE) return var;
  JSP_MATCH(')');
  cond = JSP_SHOULD_EXECUTE && jsvGetBoolAndUnLock(jsvSkipName(var));
  jsvUnLock(var);

  JSP_SAVE_EXECUTE();
  if (!cond) jspSetNoExecute();
  JsExecFlags hasError = 0;
  JsVar *a = jspeBlockOrStatement();
  hasError |= execInfo.execute&EXEC_ERROR_MASK;
  if (!cond) {
    jsvUnLock(a);
    JSP_RESTORE_EXECUTE();
    execInfo.execute |= hasError;
  } else {
    result = a;
  }
  if (lex->tk==LEX_R_ELSE) {
    JSP_ASSERT_MATCH(LEX_R_ELSE);
    JSP_SAVE_EXECUTE();
    if (cond) jspSetNoExecute();
    JsVar *a = jspeBlockOrStatement();
    hasError |= execInfo.execute&EXEC_ERROR_MASK;
    if (cond) {
      jsvUnLock(a);
      JSP_RESTORE_EXECUTE();
      execInfo.execute |= hasError;
    } else {
      result = a;
    }
  }
  return result;
}