"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()")
(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
(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)