Changeset 13279 for trunk/source/library


Ignore:
Timestamp:
Dec 9, 2009, 7:48:38 PM (10 years ago)
Author:
gb
Message:

Lots of changes from "purify" branch, mostly involving:

  • new memory layout, to support x86 function purification, static cons
  • fasloader changes to load/save string constants faster

Fasl version, image version changed; new binaries for all platforms soon.

Location:
trunk/source/library
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/library/elf.lisp

    r13180 r13279  
    1919
    2020
     21(defloadvar *readonly-area*
     22    (do-consing-areas (a)
     23      (when (eql (%fixnum-ref a target::area.code)
     24                 ccl::area-readonly)
     25        (return a))))
    2126
    2227;;; String tables: used both for symbol names and for section names.
     
    164169    (subseq (nsubstitute #\0 #\# (nsubstitute #\. #\Space name)) 1)))
    165170
    166 #+x8664-target
    167 (defx86lapfunction dynamic-dnode ((x arg_z))
    168   (movq (% x) (% imm0))
    169   (ref-global x86::heap-start arg_y)
    170   (subq (% arg_y) (% imm0))
    171   (shrq ($ x8664::dnode-shift) (% imm0))
    172   (box-fixnum imm0 arg_z)
    173   (single-value-return))
    174 
    175 #+x8632-target
    176 (defx8632lapfunction dynamic-dnode ((x arg_z))
    177   (movl (% x) (% imm0))
    178   (ref-global x86::heap-start arg_y)
    179   (subl (% arg_y) (% imm0))
    180   (shrl ($ x8632::dnode-shift) (% imm0))
    181   (box-fixnum imm0 arg_z)
    182   (single-value-return))
     171
    183172
    184173(defun collect-elf-static-functions ()
    185174  (collect ((functions))
    186     (freeze)
     175    (purify)
    187176    (block walk
    188       (let* ((frozen-dnodes (frozen-space-dnodes)))
    189         (%map-areas (lambda (o)
    190                       (when (>= (dynamic-dnode o) frozen-dnodes)
    191                         (return-from walk nil))
    192                       (when (typep o
    193                                    #+x8664-target 'function-vector
    194                                    #-x8664-target 'function)
    195                         (functions (function-vector-to-function o))))
    196                     ccl::area-dynamic
    197                     )))
     177      (%map-areas (lambda (o)
     178                    (when (typep o
     179                                 #+x8664-target 'function-vector
     180                                 #-x8664-target 'function)
     181                      (functions (function-vector-to-function o))))
     182                  ccl::area-readonly
     183                  ccl::area-readonly
     184                  ))
    198185    (functions)))
    199186
     
    361348                #+32-bit-target :<E>lf32_<S>hdr.sh_flags) (logior #$SHF_WRITE #$SHF_ALLOC #$SHF_EXECINSTR)
    362349          (pref lisp-section-header #+64-bit-target :<E>lf64_<S>hdr.sh_addr
    363                 #+32-bit-target :<E>lf32_<S>hdr.sh_addr) (ash (%get-kernel-global heap-start) target::fixnumshift)
     350                #+32-bit-target :<E>lf32_<S>hdr.sh_addr) (ash (%fixnum-ref *readonly-area* target::area.low) target::fixnumshift)
    364351          (pref lisp-section-header #+64-bit-target :<E>lf64_<S>hdr.sh_size
    365                 #+32-bit-target :<E>lf32_<S>hdr.sh_size) (ash (frozen-space-dnodes) target::dnode-shift)
     352                #+32-bit-target :<E>lf32_<S>hdr.sh_size) (ash (- (%fixnum-ref *readonly-area* target::area.active) (%fixnum-ref *readonly-area* target::area.low) )target::fixnumshift)
    366353          (pref lisp-section-header #+64-bit-target :<E>lf64_<S>hdr.sh_offset
    367354                #+32-bit-target :<E>lf32_<S>hdr.sh_offset) 0
     
    389376          (pref shstrtab-section-header #+64-bit-target :<E>lf64_<S>hdr.sh_flags
    390377                #+32-bit-target :<E>lf32_<S>hdr.sh_flags) (logior #$SHF_STRINGS #$SHF_ALLOC))
    391     (elf-make-empty-data-for-section object lisp-section (ash (frozen-space-dnodes) target::dnode-shift))
     378    (elf-make-empty-data-for-section object lisp-section (ash (- (%fixnum-ref *readonly-area* target::area.active) (%fixnum-ref *readonly-area* target::area.low) )target::fixnumshift))
    392379    (elf-init-section-data-from-string-table object strings-section (elf-symbol-table-strings symbols))
    393380    (elf-init-section-data-from-string-table object shstrtab-section section-names)
  • trunk/source/library/lispequ.lisp

    r13067 r13279  
    12871287  readonly                              ; readonly section
    12881288  watched                               ; static area containing a single object
     1289  static-cons                           ; static cons cells
    12891290  managed-static                        ; growable static area
    12901291  static                                ; static data in application
Note: See TracChangeset for help on using the changeset viewer.