Changeset 12182 in project


Ignore:
Timestamp:
10/16/08 09:36:33 (12 years ago)
Author:
felix winkelmann
Message:

inlining fixes

Location:
chicken/branches/cmi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/cmi/NEWS

    r12112 r12182  
    3434    define-macro
    3535    define-extension
     36- "local" mode, in which locally defined exported toplevel variables can
     37  be inlined
     38- new options and declarations "[-]local" and "[-]inline-global"
     39- Optimization levels changed to use inlining:
     40  -optimize-level 3: enables -inline -local (but *not* -unsafe)
     41  -optimize-level 4: enables -inline -local -unsafe
     42- support for cross-module inlining
    3643
    37443.4.0
  • chicken/branches/cmi/TODO

    r12169 r12182  
    4545*** add dependency lines to rules.make to ensure library-units are built in correct order
    4646
     47* runtime
     48** pre-hashed symbols (extra symbol slot)
     49
    4750* benchmarks
    4851** add more realistic benchmarks
  • chicken/branches/cmi/rules.make

    r12152 r12182  
    12481248        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    12491249
    1250 chicken.c: $(SRCDIR)chicken.scm $(SRCDIR)chicken-more-macros.scm $(SRCDIR)chicken-ffi-macros.scm $(SRCDIR)private-namespace.scm
     1250chicken.c: $(SRCDIR)chicken.scm $(SRCDIR)chicken-more-macros.scm $(SRCDIR)chicken-ffi-macros.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    12511251        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1252 support.c: $(SRCDIR)support.scm $(SRCDIR)banner.scm $(SRCDIR)private-namespace.scm
     1252support.c: $(SRCDIR)support.scm $(SRCDIR)banner.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    12531253        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1254 compiler.c: $(SRCDIR)compiler.scm $(SRCDIR)private-namespace.scm
     1254compiler.c: $(SRCDIR)compiler.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    12551255        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1256 optimizer.c: $(SRCDIR)optimizer.scm $(SRCDIR)private-namespace.scm
     1256optimizer.c: $(SRCDIR)optimizer.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    12571257        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1258 batch-driver.c: $(SRCDIR)batch-driver.scm $(SRCDIR)private-namespace.scm
     1258batch-driver.c: $(SRCDIR)batch-driver.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    12591259        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1260 c-platform.c: $(SRCDIR)c-platform.scm $(SRCDIR)private-namespace.scm
     1260c-platform.c: $(SRCDIR)c-platform.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    12611261        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1262 c-backend.c: $(SRCDIR)c-backend.scm $(SRCDIR)private-namespace.scm
     1262c-backend.c: $(SRCDIR)c-backend.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    12631263        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    12641264
  • chicken/branches/cmi/support.scm

    r12169 r12182  
    3737  file-io-only banner custom-declare-alist disabled-warnings internal-bindings
    3838  unit-name insert-timer-checks used-units source-filename pending-canonicalizations
    39   foreign-declarations block-compilation line-number-database-size node->sexpr
     39  foreign-declarations block-compilation line-number-database-size node->sexpr sexpr->node
    4040  target-heap-size target-stack-size variable-visible? hide-variable export-variable
    4141  default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
     
    668668      ,@(map walk (node-subexpressions n)))))
    669669
     670(define (sexpr->node x)
     671  (let walk ((x x))
     672    (make-node (car x) (cadr x) (map walk (cddr x)))))
     673
    670674(define (emit-global-inline-file filename db)
    671675  (let ((lst '()))
    672676    (with-output-to-file filename
    673677      (lambda ()
    674         (print "; GENERATED BY CHICKEN " (chicken-version) "\n")
     678        (print "; GENERATED BY CHICKEN " (chicken-version) " FROM "
     679               source-filename "\n")
    675680        (##sys#hash-table-for-each
    676681         (lambda (sym plist)
    677682           (when (variable-visible? sym)
    678683             (and-let* ((val (assq 'local-value plist))
     684                        ((not (node? (variable-mark sym '##compiler#inline-global))))
    679685                        ((let ((val (assq 'value plist)))
    680686                           (or (not val)
     
    705711          (unless (eof-object? x)
    706712            (mark-variable
    707              (car x) '##compiler#inline-global
    708              (apply make-node (cadr x)))
     713             (car x)
     714             '##compiler#inline-global
     715             (sexpr->node (cadr x)))
    709716            (loop)))))))
    710717
Note: See TracChangeset for help on using the changeset viewer.