diff --git a/asdf.lisp b/asdf.lisp
index f6df00d..7e0c712 100755
--- a/asdf.lisp
+++ b/asdf.lisp
@@ -2279,45 +2279,21 @@ recursive calls to traverse.")
   (perform operation component))
 
 (defmethod perform-with-restarts ((o load-op) (c cl-source-file))
-  (declare (ignorable o))
-  (loop :with state = :initial
-    :until (or (eq state :success)
-               (eq state :failure)) :do
-    (case state
-      (:recompiled
-       (setf state :failure)
-       (call-next-method)
-       (setf state :success))
-      (:failed-load
-       (setf state :recompiled)
-       (perform (make-sub-operation c o c 'compile-op) c))
-      (t
-       (with-simple-restart
-           (try-recompiling "Recompile ~a and try loading it again"
-                            (component-name c))
-         (setf state :failed-load)
-         (call-next-method)
-         (setf state :success))))))
+  (restart-case
+      (perform o c)
+    (try-recompiling ()
+      :report (lambda (s)
+                (format s "Recompile ~a and try loading it again"
+                        (component-name c)))
+      (perform (make-sub-operation c o c 'compile-op) c)
+      (perform o c))))
 
 (defmethod perform-with-restarts ((o compile-op) (c cl-source-file))
-  (loop :with state = :initial
-    :until (or (eq state :success)
-               (eq state :failure)) :do
-    (case state
-      (:recompiled
-       (setf state :failure)
-       (call-next-method)
-       (setf state :success))
-      (:failed-compile
-       (setf state :recompiled)
-       (perform-with-restarts o c))
-      (t
-       (with-simple-restart
-           (try-recompiling "Try recompiling ~a"
-                            (component-name c))
-         (setf state :failed-compile)
-         (call-next-method)
-         (setf state :success))))))
+  (loop
+    (with-simple-restart
+        (try-recompiling "Try recompiling ~a"
+                         (component-name c))
+      (return (perform o c)))))
 
 (defmethod perform ((operation load-op) (c static-file))
   (declare (ignorable operation c))
