[pure-lang-svn] SF.net SVN: pure-lang: [275] pure/releases
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-06-21 11:19:54
|
Revision: 275 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=275&view=rev Author: agraef Date: 2008-06-21 04:13:10 -0700 (Sat, 21 Jun 2008) Log Message: ----------- Snapshot of Pure 0.4 (+some trivial post-release fixes). Added Paths: ----------- pure/releases/pure-0.4/ pure/releases/pure-0.4/ChangeLog pure/releases/pure-0.4/Makefile.in pure/releases/pure-0.4/NEWS pure/releases/pure-0.4/README pure/releases/pure-0.4/etc/pure.lang pure/releases/pure-0.4/examples/symbolic.pure pure/releases/pure-0.4/interpreter.cc pure/releases/pure-0.4/lexer.ll pure/releases/pure-0.4/pure.1.in pure/releases/pure-0.4/pure.cc Removed Paths: ------------- pure/releases/pure-0.4/ChangeLog pure/releases/pure-0.4/Makefile.in pure/releases/pure-0.4/NEWS pure/releases/pure-0.4/README pure/releases/pure-0.4/etc/pure.lang pure/releases/pure-0.4/examples/symbolic.pure pure/releases/pure-0.4/interpreter.cc pure/releases/pure-0.4/lexer.ll pure/releases/pure-0.4/pure.1.in pure/releases/pure-0.4/pure.cc Copied: pure/releases/pure-0.4 (from rev 261, pure/trunk) Deleted: pure/releases/pure-0.4/ChangeLog =================================================================== --- pure/trunk/ChangeLog 2008-06-18 20:32:46 UTC (rev 261) +++ pure/releases/pure-0.4/ChangeLog 2008-06-21 11:13:10 UTC (rev 275) @@ -1,403 +0,0 @@ -2008-06-18 Albert Graef <Dr....@t-...> - - * runtime.cc, lib/primitives.pure: Add hash function to compute 32 - bit hash codes of Pure expressions. Suggested by Jiri Spitz. - - * parser.yy, lexer.ll, interpreter.hh/cc: Add syntax for multiple - left-hand sides in function definitions and 'case' rules, as - requested by Jiri Spitz and discussed on the mailing list. See the - manual page for details. - - * symtable.cc, lib/prelude.pure, lib/primitives.pure: Rename the - bitwise operators '&' and '|' to 'and' and 'or'. - -2008-06-16 Albert Graef <Dr....@t-...> - - * etc/pure.lang: New language definition file for Andre Simon's - highlight program (http:/www.andre-simon.de/). This allows you to - format Pure sources with syntax highlighting as HTML and LaTeX - files, for instance. - - * configure.ac, Makefile.in: Clean up the source tree. Moved - auxiliary configure files and the syntax highlighting and - programming mode stuff into separate config and etc - subdirectories. Moreover, Makefile.in now has a target to - regenerate the configury using autoconf and autoheader. - -2008-06-15 Albert Graef <Dr....@t-...> - - * matcher.hh: gcc 4.3 compatibility fixes. Suggested by Toni - Graffy. - -2008-06-14 Albert Graef <Dr....@t-...> - - * lexer.ll: Various changes in order to facilitate script - execution and interfacing to Emacs. - - Initial '#!' on a line now denotes a comment line, in order to - support shebangs (see below). - - The new 'completion_matches' command provides information about - completions to programs driving the interpreter, such as Emacs - (see below). - - Paging of the 'list' command is now implemented using the program - specified with the PURE_MORE environment variable. This allows you - to disable this option (if PURE_MORE is undefined) or choose any - pager program and options that you prefer. Define PURE_MORE=more - in your shell startup files to get back the old behaviour of - piping 'list' output through 'more'. - - * pure.cc: Added new -q (quiet) and -x (execute) options. The - former is used in pure-mode.el to suppress the sign-on message of - the interpreter. The latter can be used in conjuction with the new - #! comment syntax to add shebangs to your script, see the manpage - for details. - - * pure-mode.el.in: Added new Emacs Pure mode. This is a quick and - dirty hack of Q mode and still needs some work (in particular, - auto indentation is pretty much broken right now). - -2008-06-13 Albert Graef <Dr....@t-...> - - * configure.ac, Makefile.in, etc.: Overhauled configury and bumped - the version number. - - Building a separate runtime lib on x86-64 works now (but requires - a patched LLVM, see the INSTALL file for details). Linking the - runtime lib on OSX should also work now. Moreover, it is now - possible to install different Pure versions in parallel, again see - the INSTALL file for details. - -2008-06-06 Albert Graef <Dr....@t-...> - - * 0.3 release. - - * configure.ac, etc.: Added autoconf support. Various fixes for 64 - bit and Windows compatibility. See the INSTALL file for updated - installation instructions. - -2008-06-01 Albert Graef <Dr....@t-...> - - * Makefile, interpreter.cc: Put the runtime and interpreter into a - separate shared library, to make it possible for modules to link - against the runtime, and to reduce the memory footprint when - multiple instances of the interpreter are run as different - processes. Also, this makes it possible to access the runtime - routines on systems where a program cannot dlopen itself. - -2008-05-28 Albert Graef <Dr....@t-...> - - * interpreter.cc, runtime.cc: Optimization of pure_freenew calls. - - * lib/strings.pure: Make 'cycle' work on strings. Reported by - Eddie Rucker. - - * lib/prelude.pure: Make 'index' work on lists. Code contributed - by Eddie Rucker. - -2008-05-27 Albert Graef <Dr....@t-...> - - * lib/prelude.pure: Rewrite prelude operations to make them - tail-recursive. - - * interpreter.cc (toplevel_codegen): Experimental support for - tail-recursive logical operators (&& and ||). This works but is - disabled, since it makes these operations behave in different ways - depending on the context, which is a really bad idea because it - violates referential transparency. - -2008-05-26 Albert Graef <Dr....@t-...> - - * interpreter.cc, runtime.cc: Overhaul of the shadow stack - machinery. Environment vectors are now maintained on the shadow - stack, so that all local functions and anonymous closures are - eligible for tail call optimization, even if they need access to - their environment. - -2008-05-25 Albert Graef <Dr....@t-...> - - * interpreter.cc, runtime.cc: Add marshalling between long (64 - bit) ints and Pure bigints in the C interface. This means that - both Pure ints and bigints can now be passed for 'long' arguments - of externals (with sign extension/truncation as necessary), and - 'long' values are promoted to Pure bigints on return. Hence C - functions taking 64 bit integers as arguments and returning them - as results can now be called from Pure without loosing bits due to - truncation. - - * interpreter.cc: Make toplevel if-then-else properly - tail-recursive. Thus, e.g., the following function will now run in - constant stack space: count x = if x<=0 then x else count (x-1); - This also works with nested if-then-else constructs, as long as - they form the right-hand side of an equation. - -2008-05-24 Albert Graef <Dr....@t-...> - - * interpreter.cc, runtime.cc: Fix more memory allocation bugs in - exception handling. - - * runtime.cc, lib/system.pure: Bugfixes in the scanf - functions. Reported by Jiri Spitz. - - * pure.cc, runtime.cc, util.cc: Windows/MinGW compatibility - fixes. Suggested by Jiri Spitz. - -2008-05-23 Albert Graef <Dr....@t-...> - - * runtime.cc: Fix premature freeing of eval result, and a minor - memory allocation glitch in the catch function. Reported by Eddie - Rucker. - - * Makefile: Bump version number. - - * interpreter.cc: If there are any child environments, doeval and - dodefn both create semi-permanent environments now, so that the - child environments and the corresponding LLVM IR survive for the - entire lifetime of any embedded closures, which might still be - called at a later time. This fixes the segfaults occurring when a - closure gets called after its associated environment was purged. A - partial fix for some situations (as reported earlier by Chris - Double) was already in the 0.2 release, but this didn't deal with - all cases, such as closures constructed in a call to the eval - function, as reported by Eddie Rucker. - -2008-05-22 Albert Graef <Dr....@t-...> - - * interpreter.cc, runtime.cc: Major overhaul of expression memory - handling. Fixed the shadow stack and memory debugging code. Both - function arguments and environment are now visible on the shadow - stack, and all remaining memory leaks have been fixed. Note that, - compared to previous revisions, the shadow stack slows down - compiled code by some 10% and it needs some additional memory. - OTOH, it also provides additional data that will be needed in the - planned symbolic debugger, and it seems to be the most efficient - way to handle dangling expression pointers after an exception - anyway. - -2008-05-17 Albert Graef <Dr....@t-...> - - * runtime.cc (pure_free_internal): Fixed a glitch which was - causing big memleaks. Reported by Libor Spacek. - - * interpreter.cc (define): Fixed error messages. - - * interpreter.cc, runtime.h: Reorganize pure_expr data structure - so that the data fields are *always* aligned on 8 byte boundaries. - This should now also work on 32 bit architectures where doubles - are aligned on 8 byte boundaries, such as Linux on 32 bit PPC. - Reported by Tim Haynes. - - * interpreter.cc: Fixed some case labels in switch instructions - which should be signed rather than unsigned values. Also made - void* a pointer to a dummy struct in LLVM IR, so that it can be - distinguished from all other pointer types, and added support for - short (16 bit) and long (64 bit) integer types (as well as the - corresponding pointer types) in the C interface. - - Please note that the typename 'long' *always* denotes signed 64 - bit integers in Pure's extern declarations, even if the C 'long' - type is actually 32 bit (as it usually is even on most 64 bit - systems). - -2008-05-16 Albert Graef <Dr....@t-...> - - * runtime.h: Fix compilation problems when header gets included - from C. - -2008-05-14 Albert Graef <Dr....@t-...> - - * funcall.h: Reduce maximum number of function parameters to - 64. This seems to be large enough for most purposes, and speeds up - compilation with -Ox by a factor of around 10. - - * Makefile: Overhaul of build options. In particular, the - 'default' build now includes basic optimization (-O) which makes - the interpreter almost as fast as with the 'release' build, and - produces a working interpreter also on 64 bit systems. (The - 'debug' build is still broken there, but see the SYSTEM NOTES - section in the INSTALL file for a workaround.) - - * interpreter.cc, runtime.cc: 64 bit compatibility fixes in bigint - handling. - -2008-05-12 Albert Graef <Dr....@t-...> - - * interpreter.cc: Fix a severe bug in the environment handling - code of the code generator, which could cause failed assertions in - the code generator, or wrong code to be generated in some cases. - To resolve this issue, the code generator now properly keeps - separate environments for each rule of a function - definition. Reported by John Lunney. - - * Makefile: Redirect warning and error messages from regression - tests to the logfile. - -2008-05-10 Albert Graef <Dr....@t-...> - - * interpreter.cc (uminop): Handle the value -0x80000000 at the - border of the int range, so that it is correctly treated as a - machine int. - -2008-05-09 Albert Graef <Dr....@t-...> - - * lexer.ll, printer.cc, etc.: Change the "G" suffix to denote - bigints to "L" ("G" can too easily be mistaken for a digit; also, - Python uses the same "L" notation for bigints). Reported by Eddie - Rucker. - -2008-05-06 Albert Graef <Dr....@t-...> - - * lib/primitives.pure: Made the pow function work with all - combinations of integer and double arguments. Also added the sqrt - function and the ^ operator. - - * runtime.cc, lib/primitives.pure: Added predicates funp, lambdap, - varp checking for named and anonymous closures and unbound global - variables, respectively. Requested by Libor Spacek. - - * interpreter.cc (declare_extern, fun_prolog): Handle some obscure - cases of name collisions between Pure and C functions. - -2008-05-05 Albert Graef <Dr....@t-...> - - * INSTALL: Add system-specific notes. - - * Makefile: Massaged some rules for OSX compatibility. In - particular, -rdynamic is now in the LDFLAGS, so that it can be - removed more easily, and I also removed the install -s flag so - that the pure executable is installed without stripping the - symbols which are needed to properly resolve runtime externals on - OSX. Reported by Ryan Schmidt and others. - - * matcher.cc (merge_ctrans): Fixed broken mpz_cmp() test causing - transitions on different (instead of equal) bigint constants to be - merged. Reported by Libor Spacek. - -2008-05-04 Albert Graef <Dr....@t-...> - - * 0.2 release. - - * lexer.ll, printer.cc: Add an explicit notation for big - integers. Any integer immediately followed by the uppercase letter - "G" (as in "biG" or "GMP") will now always be interpreted as a - bigint constant, even if it fits into a machine integer. This - notation is also used when printing bigint constants. This change - was necessary to make it possible to write rules matching against - "small bigint" constants. - - * lib/primitives.pure: Added operations to recognize function - applications and extract the function and argument parts, - implemented in runtime.cc. Note that these operations can't be - defined in Pure because of the "head is function" rule which means - that in a pattern of the form f x, f is always a literal function - symbol and not a variable. - -2008-05-03 Albert Graef <Dr....@t-...> - - * README: Moved installation instructions to a separate INSTALL - file, added Eddie Rucker's detailed instructions there. - - * util.cc (myiconv): Apple's iconv takes const char** as 2nd - parameter. #ifdef that case. Reported by Ryan Schmidt. - - * interpreter.cc (declare_extern): Fixed a bug in the generated - wrapper code for external calls, which caused function arguments - to be garbage-collected prematurely, when they were still needed - to create the default value, in the case of external calls - returning a null expression pointer to indicate failure. Reported - by Eddie Rucker. - - * test/test4.pure: Disabled tail call checks, as they may fail on - some platforms. Reported by Ryan Schmidt. - - * test/test1.pure: Corrected fact3 example, added test cases. - Reported by Libor Spacek. - -2008-05-02 Albert Graef <Dr....@t-...> - - * Makefile: Overhaul of regression tests so that results of - expressions are recorded. Also, 'make check' doesn't depend on the - log files any more, so that the logs can be stored in svn. You can - now use the explicit goal 'make logs' to regenerate the logs for - changed test files. - - * runtime.cc (same): Added a syntactic equality test. Requested by - Eddie Rucker. - - * Makefile: Add $(LDFLAGS) and $(LIBS) to the link line, so that - the user can easily add his own linker options and local - libraries. - - * lib/strings.pure: Add missing range check in string indexing - operation. Reported by Eddie Rucker. - - * printer.cc (operator <<): Handle stack overflow while printing - an expression. - - * interpreter.cc (dodefn): Fix a tricky bug causing the executable - code of closures bound to variables to be freed when it was still - needed. Reported by Chris Double. - -2008-05-01 Albert Graef <Dr....@t-...> - - * interpreter.cc: Proper alignment of value fields in expression - struct on 64 bit systems. Reported by Tim Haynes. - - * Makefile: g++ shouldn't be hardcoded, use $(CXX) instead. - Reported by Ryan Schmidt. - - * runtime.cc (pure_sys_vars): More OSX compatibility fixes. - Reported by Ryan Schmidt. - -2008-04-30 Albert Graef <Dr....@t-...> - - * interpreter.cc: Fix a compilation error (STL bug: - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11729) as well as some - bogus warnings with Apple gcc 4.0.1. Reported by Ryan Schmidt. - - * Makefile (make depend): Get rid of bogus LLVM dependencies. - Reported by Ryan Schmidt. - - * lexer.ll, parser.yy: Fixes for compatibility with newer flex and - bison versions. Reported by Eddie Rucker. - -2008-04-29 Albert Graef <Dr....@t-...> - - * 0.1 release. - -2008-04-28 Albert Graef <Dr....@t-...> - - * examples/symbolic.pure: Add symbolic evaluation example. This is - just a straightforward port of some Q examples. - - * runtime.cc: Add support for advisory stack checks. - - * matcher.cc: Bugfixes. - -2008-04-27 Albert Graef <Dr....@t-...> - - * lib/string.pure: Added split and join functions. - - * pure.1, examples/hello.pure: Overhaul n queens example, added - quicksort and binary search tree examples. - - * lib/prelude.pure: Added void and curry/uncurry combinators, do, - zipdo. - - * interpreter.cc, pure.cc, runtime.cc: Make SIGINT generate a - useful exception value. - - * pure.cc: Add completion for global function and variable - symbols. - -2008-04-22 Albert Graef <Dr....@t-...> - - * Got a working interpreter, at last. There's still lots of stuff - to do (see the TODO file), but the interpreter should now be - usable as it is. - -2008-03-27 Albert Graef <Dr....@t-...> - - * ChangeLog started - Copied: pure/releases/pure-0.4/ChangeLog (from rev 274, pure/trunk/ChangeLog) =================================================================== --- pure/releases/pure-0.4/ChangeLog (rev 0) +++ pure/releases/pure-0.4/ChangeLog 2008-06-21 11:13:10 UTC (rev 275) @@ -0,0 +1,420 @@ +2008-06-20 Albert Graef <Dr....@t-...> + + * 0.4 release. + + * pure.cc, lexer.ll: Fake interactive mode when we're not + connected to a terminal but -i is specified. Thus sign-on message + and command prompts will be printed as usual. This is needed, in + particular, to make Emacs Pure-Eval mode work on Windows. + +2008-06-19 Albert Graef <Dr....@t-...> + + * examples/symbolic.pure: Fix DNF example to accommodate changes + in the operator system. + + * interpreter.cc (declare): Fix segfault in reporting of + conflicting fixity declarations. + +2008-06-18 Albert Graef <Dr....@t-...> + + * runtime.cc, lib/primitives.pure: Add hash function to compute 32 + bit hash codes of Pure expressions. Suggested by Jiri Spitz. + + * parser.yy, lexer.ll, interpreter.hh/cc: Add syntax for multiple + left-hand sides in function definitions and 'case' rules, as + requested by Jiri Spitz and discussed on the mailing list. See the + manual page for details. + + * symtable.cc, lib/prelude.pure, lib/primitives.pure: Rename the + bitwise operators '&' and '|' to 'and' and 'or'. + +2008-06-16 Albert Graef <Dr....@t-...> + + * etc/pure.lang: New language definition file for Andre Simon's + highlight program (http:/www.andre-simon.de/). This allows you to + format Pure sources with syntax highlighting as HTML and LaTeX + files, for instance. + + * configure.ac, Makefile.in: Clean up the source tree. Moved + auxiliary configure files and the syntax highlighting and + programming mode stuff into separate config and etc + subdirectories. Moreover, Makefile.in now has a target to + regenerate the configury using autoconf and autoheader. + +2008-06-15 Albert Graef <Dr....@t-...> + + * matcher.hh: gcc 4.3 compatibility fixes. Suggested by Toni + Graffy. + +2008-06-14 Albert Graef <Dr....@t-...> + + * lexer.ll: Various changes in order to facilitate script + execution and interfacing to Emacs. + + Initial '#!' on a line now denotes a comment line, in order to + support shebangs (see below). + + The new 'completion_matches' command provides information about + completions to programs driving the interpreter, such as Emacs + (see below). + + Paging of the 'list' command is now implemented using the program + specified with the PURE_MORE environment variable. This allows you + to disable this option (if PURE_MORE is undefined) or choose any + pager program and options that you prefer. Define PURE_MORE=more + in your shell startup files to get back the old behaviour of + piping 'list' output through 'more'. + + * pure.cc: Added new -q (quiet) and -x (execute) options. The + former is used in pure-mode.el to suppress the sign-on message of + the interpreter. The latter can be used in conjunction with the + new #! comment syntax to add shebangs to your script, see the + manpage for details. + + * pure-mode.el.in: Added new Emacs Pure mode. This is a quick and + dirty hack of Q mode and still needs some work (in particular, + auto indentation is pretty much broken right now). + +2008-06-13 Albert Graef <Dr....@t-...> + + * configure.ac, Makefile.in, etc.: Overhauled configury and bumped + the version number. + + Building a separate runtime lib on x86-64 works now (but requires + a patched LLVM, see the INSTALL file for details). Linking the + runtime lib on OSX should also work now. Moreover, it is now + possible to install different Pure versions in parallel, again see + the INSTALL file for details. + +2008-06-06 Albert Graef <Dr....@t-...> + + * 0.3 release. + + * configure.ac, etc.: Added autoconf support. Various fixes for 64 + bit and Windows compatibility. See the INSTALL file for updated + installation instructions. + +2008-06-01 Albert Graef <Dr....@t-...> + + * Makefile, interpreter.cc: Put the runtime and interpreter into a + separate shared library, to make it possible for modules to link + against the runtime, and to reduce the memory footprint when + multiple instances of the interpreter are run as different + processes. Also, this makes it possible to access the runtime + routines on systems where a program cannot dlopen itself. + +2008-05-28 Albert Graef <Dr....@t-...> + + * interpreter.cc, runtime.cc: Optimization of pure_freenew calls. + + * lib/strings.pure: Make 'cycle' work on strings. Reported by + Eddie Rucker. + + * lib/prelude.pure: Make 'index' work on lists. Code contributed + by Eddie Rucker. + +2008-05-27 Albert Graef <Dr....@t-...> + + * lib/prelude.pure: Rewrite prelude operations to make them + tail-recursive. + + * interpreter.cc (toplevel_codegen): Experimental support for + tail-recursive logical operators (&& and ||). This works but is + disabled, since it makes these operations behave in different ways + depending on the context, which is a really bad idea because it + violates referential transparency. + +2008-05-26 Albert Graef <Dr....@t-...> + + * interpreter.cc, runtime.cc: Overhaul of the shadow stack + machinery. Environment vectors are now maintained on the shadow + stack, so that all local functions and anonymous closures are + eligible for tail call optimization, even if they need access to + their environment. + +2008-05-25 Albert Graef <Dr....@t-...> + + * interpreter.cc, runtime.cc: Add marshalling between long (64 + bit) ints and Pure bigints in the C interface. This means that + both Pure ints and bigints can now be passed for 'long' arguments + of externals (with sign extension/truncation as necessary), and + 'long' values are promoted to Pure bigints on return. Hence C + functions taking 64 bit integers as arguments and returning them + as results can now be called from Pure without loosing bits due to + truncation. + + * interpreter.cc: Make toplevel if-then-else properly + tail-recursive. Thus, e.g., the following function will now run in + constant stack space: count x = if x<=0 then x else count (x-1); + This also works with nested if-then-else constructs, as long as + they form the right-hand side of an equation. + +2008-05-24 Albert Graef <Dr....@t-...> + + * interpreter.cc, runtime.cc: Fix more memory allocation bugs in + exception handling. + + * runtime.cc, lib/system.pure: Bugfixes in the scanf + functions. Reported by Jiri Spitz. + + * pure.cc, runtime.cc, util.cc: Windows/MinGW compatibility + fixes. Suggested by Jiri Spitz. + +2008-05-23 Albert Graef <Dr....@t-...> + + * runtime.cc: Fix premature freeing of eval result, and a minor + memory allocation glitch in the catch function. Reported by Eddie + Rucker. + + * Makefile: Bump version number. + + * interpreter.cc: If there are any child environments, doeval and + dodefn both create semi-permanent environments now, so that the + child environments and the corresponding LLVM IR survive for the + entire lifetime of any embedded closures, which might still be + called at a later time. This fixes the segfaults occurring when a + closure gets called after its associated environment was purged. A + partial fix for some situations (as reported earlier by Chris + Double) was already in the 0.2 release, but this didn't deal with + all cases, such as closures constructed in a call to the eval + function, as reported by Eddie Rucker. + +2008-05-22 Albert Graef <Dr....@t-...> + + * interpreter.cc, runtime.cc: Major overhaul of expression memory + handling. Fixed the shadow stack and memory debugging code. Both + function arguments and environment are now visible on the shadow + stack, and all remaining memory leaks have been fixed. Note that, + compared to previous revisions, the shadow stack slows down + compiled code by some 10% and it needs some additional memory. + OTOH, it also provides additional data that will be needed in the + planned symbolic debugger, and it seems to be the most efficient + way to handle dangling expression pointers after an exception + anyway. + +2008-05-17 Albert Graef <Dr....@t-...> + + * runtime.cc (pure_free_internal): Fixed a glitch which was + causing big memleaks. Reported by Libor Spacek. + + * interpreter.cc (define): Fixed error messages. + + * interpreter.cc, runtime.h: Reorganize pure_expr data structure + so that the data fields are *always* aligned on 8 byte boundaries. + This should now also work on 32 bit architectures where doubles + are aligned on 8 byte boundaries, such as Linux on 32 bit PPC. + Reported by Tim Haynes. + + * interpreter.cc: Fixed some case labels in switch instructions + which should be signed rather than unsigned values. Also made + void* a pointer to a dummy struct in LLVM IR, so that it can be + distinguished from all other pointer types, and added support for + short (16 bit) and long (64 bit) integer types (as well as the + corresponding pointer types) in the C interface. + + Please note that the typename 'long' *always* denotes signed 64 + bit integers in Pure's extern declarations, even if the C 'long' + type is actually 32 bit (as it usually is even on most 64 bit + systems). + +2008-05-16 Albert Graef <Dr....@t-...> + + * runtime.h: Fix compilation problems when header gets included + from C. + +2008-05-14 Albert Graef <Dr....@t-...> + + * funcall.h: Reduce maximum number of function parameters to + 64. This seems to be large enough for most purposes, and speeds up + compilation with -Ox by a factor of around 10. + + * Makefile: Overhaul of build options. In particular, the + 'default' build now includes basic optimization (-O) which makes + the interpreter almost as fast as with the 'release' build, and + produces a working interpreter also on 64 bit systems. (The + 'debug' build is still broken there, but see the SYSTEM NOTES + section in the INSTALL file for a workaround.) + + * interpreter.cc, runtime.cc: 64 bit compatibility fixes in bigint + handling. + +2008-05-12 Albert Graef <Dr....@t-...> + + * interpreter.cc: Fix a severe bug in the environment handling + code of the code generator, which could cause failed assertions in + the code generator, or wrong code to be generated in some cases. + To resolve this issue, the code generator now properly keeps + separate environments for each rule of a function + definition. Reported by John Lunney. + + * Makefile: Redirect warning and error messages from regression + tests to the logfile. + +2008-05-10 Albert Graef <Dr....@t-...> + + * interpreter.cc (uminop): Handle the value -0x80000000 at the + border of the int range, so that it is correctly treated as a + machine int. + +2008-05-09 Albert Graef <Dr....@t-...> + + * lexer.ll, printer.cc, etc.: Change the "G" suffix to denote + bigints to "L" ("G" can too easily be mistaken for a digit; also, + Python uses the same "L" notation for bigints). Reported by Eddie + Rucker. + +2008-05-06 Albert Graef <Dr....@t-...> + + * lib/primitives.pure: Made the pow function work with all + combinations of integer and double arguments. Also added the sqrt + function and the ^ operator. + + * runtime.cc, lib/primitives.pure: Added predicates funp, lambdap, + varp checking for named and anonymous closures and unbound global + variables, respectively. Requested by Libor Spacek. + + * interpreter.cc (declare_extern, fun_prolog): Handle some obscure + cases of name collisions between Pure and C functions. + +2008-05-05 Albert Graef <Dr....@t-...> + + * INSTALL: Add system-specific notes. + + * Makefile: Massaged some rules for OSX compatibility. In + particular, -rdynamic is now in the LDFLAGS, so that it can be + removed more easily, and I also removed the install -s flag so + that the pure executable is installed without stripping the + symbols which are needed to properly resolve runtime externals on + OSX. Reported by Ryan Schmidt and others. + + * matcher.cc (merge_ctrans): Fixed broken mpz_cmp() test causing + transitions on different (instead of equal) bigint constants to be + merged. Reported by Libor Spacek. + +2008-05-04 Albert Graef <Dr....@t-...> + + * 0.2 release. + + * lexer.ll, printer.cc: Add an explicit notation for big + integers. Any integer immediately followed by the uppercase letter + "G" (as in "biG" or "GMP") will now always be interpreted as a + bigint constant, even if it fits into a machine integer. This + notation is also used when printing bigint constants. This change + was necessary to make it possible to write rules matching against + "small bigint" constants. + + * lib/primitives.pure: Added operations to recognize function + applications and extract the function and argument parts, + implemented in runtime.cc. Note that these operations can't be + defined in Pure because of the "head is function" rule which means + that in a pattern of the form f x, f is always a literal function + symbol and not a variable. + +2008-05-03 Albert Graef <Dr....@t-...> + + * README: Moved installation instructions to a separate INSTALL + file, added Eddie Rucker's detailed instructions there. + + * util.cc (myiconv): Apple's iconv takes const char** as 2nd + parameter. #ifdef that case. Reported by Ryan Schmidt. + + * interpreter.cc (declare_extern): Fixed a bug in the generated + wrapper code for external calls, which caused function arguments + to be garbage-collected prematurely, when they were still needed + to create the default value, in the case of external calls + returning a null expression pointer to indicate failure. Reported + by Eddie Rucker. + + * test/test4.pure: Disabled tail call checks, as they may fail on + some platforms. Reported by Ryan Schmidt. + + * test/test1.pure: Corrected fact3 example, added test cases. + Reported by Libor Spacek. + +2008-05-02 Albert Graef <Dr....@t-...> + + * Makefile: Overhaul of regression tests so that results of + expressions are recorded. Also, 'make check' doesn't depend on the + log files any more, so that the logs can be stored in svn. You can + now use the explicit goal 'make logs' to regenerate the logs for + changed test files. + + * runtime.cc (same): Added a syntactic equality test. Requested by + Eddie Rucker. + + * Makefile: Add $(LDFLAGS) and $(LIBS) to the link line, so that + the user can easily add his own linker options and local + libraries. + + * lib/strings.pure: Add missing range check in string indexing + operation. Reported by Eddie Rucker. + + * printer.cc (operator <<): Handle stack overflow while printing + an expression. + + * interpreter.cc (dodefn): Fix a tricky bug causing the executable + code of closures bound to variables to be freed when it was still + needed. Reported by Chris Double. + +2008-05-01 Albert Graef <Dr....@t-...> + + * interpreter.cc: Proper alignment of value fields in expression + struct on 64 bit systems. Reported by Tim Haynes. + + * Makefile: g++ shouldn't be hardcoded, use $(CXX) instead. + Reported by Ryan Schmidt. + + * runtime.cc (pure_sys_vars): More OSX compatibility fixes. + Reported by Ryan Schmidt. + +2008-04-30 Albert Graef <Dr....@t-...> + + * interpreter.cc: Fix a compilation error (STL bug: + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11729) as well as some + bogus warnings with Apple gcc 4.0.1. Reported by Ryan Schmidt. + + * Makefile (make depend): Get rid of bogus LLVM dependencies. + Reported by Ryan Schmidt. + + * lexer.ll, parser.yy: Fixes for compatibility with newer flex and + bison versions. Reported by Eddie Rucker. + +2008-04-29 Albert Graef <Dr....@t-...> + + * 0.1 release. + +2008-04-28 Albert Graef <Dr....@t-...> + + * examples/symbolic.pure: Add symbolic evaluation example. This is + just a straightforward port of some Q examples. + + * runtime.cc: Add support for advisory stack checks. + + * matcher.cc: Bugfixes. + +2008-04-27 Albert Graef <Dr....@t-...> + + * lib/string.pure: Added split and join functions. + + * pure.1, examples/hello.pure: Overhaul n queens example, added + quicksort and binary search tree examples. + + * lib/prelude.pure: Added void and curry/uncurry combinators, do, + zipdo. + + * interpreter.cc, pure.cc, runtime.cc: Make SIGINT generate a + useful exception value. + + * pure.cc: Add completion for global function and variable + symbols. + +2008-04-22 Albert Graef <Dr....@t-...> + + * Got a working interpreter, at last. There's still lots of stuff + to do (see the TODO file), but the interpreter should now be + usable as it is. + +2008-03-27 Albert Graef <Dr....@t-...> + + * ChangeLog started + Deleted: pure/releases/pure-0.4/Makefile.in =================================================================== --- pure/trunk/Makefile.in 2008-06-18 20:32:46 UTC (rev 261) +++ pure/releases/pure-0.4/Makefile.in 2008-06-21 11:13:10 UTC (rev 275) @@ -1,304 +0,0 @@ - -# This Makefile requires GNU make. Really. - -SHELL = /bin/sh - -# Package and host information. - -name = @PACKAGE_NAME@ -version = @PACKAGE_VERSION@ -dist = $(name)-$(version) - -host = @host@ - -# Source and installation paths. - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datarootdir = @datarootdir@ - -bindir = @bindir@ -includedir = @includedir@ -libdir = @libdir@ -datadir = @datadir@ -mandir = @mandir@ -man1dir = $(mandir)/man1 - -# Staging directory for 'make install'. - -DESTDIR= - -# OS-specific special filename extensions. configure tries to guess this, but -# if it guesses wrong, you can set these as needed. - -EXE=@EXEEXT@ -DLL=@DLLEXT@ - -# Programs. - -CXX = @CXX@ -INSTALL = @INSTALL@ -ECHO_N = @ECHO_N@ - -# Linker flags and required libraries. These are determined automatically by -# configure, but if necessary you can also change these on the command line. - -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ - -# Compilation flags. - -LLVM_FLAGS = `llvm-config --cppflags` -LLVM_LIBS = `llvm-config --ldflags --libs core jit native` - -CPPFLAGS = @CPPFLAGS@ -CXXFLAGS = @CXXFLAGS@ - -# Pure library name. Currently we use a simple versioning scheme, which -# requires that the library version matches that of the interpreter. This -# enables you to install different versions of the Pure interpreter on the -# same system. - -libpure_base = $(name) -libpure_vers = $(libpure_base)-$(version) - -libpure = lib$(libpure_vers)$(DLL) -libpurelnk = lib$(libpure_base)$(DLL) - -# Whether to build the Pure runtime library. If this is set to anything but -# "yes", the interpreter is linked statically and no separate library is -# produced. This is necessary on some systems where LLVM cannot be linked in -# dynamically. - -sharedlib = @sharedlib@ - -# Flag needed to create shared libraries. On most systems this is just -shared. - -shared = @shared@ - -# On some systems -fPIC is needed for code linked as a shared library. - -ifeq ($(sharedlib), yes) -PIC = @PIC@ -else -PIC = -endif - -# Auxiliary libraries to be loaded at runtime. Usually this is just libpure -# (when built), but on some systems we have to load additional dlls to resolve -# some library functions. - -ifeq ($(sharedlib), yes) -AUXLIBS = -DLIBPURE='"$(libpure)"' @AUXLIBS@ -else -AUXLIBS = @AUXLIBS@ -endif - -# No need to edit below this line. Unless you really have to. :) ############ - -SOURCE = expr.cc expr.hh funcall.h interpreter.cc interpreter.hh lexer.ll \ -matcher.cc matcher.hh parser.yy printer.cc printer.hh \ -runtime.cc runtime.h symtable.cc symtable.hh util.cc util.hh -EXTRA_SOURCE = lexer.cc parser.cc parser.hh location.hh position.hh stack.hh -OBJECT = $(subst .cc,.o,$(filter %.cc,$(SOURCE) $(EXTRA_SOURCE))) - -DISTFILES = COPYING ChangeLog INSTALL NEWS README TODO \ -Makefile.in configure.ac configure config.h.in \ -config/aclocal.m4 config/config.guess config/config.sub config/install-sh \ -$(SOURCE) $(EXTRA_SOURCE) w3centities.c \ -pure.cc pure.1 pure.1.in etc/pure-mode.el.in etc/pure.* \ -examples/*.pure lib/*.pure test/*.pure test/*.log - -.PHONY: all html dvi ps pdf clean realclean depend install uninstall strip \ -dist distcheck cleanlogs logs check config - -# compilation - -all: pure$(EXE) etc/pure-mode.el pure.1 - -ifeq ($(sharedlib), yes) -pure$(EXE): pure.o $(libpure) - $(CXX) -o $@ $(LDFLAGS) pure.o -L. -l$(libpure_vers) $(LIBS) -else -pure$(EXE): pure.o $(OBJECT) - $(CXX) -o $@ $(LDFLAGS) pure.o $(OBJECT) $(LLVM_LIBS) $(LIBS) -endif - -$(libpure): $(OBJECT) - $(CXX) $(shared) -o $@ $(LDFLAGS) $(OBJECT) $(LLVM_LIBS) $(LIBS) - ln -sf $(libpure) $(libpurelnk) - -pure.o: pure.cc - $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LLVM_FLAGS) -DPURELIB='"$(libdir)/pure-$(version)"' -c -o $@ $< - -interpreter.o: interpreter.cc - $(CXX) $(CXXFLAGS) $(PIC) $(CPPFLAGS) $(LLVM_FLAGS) $(AUXLIBS) -c -o $@ $< - -%.o: %.cc - $(CXX) $(CXXFLAGS) $(PIC) $(CPPFLAGS) $(LLVM_FLAGS) -c -o $@ $< - -lexer.cc: lexer.ll - flex -o lexer.cc $< - -parser.cc: parser.yy - bison -v -o parser.cc $< - -parser.hh location.hh position.hh stack.hh: parser.cc - -# create pure-mode.el from pure-mode.el.in - -etc/pure-mode.el: Makefile etc/pure-mode.el.in - rm -f etc/pure-mode.el etc/pure-mode.el.tmp - sed -e 's,@bindir\@,$(bindir),g' -e 's,@libdir\@,$(libdir),g' etc/pure-mode.el.in >etc/pure-mode.el.tmp - mv etc/pure-mode.el.tmp etc/pure-mode.el - -# create the manpage from pure.1.in - -pure.1: configure.ac pure.1.in - rm -f pure.1 pure.1.tmp - sed -e 's,@version\@,$(version),g' pure.1.in >pure.1.tmp - mv pure.1.tmp pure.1 - -# documentation in various formats (requires groff) - -html: pure.html -dvi: pure.dvi -ps: pure.ps -pdf: pure.pdf - -# We do the html format using rman, because it produces nicer output. If you -# don't have rman, uncomment the rule below instead. - -%.html: %.1 - rman -f HTML $< | sed -e 's/dq/\"/g' -e '/<br>/d' > $@ - -#%.html: %.1 -# groff -man -Thtml $< > $@ - -%.dvi: %.1 - groff -man -Tdvi $< > $@ - -%.ps: %.1 - groff -man -Tps $< > $@ - -%.pdf: %.1 - groff -man -Tps $< | ps2pdf - $@ - -# cleaning - -clean: - rm -f *~ *.bak *.html *.dvi *.ps *.pdf pure$(EXE) $(OBJECT) pure.o $(libpurelnk) $(libpure) parser.output - -distclean: clean - rm -f Makefile config.h config.log config.status etc/pure-mode.el $(dist).tar.gz - -realclean: distclean - rm -f $(addprefix $(srcdir)/, test/*.log $(EXTRA_SOURCE) pure.1) - -# dependencies (rerun configure after this) - -depend: $(SOURCE) $(EXTRA_SOURCE) - (cd $(srcdir) && makedepend -f Makefile.in -Y pure.cc $(SOURCE) $(EXTRA_SOURCE) 2> /dev/null) - -# regenerate configure et al - -config: configure config.h.in - -configure: configure.ac config/aclocal.m4 - autoconf -I config - -config.h.in: configure.ac config/aclocal.m4 - autoheader -I config - -# installation - -install: pure$(EXE) etc/pure-mode.el pure.1 - for x in $(addprefix $(DESTDIR), $(bindir) $(includedir)/pure-$(version) $(libdir)/pure-$(version) $(man1dir)); do $(INSTALL) -d $$x; done - $(INSTALL) pure$(EXE) $(DESTDIR)$(bindir)/pure-$(version)$(EXE) - ln -sf $(bindir)/pure-$(version)$(EXE) $(DESTDIR)$(bindir)/pure$(EXE) -ifeq ($(sharedlib), yes) - $(INSTALL) $(libpure) $(DESTDIR)$(libdir)/$(libpure) - ln -sf $(libdir)/$(libpure) $(DESTDIR)$(libdir)/$(libpurelnk) -endif - $(INSTALL) runtime.h $(DESTDIR)$(includedir)/pure-$(version) - ln -sf $(includedir)/pure-$(version) $(DESTDIR)$(includedir)/pure - for x in $(srcdir)/lib/*.pure; do $(INSTALL) -m 644 $$x $(DESTDIR)$(libdir)/pure-$(version); done - ln -sf $(libdir)/pure-$(version) $(DESTDIR)$(libdir)/pure - $(INSTALL) -m 644 pure.1 $(DESTDIR)$(man1dir)/pure-$(version).1 - ln -sf $(man1dir)/pure-$(version).1 $(DESTDIR)$(man1dir)/pure.1 - -uninstall: - rm -rf $(DESTDIR)$(bindir)/pure$(EXE) $(DESTDIR)$(bindir)/pure-$(version)$(EXE) $(DESTDIR)$(libdir)/$(libpure) $(DESTDIR)$(libdir)/$(libpurelnk) $(DESTDIR)$(includedir)/pure $(DESTDIR)$(includedir)/pure-$(version) $(DESTDIR)$(libdir)/pure $(DESTDIR)$(libdir)/pure-$(version) $(DESTDIR)$(man1dir)/pure.1 $(DESTDIR)$(man1dir)/pure-$(version).1 - -# roll a distribution tarball - -dist: pure.1 - rm -rf $(dist) - mkdir $(dist) && mkdir $(dist)/config && mkdir $(dist)/etc && mkdir $(dist)/examples && mkdir $(dist)/lib && mkdir $(dist)/test - (builddir=$$PWD; cd $(srcdir); for x in $(DISTFILES); do ln -sf $$PWD/$$x $$builddir/$(dist)/$$x; done) - rm -f $(dist).tar.gz - tar cfzh $(dist).tar.gz $(dist) - rm -rf $(dist) - -distcheck: dist - tar xfz $(dist).tar.gz - cd $(dist) && ./configure && make && make check && make install DESTDIR=./BUILD - rm -rf $(dist) - -# test logs, make check - -level=7 - -tests = $(wildcard $(srcdir)/test/*.pure) -logs = $(srcdir)/test/prelude.log $(tests:.pure=.log) - -logs: $(logs) - -cleanlogs: - rm -f $(srcdir)/test/*.log - -$(srcdir)/test/prelude.log: lib/prelude.pure lib/primitives.pure lib/strings.pure - LD_LIBRARY_PATH=. PURELIB=$(srcdir)/lib ./pure -n -v$(level) $< > $@ 2>&1 - -%.log: %.pure - LD_LIBRARY_PATH=. PURELIB=$(srcdir)/lib ./pure -v$(level) < $< > $@ 2>&1 - -check: pure - @ echo Running tests. - @ (export LD_LIBRARY_PATH=.; export PURELIB=$(srcdir)/lib; echo $(ECHO_N) "prelude.pure: "; if ./pure $(ECHO_N) -v$(level) $(srcdir)/lib/prelude.pure 2>&1 | diff -q - $(srcdir)/test/prelude.log > /dev/null; then echo passed; else echo FAILED; fi) - @ (export LD_LIBRARY_PATH=.; export PURELIB=$(srcdir)/lib; for x in $(notdir $(tests)); do echo $(ECHO_N) "$$x: "; if ./pure -v$(level) < $(srcdir)/test/$$x 2>&1 | diff -q - $(srcdir)/test/"`basename $$x .pure`.log" > /dev/null; then echo passed; else echo FAILED; fi; done) - -# DO NOT DELETE - -pure.o: interpreter.hh expr.hh matcher.hh symtable.hh printer.hh runtime.h -pure.o: parser.hh stack.hh util.hh location.hh position.hh config.h -expr.o: expr.hh interpreter.hh matcher.hh symtable.hh printer.hh runtime.h -expr.o: parser.hh stack.hh util.hh location.hh position.hh -interpreter.o: interpreter.hh expr.hh matcher.hh symtable.hh printer.hh -interpreter.o: runtime.h parser.hh stack.hh util.hh location.hh position.hh -interpreter.o: expr.hh matcher.hh symtable.hh printer.hh runtime.h parser.hh -interpreter.o: stack.hh util.hh location.hh position.hh -lexer.o: interpreter.hh expr.hh matcher.hh symtable.hh printer.hh runtime.h -lexer.o: parser.hh stack.hh util.hh location.hh position.hh -matcher.o: matcher.hh expr.hh -matcher.o: expr.hh -parser.o: expr.hh printer.hh matcher.hh runtime.h util.hh interpreter.hh -parser.o: symtable.hh parser.hh stack.hh location.hh position.hh -printer.o: printer.hh expr.hh matcher.hh runtime.h interpreter.hh symtable.hh -printer.o: parser.hh stack.hh util.hh location.hh position.hh -printer.o: expr.hh matcher.hh runtime.h -runtime.o: runtime.h expr.hh interpreter.hh matcher.hh symtable.hh printer.hh -runtime.o: parser.hh stack.hh util.hh location.hh position.hh funcall.h -symtable.o: symtable.hh expr.hh printer.hh matcher.hh runtime.h -symtable.o: expr.hh printer.hh matcher.hh runtime.h -util.o: util.hh config.h w3centities.c -lexer.o: interpreter.hh expr.hh matcher.hh symtable.hh printer.hh runtime.h -lexer.o: parser.hh stack.hh util.hh location.hh position.hh -parser.o: parser.hh stack.hh expr.hh printer.hh matcher.hh runtime.h util.hh -parser.o: location.hh position.hh interpreter.hh symtable.hh -parser.o: stack.hh expr.hh printer.hh matcher.hh runtime.h util.hh -parser.o: location.hh position.hh -location.o: position.hh Copied: pure/releases/pure-0.4/Makefile.in (from rev 267, pure/trunk/Makefile.in) =================================================================== --- pure/releases/pure-0.4/Makefile.in (rev 0) +++ pure/releases/pure-0.4/Makefile.in 2008-06-21 11:13:10 UTC (rev 275) @@ -0,0 +1,304 @@ + +# This Makefile requires GNU make. Really. + +SHELL = /bin/sh + +# Package and host information. + +name = @PACKAGE_NAME@ +version = @PACKAGE_VERSION@ +dist = $(name)-$(version) + +host = @host@ + +# Source and installation paths. + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datarootdir = @datarootdir@ + +bindir = @bindir@ +includedir = @includedir@ +libdir = @libdir@ +datadir = @datadir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 + +# Staging directory for 'make install'. + +DESTDIR= + +# OS-specific special filename extensions. configure tries to guess this, but +# if it guesses wrong, you can set these as needed. + +EXE=@EXEEXT@ +DLL=@DLLEXT@ + +# Programs. + +CXX = @CXX@ +INSTALL = @INSTALL@ +ECHO_N = @ECHO_N@ + +# Linker flags and required libraries. These are determined automatically by +# configure, but if necessary you can also change these on the command line. + +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ + +# Compilation flags. + +LLVM_FLAGS = `llvm-config --cppflags` +LLVM_LIBS = `llvm-config --ldflags --libs core jit native` + +CPPFLAGS = @CPPFLAGS@ +CXXFLAGS = @CXXFLAGS@ + +# Pure library name. Currently we use a simple versioning scheme, which +# requires that the library version matches that of the interpreter. This +# enables you to install different versions of the Pure interpreter on the +# same system. + +libpure_base = $(name) +libpure_vers = $(libpure_base)-$(version) + +libpure = lib$(libpure_vers)$(DLL) +libpurelnk = lib$(libpure_base)$(DLL) + +# Whether to build the Pure runtime library. If this is set to anything but +# "yes", the interpreter is linked statically and no separate library is +# produced. This is necessary on some systems where LLVM cannot be linked in +# dynamically. + +sharedlib = @sharedlib@ + +# Flag needed to create shared libraries. On most systems this is just -shared. + +shared = @shared@ + +# On some systems -fPIC is needed for code linked as a shared library. + +ifeq ($(sharedlib), yes) +PIC = @PIC@ +else +PIC = +endif + +# Auxiliary libraries to be loaded at runtime. Usually this is just libpure +# (when built), but on some systems we have to load additional dlls to resolve +# some library functions. + +ifeq ($(sharedlib), yes) +AUXLIBS = -DLIBPURE='"$(libpure)"' @AUXLIBS@ +else +AUXLIBS = @AUXLIBS@ +endif + +# No need to edit below this line. Unless you really have to. :) ############ + +SOURCE = expr.cc expr.hh funcall.h interpreter.cc interpreter.hh lexer.ll \ +matcher.cc matcher.hh parser.yy printer.cc printer.hh \ +runtime.cc runtime.h symtable.cc symtable.hh util.cc util.hh +EXTRA_SOURCE = lexer.cc parser.cc parser.hh location.hh position.hh stack.hh +OBJECT = $(subst .cc,.o,$(filter %.cc,$(SOURCE) $(EXTRA_SOURCE))) + +DISTFILES = COPYING ChangeLog INSTALL NEWS README TODO \ +Makefile.in configure.ac configure config.h.in \ +config/aclocal.m4 config/config.guess config/config.sub config/install-sh \ +$(SOURCE) $(EXTRA_SOURCE) w3centities.c \ +pure.cc pure.1 pure.1.in etc/pure-mode.el.in etc/pure.* \ +examples/*.pure lib/*.pure test/*.pure test/*.log + +.PHONY: all html dvi ps pdf clean realclean depend install uninstall strip \ +dist distcheck cleanlogs logs check config + +# compilation + +all: pure$(EXE) etc/pure-mode.el pure.1 + +ifeq ($(sharedlib), yes) +pure$(EXE): pure.o $(libpure) + $(CXX) -o $@ $(LDFLAGS) pure.o -L. -l$(libpure_vers) $(LIBS) +else +pure$(EXE): pure.o $(OBJECT) + $(CXX) -o $@ $(LDFLAGS) pure.o $(OBJECT) $(LLVM_LIBS) $(LIBS) +endif + +$(libpure): $(OBJECT) + $(CXX) $(shared) -o $@ $(LDFLAGS) $(OBJECT) $(LLVM_LIBS) $(LIBS) + ln -sf $(libpure) $(libpurelnk) + +pure.o: pure.cc + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LLVM_FLAGS) -DPURELIB='"$(libdir)/pure-$(version)"' -c -o $@ $< + +interpreter.o: interpreter.cc + $(CXX) $(CXXFLAGS) $(PIC) $(CPPFLAGS) $(LLVM_FLAGS) $(AUXLIBS) -c -o $@ $< + +%.o: %.cc + $(CXX) $(CXXFLAGS) $(PIC) $(CPPFLAGS) $(LLVM_FLAGS) -c -o $@ $< + +lexer.cc: lexer.ll + flex -o lexer.cc $< + +parser.cc: parser.yy + bison -v -o parser.cc $< + +parser.hh location.hh position.hh stack.hh: parser.cc + +# create pure-mode.el from pure-mode.el.in + +etc/pure-mode.el: Makefile etc/pure-mode.el.in + rm -f etc/pure-mode.el etc/pure-mode.el.tmp + sed -e 's,@bindir\@,$(bindir),g' -e 's,@libdir\@,$(libdir),g' etc/pure-mode.el.in >etc/pure-mode.el.tmp + mv etc/pure-mode.el.tmp etc/pure-mode.el + +# create the manpage from pure.1.in + +pure.1: configure.ac pure.1.in + rm -f pure.1 pure.1.tmp + sed -e 's,@version\@,$(version),g' pure.1.in >pure.1.tmp + mv pure.1.tmp pure.1 + +# documentation in various formats (requires groff) + +html: pure.html +dvi: pure.dvi +ps: pure.ps +pdf: pure.pdf + +# We do the html format using rman, because it produces nicer output. If you +# don't have rman, uncomment the rule below instead. + +%.html: %.1 + rman -f HTML $< | sed -e 's/dq/\"/g' -e '/^<br>$$/d' > $@ + +#%.html: %.1 +# groff -man -Thtml $< > $@ + +%.dvi: %.1 + groff -man -Tdvi $< > $@ + +%.ps: %.1 + groff -man -Tps $< > $@ + +%.pdf: %.1 + groff -man -Tps $< | ps2pdf - $@ + +# cleaning + +clean: + rm -f *~ *.bak *.html *.dvi *.ps *.pdf pure$(EXE) $(OBJECT) pure.o $(libpurelnk) $(libpure) parser.output + +distclean: clean + rm -f Makefile config.h config.log config.status etc/pure-mode.el $(dist).tar.gz + +realclean: distclean + rm -f $(addprefix $(srcdir)/, test/*.log $(EXTRA_SOURCE) pure.1) + +# dependencies (rerun configure after this) + +depend: $(SOURCE) $(EXTRA_SOURCE) + (cd $(srcdir) && makedepend -f Makefile.in -Y pure.cc $(SOURCE) $(EXTRA_SOURCE) 2> /dev/null) + +# regenerate configure et al + +config: configure config.h.in + +configure: configure.ac config/aclocal.m4 + autoconf -I config + +config.h.in: configure.ac config/aclocal.m4 + autoheader -I config + +# installation + +install: pure$(EXE) etc/pure-mode.el pure.1 + for x in $(addprefix $(DESTDIR), $(bindir) $(includedir)/pure-$(version) $(libdir)/pure-$(version) $(man1dir)); do $(INSTALL) -d $$x; done + $(INSTALL) pure$(EXE) $(DESTDIR)$(bindir)/pure-$(version)$(EXE) + ln -sf $(bindir)/pure-$(version)$(EXE) $(DESTDIR)$(bindir)/pure$(EXE) +ifeq ($(sharedlib), yes) + $(INSTALL) $(libpure) $(DESTDIR)$(libdir)/$(libpure) + ln -sf $(libdir)/$(libpure) $(DESTDIR)$(libdir)/$(libpurelnk) +endif + $(INSTALL) runtime.h $(DESTDIR)$(includedir)/pure-$(version) + ln -sf $(includedir)/pure-$(version) $(DESTDIR)$(includedir)/pure + for x in $(srcdir)/lib/*.pure; do $(INSTALL) -m 644 $$x $(DESTDIR)$(libdir)/pure-$(version); done + ln -sf $(libdir)/pure-$(version) $(DESTDIR)$(libdir)/pure + $(INSTALL) -m 644 pure.1 $(DESTDIR)$(man1dir)/pure-$(version).1 + ln -sf $(man1dir)/pure-$(version).1 $(DESTDIR)$(man1dir)/pure.1 + +uninstall: + rm -rf $(DESTDIR)$(bindir)/pure$(EXE) $(DESTDIR)$(bindir)/pure-$(version)$(EXE) $(DESTDIR)$(libdir)/$(libpure) $(DESTDIR)$(libdir)/$(libpurelnk) $(DESTDIR)$(includedir)/pure $(DESTDIR)$(includedir)/pure-$(version) $(DESTDIR)$(libdir)/pure $(DESTDIR)$(libdir)/pure-$(version) $(DESTDIR)$(man1dir)/pure.1 $(DESTDIR)$(man1dir)/pure-$(version).1 + +# roll a distribution tarball + +dist: pure.1 + rm -rf $(dist) + mkdir $(dist) && mkdir $(dist)/config && mkdir $(dist)/etc && mkdir $(dist)/examples && mkdir $(dist)/lib && mkdir $(dist)/test + (builddir=$$PWD; cd $(srcdir); for x in $(DISTFILES); do ln -sf $$PWD/$$x $$builddir/$(dist)/$$x; done) + rm -f $(dist).tar.gz + tar cfzh $(dist).tar.gz $(dist) + rm -rf $(dist) + +distcheck: dist + tar xfz $(dist).tar.gz + cd $(dist) && ./configure && make && make check && make install DESTDIR=./BUILD + rm -rf $(dist) + +# test logs, make check + +level=7 + +tests = $(wildcard $(srcdir)/test/*.pure) +logs = $(srcdir)/test/prelude.log $(tests:.pure=.log) + +logs: $(logs) + +cleanlogs: + rm -f $(srcdir)/test/*.log + +$(srcdir)/test/prelude.log: lib/prelude.pure lib/primitives.pure lib/strings.pure + LD_LIBRARY_PATH=. PURELIB=$(srcdir)/lib ./pure -n -v$(level) $< > $@ 2>&1 + +%.log: %.pure + LD_LIBRARY_PATH=. PURELIB=$(srcdir)/lib ./pure -v$(level) < $< > $@ 2>&1 + +check: pure + @ echo Running tests. + @ (export LD_LIBRARY_PATH=.; export PURELIB=$(srcdir)/lib; echo $(ECHO_N) "prelude.pure: "; if ./pure $(ECHO_N) -v$(level) $(srcdir)/lib/prelude.pure 2>&1 | diff -q - $(srcdir)/test/prelude.log > /dev/null; then echo passed; else echo FAILED; fi) + @ (export LD_LIBRARY_PATH=.; export PURELIB=$(srcdir)/lib; for x in $(notdir $(tests)); do echo $(ECHO_N) "$$x: "; if ./pure -v$(level) < $(srcdir)/test/$$x 2>&1 | diff -q - $(srcdir)/test/"`basename $$x .pure`.log" > /dev/null; then echo passed; else echo FAILED; fi; done) + +# DO NOT DELETE + +pure.o: interpreter.hh expr.hh matcher.hh symtable.hh printer.hh runtime.h +pure.o: parser.hh stack.hh util.hh location.hh position.hh config.h +expr.o: expr.hh interpreter.hh matcher.hh symtable.hh printer.hh runtime.h +expr.o: parser.hh stack.hh util.hh location.hh position.hh +interpreter.o: interpreter.hh expr.hh matcher.hh symtable.hh printer.hh +interpreter.o: runtime.h parser.hh stack.hh util.hh location.hh position.hh +interpreter.o: expr.hh matcher.hh symtable.hh printer.hh runtime.h parser.hh +interpreter.o: stack.hh util.hh location.hh position.hh +lexer.o: interpreter.hh expr.hh matcher.hh symtable.hh printer.hh runtime.h +lexer.o: parser.hh stack.hh util.hh location.hh position.hh +matcher.o: matcher.hh expr.hh +matcher.o: expr.hh +parser.o: expr.hh printer.hh matcher.hh runtime.h util.hh interpreter.hh +parser.o: symtable.hh parser.hh stack.hh location.hh position.hh +printer.o: printer.hh expr.hh matcher.hh runtime.h interpreter.hh symtable.hh +printer.o: parser.hh stack.hh util.hh location.hh position.hh +printer.o: expr.hh matcher.hh runtime.h +runtime.o: runtime.h expr.hh interpreter.hh matcher.hh symtable.hh printer.hh +runtime.o: parser.hh stack.hh util.hh location.hh position.hh funcall.h +symtable.o: symtable.hh expr.hh printer.hh matcher.hh runtime.h +symtable.o: expr.hh printer.hh matcher.hh runtime.h +util.o: util.hh config.h w3centities.c +lexer.o: interpreter.hh expr.hh matcher.hh symtable.hh printer.hh runtime.h +lexer.o: parser.hh stack.hh util.hh location.hh position.hh +parser.o: parser.hh stack.hh expr.hh printer.hh matcher.hh runtime.h util.hh +parser.o: location.hh position.hh interpreter.hh symtable.hh +parser.o: stack.hh expr.hh printer.hh matcher.hh runtime.h util.hh +parser.o: location.hh position.hh +location.o: position.hh Deleted: pure/releases/pure-0.4/NEWS =================================================================== --- pure/trunk/NEWS 2008-06-18 20:32:46 UTC (rev 261) +++ pure/releases/pure-0.4/NEWS 2008-06-21 11:13:10 UTC (rev 275) @@ -1,53 +0,0 @@ - -** Pure 0.3 2008-06-06 - -This release sports a lot of improvements as well as bug and portability -fixes, see the ChangeLog for details. Many memory leaks have been plugged, and -tail call elimination has been improved a lot. The build system has gone -through a major overhaul, adding autoconf support. 64 bit support has been -improved as well, and Pure now builds and runs fine on MS Windows. Many -library functions have been rewritten to make them tail-recursive, and some -new functions have been added. Last but not least, the runtime support is now -implemented as a separate shared library which makes it possible to link -external modules against the runtime, and reduces the memory footprint when -multiple instances of the interpreter are run as different processes. - -Special thanks to Tim Haynes, John Lunney, Eddie Rucker, Ryan Schmidt, Libor -Spacek and Jiri Spitz for contributions, suggestions and bug reports. - -** Pure 0.2 2008-05-04 - -On the heels of Pure 0.1 comes the first bugfix release which addresses a -couple of bugs, misfeatures and Mac OSX compatibility issues, please refer to -the ChangeLog for details. I also added a more detailed INSTALL guide (thanks -are due to Eddie Rucker who wrote most of the new material in this guide) and -updated the manpage with a few minor corrections and some remarks about issues -raised on the Pure mailing list. - -Please note that there are still some issues with Pure on 64 bit systems (as -well as on Ubuntu running on PowerPC) which are still on my TODO list, these -will hopefully be fixed in the next release. - -Thanks to all who sent in bug reports and patches, in particular: Chris -Double, Tim Haynes, Eddie Rucker, Ryan Schmidt and Libor Spacek. (I hope I -didn't forget anyone.) - -** Pure 0.1 2008-04-29 - -The much-awaited initial release. ;-) The interpreter is already fully -functional, but of course there's still a lot to be done (see the TODO file -for details). Please note that this is a preliminary, "beta" release, so -expect some bugs (and please report them to the author!). - -The Pure project is now hosted at SourceForge, see http://pure-lang.sf.net. A -mailing list should soon be available, too. - -See the INSTALLATION section in the README file to get up and running quickly. -After Pure is installed, read the Pure manual page (also available in various -formats from the Pure website) and have a look at the stuff in the examples -subdir, especially hello.pure, and review the standard library modules -(lib/*.pure). - -Enjoy! - -Albert Graef <Dr....@t-...> Copied: pure/releases/pure-0.4/NEWS (from rev 265, pure/trunk/NEWS) =================================================================== --- pure/releases/pure-0.4/NEWS (rev 0) +++ pure/releases/pure-0.4/NEWS 2008-06-21 11:13:10 UTC (rev 275) @@ -0,0 +1,74 @@ + +** Pure 0.4 2008-06-19 + +This release features some more bug and portability fixes, a cleanup of the +source tree and an overhaul of the build system, see the ChangeLog for +details. Building a separate runtime lib on x86-64 works now (but requires a +patched LLVM, see the INSTALL file for details). Moreover, it is now possible +to install different Pure versions in parallel. + +An Emacs mode for Pure and support for executing Pure scripts using "shebangs" +has been added. Paging of the 'list' command is now implemented using the +program specified with the PURE_MORE environment variable. This allows you to +disable this option (if PURE_MORE is undefined) or choose any pager program +and options that you prefer. Define PURE_MORE=more in your shell startup files +to get back the old behaviour of piping 'list' output through 'more'. + +There's also a new syntax for multiple left-hand sides in function definitions +and 'case' rules, as suggested by Jiri Spitz and discussed on the mailing +list. Please refer to the manual page for details. To accommodate this change, +the bitwise operators '&' and '|' were renamed to 'and' and 'or', +respectively. + +** Pure 0.3 2008-06-06 + +This release sports a lot of improvements as well as bug and portability +fixes, see the ChangeLog for details. Many memory leaks have been plugged, and +tail call elimination has been improved a lot. The build system has gone +through a major overhaul, adding autoconf support. 64 bit support has been +improved as well, and Pure now builds and runs fine on MS Windows. Many +library functions have been rewritten to make them tail-recursive, and some +new functions have been added. Last but not least, the runtime support is now +implemented as a separate shared library which makes it possible to link +external modules against the runtime, and reduces the memory footprint when +multiple instances ... [truncated message content] |