From def55b8c5b3d83b41cb61b542a21270b45e7dcdd Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Fri, 5 Jul 2013 03:14:44 +0200 Subject: [PATCH] Migrate GO --- src/compiler.lisp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index 4e35973..fd7e1e0 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -826,7 +826,7 @@ (let* ((go-tag-counter 0) (bindings (mapcar (lambda (label) - (let ((tagidx (integer-to-string (incf go-tag-counter)))) + (let ((tagidx (incf go-tag-counter))) (make-binding :name label :type 'gotag :value (list tbidx tagidx)))) (remove-if-not #'go-tag-p body)))) (extend-lexenv bindings *environment* 'gotag))) @@ -883,13 +883,13 @@ ((integerp label) (integer-to-string label))))) (when (null b) (error "Unknown tag `~S'" label)) - (js!selfcall - "throw ({" - "type: 'tagbody', " - "id: " (first (binding-value b)) ", " - "label: " (second (binding-value b)) ", " - "message: 'Attempt to GO to non-existing tag " n "'" - "})" ))) + (js!selfcall* + `(throw + (object + "type" "tagbody" + "id" ,(make-symbol (first (binding-value b))) + "label" ,(second (binding-value b)) + "message" ,(concat "Attempt to GO to non-existing tag " n)))))) (define-compilation unwind-protect (form &rest clean-up) (js!selfcall* -- 1.7.10.4