Changeset 11526


Ignore:
Timestamp:
Dec 15, 2008, 12:44:49 PM (11 years ago)
Author:
gb
Message:

X8664, X86632 versions of %AUGMENT-STATIC-CONSES.
Use %AUGMENT-STATIC-CONSES in ALLOCATE-STATIC-CONSES.
MAKE-LIST: if 64K or more elements, use %ALLOCATE-LIST.

Location:
trunk/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/X86/X8632/x8632-misc.lisp

    r11450 r11526  
    780780  @again
    781781  (movl (@ (+ (target-nil-value) (x8632::kernel-global static-conses))) (% eax))
    782   (testl ($ (target-nil-value)) (% eax))
     782  (cmpl ($ (target-nil-value)) (% eax))
    783783  (jz @lose)
    784784  (%cdr eax temp0)
     
    788788  @lose
    789789  (movl (% eax) (% arg_z))
     790  (single-value-return))
     791
     792(defx8632lapfunction %augment-static-conses ((head arg_y) (tail arg_z))
     793  @again
     794  (movl (@ (+ (target-nil-value) (x8632::kernel-global static-conses))) (% eax))
     795  (movl (% eax) (@ target::cons.cdr (% tail)))
     796  (lock)
     797  (cmpxchgl (% head) (@ (+ (target-nil-value) (x8632::kernel-global static-conses))))
     798  (jnz @again)
     799  @lose
     800  (movl ($ (target-nil-value)) (% arg_z))
    790801  (single-value-return))
    791802
  • trunk/source/level-0/X86/x86-misc.lisp

    r11450 r11526  
    888888  (movq (% rax) (% arg_z))
    889889  (single-value-return))
     890
     891(defx86lapfunction %augment-static-conses ((head arg_y) (tail arg_z))
     892  @again
     893  (movq (@ (+ (target-nil-value) (x8664::kernel-global static-conses))) (% rax))
     894  (movq (% rax) (@ target::cons.cdr (% tail)))
     895  (lock)
     896  (cmpxchgq (% head) (@ (+ (target-nil-value) (x8664::kernel-global static-conses))))
     897  (jnz @again)
     898  @lose
     899  (movl ($ (target-nil-value)) (% arg_z.l))
     900  (single-value-return))
    890901 
    891902(defx86lapfunction %staticp ((x arg_z))
  • trunk/source/level-0/l0-aprims.lisp

    r11523 r11526  
    214214    (report-bad-arg size '(and fixnum unsigned-byte)))
    215215  (locally (declare (fixnum size))
    216     (do* ((result '() (cons initial-element result)))
    217         ((zerop size) result)
    218       (decf size))))
     216    (if (>= size (ash 1 16))
     217      (values (%allocate-list initial-element size))
     218      (do* ((result '() (cons initial-element result)))
     219           ((zerop size) result)
     220        (decf size)))))
    219221
    220222; end
  • trunk/source/lib/misc.lisp

    r11523 r11526  
    938938  "Allocates some memory, freezes it and lets it become garbage.
    939939   This will add the memory to the list of free static conses."
    940   (let ((l (make-array (1- (* 2 *static-cons-chunk*)))))
    941     (declare (ignore l))
    942     (freeze))
    943   (gc))
     940  (let* ((nfullgc (full-gc-count)))
     941    (multiple-value-bind (head tail)
     942        (%allocate-list 0 *static-cons-chunk*)
     943      (if (eql (full-gc-count) nfullgc)
     944        (freeze)
     945        (flash-freeze))
     946      (%augment-static-conses head tail))))
    944947
    945948(defun static-cons (car-value cdr-value)
Note: See TracChangeset for help on using the changeset viewer.