From: David Vázquez Date: Fri, 21 Jun 2013 23:19:06 +0000 (+0200) Subject: Fix object dumping X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=c7c503044eda90020ad2d445caddc7c1168beff0;p=jscl.git Fix object dumping --- diff --git a/src/compiler.lisp b/src/compiler.lisp index 44ccbe7..2edc334 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -116,7 +116,7 @@ (defun gvarname (symbol) (declare (ignore symbol)) - (format nil "v~d" (incf *variable-counter*))) + (code "v" (incf *variable-counter*))) (defun translate-variable (symbol) (awhen (lookup-in-lexenv symbol *environment* 'variable) @@ -497,7 +497,7 @@ (defvar *literal-counter* 0) (defun genlit () - (format nil "l~d" (incf *literal-counter*))) + (code "l" (incf *literal-counter*))) (defun dump-symbol (symbol) #-jscl @@ -1005,7 +1005,7 @@ (cond ((floatp x) (push (float-to-string x) fargs)) ((numberp x) (push (integer-to-string x) fargs)) - (t (let ((v (format nil "x~d" (incf counter)))) + (t (let ((v (code "x" (incf counter)))) (push v fargs) (push `(code "var " ,v " = " ,(ls-compile x) ";" "if (typeof " ,v " !== 'number') throw 'Not a number!';") diff --git a/src/print.lisp b/src/print.lisp index a8ac834..db3be82 100644 --- a/src/print.lisp +++ b/src/print.lisp @@ -289,7 +289,8 @@ (concatf res (format-special next (car arguments))) (pop arguments)))) (setq res (concat res (string c)))) - (incf i))) + (incf i)) + (/debug res)) (if destination (progn (write-string res)