From: David Vázquez Date: Fri, 24 May 2013 01:05:17 +0000 (+0100) Subject: Remove aresize X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=eee670ad35cee4e2c963cf0bb9fb2faee180ccec;p=jscl.git Remove aresize --- diff --git a/src/compiler.lisp b/src/compiler.lisp index a41a85e..8bc6c63 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1585,14 +1585,6 @@ "var x = " array ";" *newline* "return x.indexOf(v);" *newline*)) -(define-builtin aresize (array new-size) - (js!selfcall - "var x = " array ";" *newline* - "var n = " new-size ";" *newline* - "return x.length = n;" *newline*)) - - - (define-builtin get-internal-real-time () "(new Date()).getTime()") diff --git a/src/print.lisp b/src/print.lisp index cb4a442..749faf8 100644 --- a/src/print.lisp +++ b/src/print.lisp @@ -100,6 +100,7 @@ (defvar *print-escape* t) (defvar *print-circle* nil) +;;; FIXME: Please, rewrite this in a more organized way. (defun write-to-string (form &optional known-objects object-ids) (when (and (not known-objects) *print-circle*) ;; To support *print-circle* some objects must be tracked for @@ -127,8 +128,12 @@ (progn (when (= n sz) (setf sz (* 2 sz)) - (aresize known-objects sz) - (aresize object-ids sz)) + ;; KLUDGE: storage vectors are an internal + ;; object which the printer should not know + ;; about. Use standard vector with fill + ;; pointers instead. + (resize-storage-vector known-objects sz) + (resize-storage-vector object-ids sz)) (aset known-objects (1- (incf n)) x) t) (unless (aref object-ids i)