From: David Vázquez Date: Mon, 1 Jul 2013 02:31:53 +0000 (+0200) Subject: Migrate RETURN-FROM X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=63276458ddec5bfbe3aee3bbe6f26f713af864b3;p=jscl.git Migrate RETURN-FROM --- diff --git a/src/compiler.lisp b/src/compiler.lisp index 3826be6..4e35973 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -783,14 +783,15 @@ ;; unique identifier of the block as exception. We can't use the ;; variable name itself, because it could not to be unique, so we ;; capture it in a closure. - (js!selfcall - (when multiple-value-p `(code "var values = mv;" )) - "throw ({" - "type: 'block', " - "id: " (binding-value b) ", " - "values: " (ls-compile value multiple-value-p) ", " - "message: 'Return from unknown block " (symbol-name name) ".'" - "})"))) + (js!selfcall* + (when multiple-value-p + `(var (|values| |mv|))) + `(throw + (object + "type" "block" + "id" ,(make-symbol (binding-value b)) + "values" ,(ls-compile value multiple-value-p) + "message" ,(concat "Return from unknown block '" (symbol-name name) "'.")))))) (define-compilation catch (id &rest body) (js!selfcall*