Changeset 13339 in project for chicken


Ignore:
Timestamp:
02/18/09 19:03:51 (11 years ago)
Author:
felix winkelmann
Message:

reverted fix for separately marked finalizer procedures reported by Alejandro to re-enable finalization in the interpreter

Location:
chicken/trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/TODO

    r13337 r13339  
    1 TODO                                                            -*- org -*-
     1TODO                                                    -*- Outline -*-
    22====
    33
     
    1818
    1919** expander
    20 *** TODO unstripped quoted constants                                       :BUG:
     20*** unstripped quoted constants                                   
    2121    if macro expands into the name of an exported macro, ##sys#strip-syntax will
    2222    not strip the symbol (the se contains a macro-def). Possibly just use the
  • chicken/trunk/runtime.c

    r13177 r13339  
    27362736    }
    27372737
    2738     /* mark finalizer procedures: */
    2739     for(flist = finalizer_list; flist != NULL; flist = flist->next)
    2740       mark(&flist->finalizer);
    2741 
    27422738    mark_system_globals();
    27432739  }
     
    28042800        for(flist = finalizer_list; flist != NULL; flist = flist->next) {
    28052801          mark(&flist->item);
     2802          mark(&flist->finalizer);
    28062803          ++fcount;
    28072804        }
     
    28252822
    28262823          mark(&flist->item);
     2824          mark(&flist->finalizer);
    28272825        }
    28282826
     
    28372835
    28382836      if(pending_finalizer_count > 0 && gc_report_flag)
    2839         C_printf(C_text("[GC] finalizers pending: %d (%d live)\n"),
     2837        C_printf(C_text("[GC] finalizers pending for rescan:\t %d (%d live)\n"),
    28402838                 pending_finalizer_count, live_finalizer_count);
    28412839
     
    28462844         (and release finalizer node): */
    28472845      if(pending_finalizer_count > 0) {
    2848         if(gc_report_flag) C_printf(C_text("[GC] finalizers queued: %d\n"), pending_finalizer_count);
     2846        if(gc_report_flag) C_printf(C_text("[GC] queueing %d finalizers\n"), pending_finalizer_count);
    28492847
    28502848        last = C_block_item(pending_finalizers_symbol, 0);
  • chicken/trunk/tests/runtests.sh

    r13337 r13339  
    108108$interpret -e '(set! ##sys#procedure->string (constantly "#<procedure>"))' \
    109109  -i -s r4rstest.scm >r4rstest.log
    110 diff -bu r4rstest.out r4rstest.log || true
     110
     111if test "$MSYSTEM" == "MINGW32"; then
     112    # the windows runtime library prints flonums differently
     113    cat r4rstest.log
     114else
     115    diff -bu r4rstest.out r4rstest.log || true
     116fi
    111117
    112118echo "======================================== finalizer tests ..."
  • chicken/trunk/tests/test-finalizers.scm

    r12869 r13339  
    2323(gc #t)
    2424(assert (not x-f))
     25
     26#|
     27
     28This ought to work, see patches/finalizer.closures.diff for
     29a fix that unfortunately disables finalizers in the interpreter
     30(probably due to the different closure representation).
     31
    2532(assert (not y-f))
    2633(set! x #f)
     
    3239(assert y-f)
    3340(assert x-f)
     41|#
     42
     43(define foo-f #f)
     44
     45(let ((foo (vector 1 2 3)))
     46  (set-finalizer! foo (lambda _ (set! foo-f #t)))
     47  #t)
     48
     49(gc #t)
     50(assert foo-f)
Note: See TracChangeset for help on using the changeset viewer.