slang-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] slang2 pre-release snapshot 3 available


Hi,

As promised a new development snapshot of slang2 is available:

  ftp://space.mit.edu/pub/davis/slang/2.0-devel/slang-pre2-r3.tar.gz

This version includes a few minor bug-fixes as well as a new facility
for constructing debugging tools and profilers.  As an example of its
use, slsh contains a file called "stkcheck.sl" that defines a couple
of functions: enable_stack_check and disable_stack_check.  The idea is
that if you suspect that a portion of your slang code is leaving
something on the slang run-time stack, then put, e.g.,

   require ("stkcheck.sl");  % alternatively use ()=evalfile("stkcheck.sl");
   enable_stack_check ();

at the top of the file containing the suspect code.  (In order for 
"stkcheck.sl" to be picked up, it must be on your load-path.) Then run
the code.  A line with an unchecked return value such as

   fprintf (stdout, "foo\n");

should be flagged by the stack checker.  If portions of your code
contain functions that play games with the stack, e.g.,

    % Put a couple of values on the stack
    1;
    2;
    args = __pop_args (2);
     .
     .

then to avoid such lines being caught by the stack checker, turn
off stack-checking for the compilation of the function via
disable_stack_check, e.g.,

    enable_stack_check ();
       .
       .
    disable_stack_check ();
    define play_stack_games ()
    {
       .
       .
    }
    enable_stack_check ();
       .
       .

Note: When running with jed in interactive mode (not batch), the
stack-check messages will be written to the *traceback* buffer.
Otherwise the output will go to stderr.

The first cut at a profiler is included in the examples directory.

My development efforts for the next release will be focused on the
namespace issues that were previously discussed as well as the
migration to libtool.

Changes since 2.0.0 pre-release 2
1. autoconf/aclocal.m4: "if [...]" replaced by "if test ..." (Lloyd
   Zusman)
2. src/slsearch.c: BM searches for a string with the same length as
   the string to be searched was failing.
3. slsh/scripts/jpegsize: New demo script that finds the dimensions of
   jpeg-encoded images.
4. src/slstd.c: Added _slang_install_prefix intrinsic variable.
5. src/slboseos.c: New file.  This file allows to define callback
   functions that will be called at the beginning (BOS) and end (EOS) of 
   every statement executed by the interpreter.
6. slsh/lib/stkcheck,sl: The code in this file makes use of the new
   BOS/EOS hooks to display lines in a source file that leave
   something on the slang stack.
7. examples/profile.sl: This file defines a few functions that take
   advantage of the BOS/EOS hooks to profile slang code.
8. src/slarrfun.inc: sum and cumsum tweaked to use a "compensated
   summation" technique to reduce the effect of roundoff and
   truncation errors.
9. src/slmisc.c: SLatoi("h") was producing 0, and not an exception.
10. src/slmath.c: On VMS, slang is compiled with IEEE support (Jouk
    Jansen).




_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]