#146 kill() does not kill compiled functions (+proposed fix)

closed
nobody
Lisp Core (471)
5
2005-04-04
2002-10-07
No

I have followed up on some of the testsuite issues.

The first problem occurs because kill doesn't kill a
compiled function. If the function is redefined then it
is killed. I see similar behaviour with gcl/windows and
clisp/cygwin.

Should kill(f) remove a compiled function f?

(C1) f(x):=x+2;
(D1) f(x) := x + 2
(C2) f(2);
(D2) 4
(C3) compile(f);
Compiling gazonk0.lsp.
End of Pass 1.
End of Pass 2.
OPTIMIZE levels: Safety=2, Space=2, Speed=2
Finished compiling gazonk0.lsp.
(D3) [f]
(C4) f(2);
(D4) 4
(C5) kill(f);
(D5) DONE
(C6) f(2);
(D6) 4
(C7) remfunction(f);
(D7) [f]
(C8) f(2);
(D8) 4
(C9) f(x):=x+3;
(D9) f(x) := x + 3
(C10) f(2);
(D10) 5
(C11) kill(f);
(D11) DONE
(C12) f(2);
(D12) f(2)

Discussion

  • Robert Dodier
    Robert Dodier
    2005-02-11

    • labels: --> Lisp Core
    • summary: kill() does not kill compiled functions --> kill() does not kill compiled functions (+proposed fix)
     
  • Robert Dodier
    Robert Dodier
    2005-02-11

    Logged In: YES
    user_id=501686

    It looks like this behavior is controlled by the
    undocumented flag $dont_kill_symbols_with_lisp_source_files
    in src/suprv1.lisp, description: ""Prevents killing
    functional properties of items which have been translated
    and loaded". $dont_kill_symbols_with_lisp_source_files
    appears in rev 1.1 of suprv1.lisp.

    I propose that $dont_kill_symbols_with_lisp_source_files
    default to nil instead of t.

     
  • James Amundson
    James Amundson
    2005-04-04

    • status: open --> closed
     
  • James Amundson
    James Amundson
    2005-04-04

    Logged In: YES
    user_id=28457

    The reported bug is not present in the current cvs version of
    Maxima.

    Thank you for your report. If you see this bug in a later version
    of Maxima, please submit a new bug report.