From eee670ad35cee4e2c963cf0bb9fb2faee180ccec Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Fri, 24 May 2013 02:05:17 +0100 Subject: [PATCH] Remove aresize --- src/compiler.lisp | 8 -------- src/print.lisp | 9 +++++++-- 2 files changed, 7 insertions(+), 10 deletions(-) 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) -- 1.7.10.4