1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

158 commits

Author SHA1 Message Date
Andrew Whatson
02f69c1d84 Add tests for warning locations.
These would have caught <https://bugs.gnu.org/56493>.

* test-suite/tests/tree-il.test ("warnings")("location")["unused
variable", "unbound variable (spaces)", "unbound variable (tabs)"]: New
tests.
2022-11-29 11:41:05 +01:00
Ludovic Courtès
5969490f55 analyze: 'unbound-variable' warning handles re-exported bindings.
Fixes <https://bugs.gnu.org/47031>.

* module/language/tree-il/analyze.scm (make-use-before-definition-analysis)
[resolve]: Add case for when NAME is re-exported by MOD.
* test-suite/tests/tree-il.test ("warnings")["re-exported binding"]: New test.
2021-05-02 01:20:19 +02:00
Andy Wingo
44a6a21dcc Fix tree-il effects analysis for prompts
* module/language/tree-il/effects.scm (make-effects-analyzer): The body
of a prompt is an expression only for escape-only prompts, and the
handler is always a lambda.  Fix bug where a prompt could be incorrectly
marked effect-free.
* test-suite/tests/tree-il.test ("optimize"): Add test for bug 48098.

Fixes bug 48098.
2021-05-01 22:16:20 +02:00
Andy Wingo
9d5978a756 New warnings: -Wuse-before-definition, -Wnon-idempotent-definition
* module/ice-9/boot-9.scm (%auto-compilation-options): Add
  use-before-definition and non-idempotent-definition.
* module/language/tree-il/analyze.scm (<use-before-def-info>): New
  analysis info.
  (make-use-before-definition-analysis): New function.
  (goops-toplevel-definition): Move down.
  (unbound-variable-analysis, macro-use-before-definition): Remove, as
  they are subsumed by use-before-def.  There are some deprecated
  bindings though.
  (make-analyzer): Rework to allow for use-before-def analysis to handle
  multiple
* module/system/base/message.scm (%warning-types): Add handlers for the
  new warning types.
* test-suite/tests/tree-il.test: Add tests.
* doc/ref/api-evaluation.texi (Compilation): Update.
2021-01-07 10:26:33 +01:00
Andy Wingo
7df3f3414b More robust reduction of equal? and eqv?
* module/language/tree-il/primitives.scm (expand-eq): Just expand out to
  binary comparisons.  Also expand eq?, which was missing.  Leave
  strength reduction to peval.
  (character-comparison-expander): Move down, as it depends on <, <=,
  and so on.
* module/language/tree-il/peval.scm (peval): Robustly reduce equal? and
  eqv?.
* test-suite/tests/peval.test ("partial evaluation"): Expect fixnum
  comparison to reduce to eq?.
  ("eqv?", "equal?"): A new battery of tests.
* test-suite/tests/tree-il.test ("primitives"): Remove reduction tests.
2020-05-13 15:51:58 +02:00
Andy Wingo
e9c0f3071d Warning and optimization levels always small integers
* module/language/tree-il/analyze.scm (make-analyzer): Expect an int for
  optimization level.
* module/scripts/compile.scm (%options, show-warning-help): No more
  -Wnone / Wall; use -W0 or -W9 instead.
* module/system/base/compile.scm (level-validator): Validate small int.
  (compute-analyzer, add-default-optimizations): Likewise.
* test-suite/tests/optargs.test (without-compiler-warnings):
* test-suite/tests/tree-il.test (call-with-warnings): Parameterize level
  to 0, not #f.
* bootstrap/Makefile.am (GUILE_WARNINGS): Use -W0, not -Wnone.
2020-05-08 16:35:04 +02:00
Andy Wingo
116f94d661 Add language-specific analysis pass to compiler infrastructure
* module/system/base/compile.scm (compute-analyzer): Compute analyzer to
  run on expressions before the compiler runs.
  (add-default-optimizations): Flesh out; still a stub.a
  (read-and-compile, compile, compile-and-load, compile-file): Default
  warning and optimization levels.
  (default-warning-level): New parameter, defaulting to 1.
  (default-optimization-level): New parameter, defaulting to 2.
  Currently unused.
* module/system/base/language.scm (<language>): Add
  optimizations-for-level and analyzer fields.
* module/language/tree-il/compile-bytecode.scm (compile-bytecode):
* module/language/tree-il/compile-cps.scm (optimize-tree-il): No need to
  run warnings passes here; compilers infrastructure will run them.
* module/language/tree-il/spec.scm (tree-il): Define make-analyzer as
  analyzer.
* module/language/tree-il/analyze.scm (make-analyzer): New exported
  procedure.
  (%warning-passes): New private variable.
* .dir-locals.el: Add with-test-prefix/c&e indent mode.
* test-suite/tests/cross-compilation.test:
* test-suite/tests/optargs.test:
* test-suite/tests/tree-il.test: Adjust to disable default warnings.
2020-05-08 15:39:41 +02:00
Ludovic Courtès
d49453259b Fix expansion of 'error' primitive with a non-constant argument.
Fixes <https://bugs.gnu.org/39509>.
Reported by Klaus Stehle <klaus.stehle@uni-tuebingen.de>.

* module/language/tree-il/primitives.scm (error): Remove extra "?"
argument when the first argument is not a constant.
* test-suite/tests/tree-il.test ("primitives")["error"]: New test
prefix.
2020-03-06 18:06:51 +01:00
Andy Wingo
4e89d0c061 Use "G_" as the conventional alias for gettext
Since the change in 2.2 noted in the NEWS as "Fix literal matching for
module-bound literals", defining `_' makes `syntax-rules' and `match'
fail to recognize `_' as the catch-all literal.  This change adapts the
recommendations to current practice in 2.2, as users have had to adapt
to this change.

* doc/ref/api-i18n.texi (Gettext Support): Update documentation.
* module/language/tree-il/analyze.scm (proc-ref?, gettext?): G_ is the
  conventional abbreviation, not _.
* test-suite/tests/tree-il.test: Adapt.
* module/ice-9/command-line.scm: Use G_ instead of _.
2019-09-12 21:50:35 +02:00
Andy Wingo
79a40cf717 Add "mod" field to tree-il toplevel ref, set, define
Add "mod" field to <toplevel-ref>, <toplevel-set>, and
<toplevel-define>, indicating the expander's idea of what the current
module is when a toplevel variable is accessed or created.  This will
help in later optimizations.

* libguile/expand.c (TOPLEVEL_REF, TOPLEVEL_SET, TOPLEVEL_DEFINE)
  (expand, expand_define, expand_set_x, convert_assignment):
* libguile/expand.h (SCM_EXPANDED_TOPLEVEL_REF_FIELD_NAMES):
(SCM_MAKE_EXPANDED_TOPLEVEL_REF, SCM_EXPANDED_TOPLEVEL_SET_FIELD_NAMES):
(SCM_MAKE_EXPANDED_TOPLEVEL_SET, SCM_EXPANDED_TOPLEVEL_DEFINE_FIELD_NAMES):
(SCM_MAKE_EXPANDED_TOPLEVEL_DEFINE):
* module/ice-9/compile-psyntax.scm (translate-literal-syntax-objects):
* module/ice-9/psyntax-pp.scm:
* module/ice-9/psyntax.scm:
* module/language/tree-il.scm:
* module/language/tree-il.scm (parse-tree-il, make-tree-il-folder):
(pre-post-order):
* module/language/tree-il/analyze.scm (goops-toplevel-definition):
(macro-use-before-definition-analysis, proc-ref?, format-analysis):
* module/language/tree-il/compile-cps.scm (convert):
* module/language/tree-il/debug.scm (verify-tree-il):
* module/language/tree-il/effects.scm (make-effects-analyzer):
* module/language/tree-il/fix-letrec.scm (free-variables):
* module/language/tree-il/peval.scm (peval):
* test-suite/tests/tree-il.test: Adapt uses.
2019-08-18 22:27:12 +02:00
Ludovic Courtès
c6f70e4b04 Add -Wshadowed-toplevel.
* module/language/tree-il/analyze.scm (shadowed-toplevel-analysis): New
variable.
* module/language/tree-il/compile-cps.scm (%warning-passes): Add it.
* module/system/base/message.scm (%warning-types): Add it.
* test-suite/tests/tree-il.test ("warnings")["shadowed-toplevel"]: New
test prefix.
* module/ice-9/boot-9.scm (%auto-compilation-options): Add it.
* doc/ref/api-evaluation.texi (Compilation): Add 'shadowed-toplevel' and
'macro-use-before-definition'.
2018-08-07 12:34:32 +02:00
Mark H Weaver
856d318a9f Merge branch 'stable-2.0'
Conflicts:
	benchmark-suite/benchmarks/ports.bm
	libguile/async.h
	libguile/bytevectors.c
	libguile/foreign.c
	libguile/gsubr.c
	libguile/srfi-1.c
	libguile/vm-engine.h
	libguile/vm-i-scheme.c
	module/Makefile.am
	module/language/tree-il/analyze.scm
	module/language/tree-il/peval.scm
	module/scripts/compile.scm
	module/scripts/disassemble.scm
	test-suite/tests/asm-to-bytecode.test
	test-suite/tests/peval.test
	test-suite/tests/rdelim.test
2014-09-30 03:50:47 -04:00
Ludovic Courtès
8ac39b38d1 Handle ~p in 'format' warnings.
Fixes <http://bugs.gnu.org/18299>.
Reported by Frank Terbeck <ft@bewatermyfriend.org>.

* module/language/tree-il/analyze.scm (format-string-argument-count):
  Add case for ~p.
* test-suite/tests/tree-il.test ("warnings")["format"]("~p", "~p, too
  few arguments", "~:p", "~:@p, too many arguments", "~:@p, too few
  arguments"): New tests.
2014-08-26 23:41:33 +02:00
Andy Wingo
12b8487d5d Merge commit '0ce224594a' 2014-02-08 14:48:56 +01:00
Mark H Weaver
0ce224594a Improve handling of locales in the test suite.
* test-suite/guile-test (run-tests): Load each test file within
  (with-locale "C" ...).

* test-suite/tests/encoding-iso88591.test:
* test-suite/tests/encoding-iso88597.test:
* test-suite/tests/encoding-utf8.test:
* test-suite/tests/srfi-14.test: Remove broken code to save and restore
  the previous locale.

* test-suite/tests/bytevectors.test:
* test-suite/tests/format.test:
* test-suite/tests/regexp.test:
* test-suite/tests/srfi-19.test:
* test-suite/tests/tree-il.test: Make sure 'setlocale' is defined before
  calling it.
2014-02-07 21:49:35 -05:00
Andy Wingo
4b98c7411e Tree-IL warnings tests compile to CPS instead of "assembly"
* test-suite/tests/tree-il.test ("warnings"): Change warnings test to
  compile to CPS instead of assembly.
2013-11-08 14:45:01 +01:00
Andy Wingo
539eeee6ae Remove tree-il->glil test cases
* test-suite/tests/tree-il.test: Remove GLIL test cases.  They have
  never been helpful to me in the 2.0 series, so there is no loss.
2013-11-08 14:41:22 +01:00
Andy Wingo
3abe29e677 squish to primitive reification
* test-suite/tests/tree-il.test: Update for primitive-ref reification
  fix.
2013-11-05 18:06:08 +01:00
Andy Wingo
bc056057c8 remove @call-with-current-continuation memoizer
* module/ice-9/boot-9.scm (call-with-current-continuation): Change to
  primcall call-with-current-continuation.

* libguile/memoize.h:
* libguile/expand.c (scm_sym_atcall_cc): Remove.

* libguile/memoize.c (memoize): Memoize call/cc primcalls to
  SCM_M_CONT.
  (m_call_cc): Remove.
  (unmemoize): Unmemoize to call-with-current-continuation.

* module/language/tree-il/compile-glil.scm (flatten-lambda-case): Update
  to call-with-current-continuation without @ prefix, and fix fallback
  case.

* module/language/tree-il/primitives.scm (*multiply-valued-primitives*):
  (*interesting-primitive-names*): Remove
  @call-with-current-continuation.
  (call/cc): Expand to call-with-current-continuation.

* test-suite/tests/tree-il.test ("call/cc"): Update to use and expect
  call-with-current-continuation primcalls / toplevel refs.
2013-06-27 22:02:43 +02:00
Andy Wingo
39caffe79b remove @apply memoizer
* libguile/memoize.c (memoize): Recognize a primcall to 'apply as
  SCM_M_APPLY.
  (@apply): Remove @apply memoizer.
  (unmemoize): Unmemoize using "apply", not "@apply".

* libguile/memoize.h:
* libguile/expand.c (scm_sym_atapply): Remove.

* module/ice-9/boot-9.scm (apply): Re-implement using apply primcall.
  Use case-lambda, so as to give an appropriate minimum arity.

* module/language/tree-il/compile-glil.scm (flatten-lambda-case):
  Compile a primcall of "apply" specially, not "@apply".

* module/language/tree-il/peval.scm (peval): Match primcalls to "apply",
  not "@apply".  Residualize "apply" primcalls.

* module/language/tree-il/primitives.scm (*interesting-primitive-names*):
  (*multiply-valued-primitives*): Remove @apply, and apply primitive
  expander.

* test-suite/tests/peval.test:
* test-suite/tests/tree-il.test: Update tests to expect residualized
  "apply".

* test-suite/tests/procprop.test ("procedure-arity"): Update test for
  better apply arity.

* test-suite/tests/strings.test ("string"): Update expected error.
2013-06-27 22:02:35 +02:00
Andy Wingo
007f671afc Implement tree-il-fold in terms of make-tree-il-folder.
* module/language/tree-il.scm (tree-il-fold): Implement using
  make-tree-il-folder.  This is an incompatible change: there is no more
  "leaf" procedure, and tree-il-fold only works on tree-il and not
  lists.

* module/language/tree-il/analyze.scm (<tree-analysis>, analyze-tree):
  Adapt to tree-il-fold change, losing the "leaf" handler.
  (unused-variable-analysis, unused-toplevel-analysis)
  (unbound-variable-analysis, arity-analysis): Adapt to tree-analysis
  change.

* module/language/tree-il/canonicalize.scm (tree-il-any)
* module/language/tree-il/cse.scm (build-assigned-var-table)
* module/language/tree-il/peval.scm (tree-il-any, build-var-table)
  (peval): Adapt to tree-il-fold change.

* test-suite/tests/tree-il.test ("tree-il-fold"): Adapt tests for new
  interface and expectations.
2013-06-10 22:46:08 +02:00
Andy Wingo
25450a0d0e Pre-order tree-il rewrites are now non-destructive
* module/language/tree-il.scm (pre-order): Re-implement in terms of
  pre-post-order, and rename from pre-order!.

* module/language/tree-il/primitives.scm (expand-primitives): Adapt to
  pre-order change, and rename from expand-primitives!.

* module/language/tree-il/optimize.scm (optimize): Adapt to
  expand-primitives! change, and rename from optimize!.

* module/language/tree-il/compile-glil.scm:
* module/system/repl/common.scm:
* test-suite/tests/cse.test:
* test-suite/tests/peval.test:
* test-suite/tests/tree-il.test: Adapt to expand-primitives and optimize
  changes.
2013-06-10 22:46:08 +02:00
Andy Wingo
403d78f915 Tree-il post-order rewriter no longer destructive
* module/language/tree-il.scm (pre-post-order): New helper, like
  pre-order! and post-order! but not destructive.
  (post-order): Implement in terms of pre-post-order, and rename from
  post-order!.

* module/ice-9/compile-psyntax.scm (squeeze-tree-il):
* module/language/tree-il/canonicalize.scm (canonicalize):
* module/language/tree-il/fix-letrec.scm (fix-letrec):
* module/language/tree-il/primitives.scm (resolve-primitives): Use
  post-order, and rename from the destructive
  variants (squeeze-tree-il!, canonicalize!, etc).  Adapt callers.

* test-suite/tests/tree-il.test (strip-source): Adapt to post-order.

* test-suite/tests/cse.test:
* test-suite/tests/peval.test:
* module/language/tree-il/optimize.scm: Adapt callers.
2013-06-10 22:46:08 +02:00
Mark H Weaver
26d148066f Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	configure.ac
	libguile/deprecated.c
	libguile/deprecated.h
	libguile/filesys.h
	libguile/fluids.c
	libguile/fports.c
	libguile/gc.c
	libguile/guile.c
	libguile/numbers.c
	libguile/objcodes.c
	libguile/r6rs-ports.c
	libguile/smob.c
	libguile/socket.c
	libguile/threads.h
	module/language/scheme/decompile-tree-il.scm
	module/language/tree-il/peval.scm
	test-suite/tests/syncase.test
2013-03-28 05:09:53 -04:00
Andy Wingo
d0ecf8eb9e support calls and tail-calls with more than 255 formals
* module/language/tree-il/compile-glil.scm (flatten-lambda-case):
  Support calls and tail-calls with more than 255 formals.

* test-suite/tests/tree-il.test ("many args"): Add a test.
2013-03-07 13:59:18 +01:00
Andy Wingo
180ac9d7b0 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	module/ice-9/psyntax-pp.scm
	module/ice-9/psyntax.scm
	module/language/bytecode/spec.scm
	module/language/tree-il/spec.scm
2013-01-31 11:52:42 +01:00
Ian Price
90baf8cdfe Fix argument count for various format string escape sequences.
* module/language/tree-il/analyze.scm (format-string-argument-count):
  Handle ~t and ~k options case-insensitively.
  ~! ~| ~/ ~q and ~Q should not update the min-count or max-count.
  ~^ returns the min-count and 'any
  + - # and ' should not increase the argument count.
* test-suite/tests/tree-il.test (*): Tests for new parameters.
2013-01-28 14:16:24 +00:00
Mark H Weaver
e0c211bb2e Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
	libguile/posix.c
	module/ice-9/eval.scm
	test-suite/tests/cse.test
2013-01-07 17:23:26 -05:00
Ludovic Courtès
5cd1030786 Add tests for -Wduplicate-case-datum' and -Wbad-case-datum'.
* test-suite/tests/tree-il.test (%opts-w-duplicate-case-datum,
  %opts-w-bad-case-datum): New variables.
  ("warnings")["duplicate-case-datum", "bad-case-datum"]: New tests.
2012-11-23 23:57:45 +01:00
Mark H Weaver
fa980bcc0f Merge remote-tracking branch 'origin/stable-2.0'
Moved scm_i_struct_hash from struct.c to hash.c and made it static.

The port's alist is now a field of 'scm_t_port'.

Conflicts:
	libguile/arrays.c
	libguile/hash.c
	libguile/ports.c
	libguile/print.h
	libguile/read.c
2012-10-30 23:46:31 -04:00
Mark H Weaver
75a5de18a0 Simplify calls to 'eqv?' when one argument is an immediate constant.
* module/language/tree-il/primitives.scm (maybe-simplify-to-eq): New
  helper procedure shared by expanders for 'eqv?' and 'equal?'.
  (*primitive-expand-table*): Add expansion rule for 'eqv?'.

* test-suite/tests/tree-il.test ("primitives"): Add tests.
2012-10-08 11:56:10 -04:00
Mark H Weaver
bcf87e35e1 Don't simplify 'equal?' to 'not' or 'null?'.
* module/language/tree-il/primitives.scm (*primitive-expand-table*):
  Don't simplify 'equal?' to 'not' or 'null?', but only to 'eq?'.

* test-suite/tests/tree-il.test ("primitives"): Adjust tests.
2012-10-08 00:37:09 -04:00
Mark H Weaver
ebd363161e Don't simplify 'equal?' to 'eq?' when constant is an *inexact* small integer.
* module/language/tree-il/primitives.scm (*primitive-expand-table*):
  Refine test for fixnums to verify that the small integer is exact.

* test-suite/tests/tree-il.test ("primitives"): Add test.
2012-10-07 23:57:13 -04:00
Ludovic Courtès
2446f8e126 Simplify calls to `equal?' when one argument is a constant.
* module/language/tree-il/primitives.scm (*primitive-expand-table*): Add
  expansion rules for `equal?', when called with one constant and
  another argument.

* test-suite/tests/tree-il.test (pass-if-primitives-resolved): New
  macro.
  ("primitives"): New test prefix.
2012-10-06 22:34:00 +02:00
Andy Wingo
74bbb99457 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	module/language/tree-il/analyze.scm
	module/language/tree-il/effects.scm
	module/language/tree-il/fix-letrec.scm
	module/language/tree-il/peval.scm
	test-suite/tests/cse.test
	test-suite/tests/peval.test
2012-05-21 19:20:27 +02:00
Ludovic Courtès
8a74ffe88a Have -Wformat' remain quiet for any procedure called _' or `N_'.
* module/language/tree-il/analyze.scm (proc-ref?)[special?]: New
  procedure.
  Return #t for any toplevel-ref of `_'.

* test-suite/tests/tree-il.test ("warnings")["format"]("non-literal
  format string using gettext as top-level _"): New test.
2012-05-12 16:11:51 +02:00
Ludovic Courtès
2c5f0bdb0e Have `-Warity-mismatch' handle applicable structs.
* module/language/tree-il/analyze.scm (arity-analysis): Honor applicable
  structs.

* test-suite/tests/tree-il.test ("warnings")["arity
  mismatch"]("top-level applicable struct", "top-level applicable struct
  with wrong arguments"): New tests.
2012-05-12 15:58:23 +02:00
Ludovic Courtès
4c98474782 Improve special-casing of _' in -Wformat'.
* module/language/tree-il/analyze.scm (proc-ref?): Check for
  SPECIAL-NAME in the <module-ref> and <lexical-ref> cases too.

* test-suite/tests/tree-il.test ("warnings")["format"]("non-literal
  format string using gettext as module-ref _", "non-literal format
  string using gettext as lexical _"): New tests.
2012-05-12 15:31:28 +02:00
Andy Wingo
9d8a10a94c Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	test-suite/tests/cse.test
2012-04-26 23:40:57 +02:00
Andy Wingo
c46e0a8a59 Merge commit 'de1eb420a5'
Conflicts:
	module/language/tree-il/primitives.scm
	test-suite/tests/tree-il.test
2012-04-26 22:56:45 +02:00
Andy Wingo
e7501d4a68 Merge commit 'd10f7b572c'
Conflicts:
	libguile/smob.c
	libguile/smob.h
	test-suite/tests/tree-il.test
2012-04-26 22:17:47 +02:00
Andy Wingo
9068f4f527 enable cse
* module/language/tree-il/optimize.scm: Enable CSE unless #:cse? #f is
  passed.

* test-suite/tests/tree-il.test: Disable CSE for one test.
2012-04-23 21:52:24 +02:00
Andy Wingo
de1eb420a5 peval tests into separate file
* test-suite/tests/tree-il.test ("partial evaluation"):
* test-suite/tests/peval.test ("partial evaluation"): Separate peval
* tests.

* test-suite/Makefile.am: Adapt.
2012-04-23 21:52:22 +02:00
Ludovic Courtès
d8fe367a31 Remove duplicate test in `tree-il.test'.
* test-suite/tests/tree-il.test ("partial evaluation"): Remove duplicate
  test for `(cons 0 (cons 1 (cons 2 (list 3 4 5))))'.
2012-04-22 14:51:32 +02:00
Andy Wingo
c8ab29ac8e Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/procprop.c
	libguile/smob.c
	libguile/smob.h
	libguile/vm.c
	module/language/tree-il/primitives.scm
2012-03-26 00:56:29 +02:00
BT Templeton
a8004dcb4d primitive resolution for public refs
* module/language/tree-il/primitives.scm (resolve-primitives!): Resolve
  public module-refs to primitives.

* test-suite/tests/tree-il.test: New tests for primitive resolution.
2012-03-23 19:05:58 -04:00
Andy Wingo
dee4e3ee3c Merge remote-tracking branch 'origin/stable-2.0' 2012-03-02 17:46:52 +01:00
Andy Wingo
dab48cc567 tweaks to -Wformat's gettext detection
* module/language/tree-il/analyze.scm (proc-ref?): Change to use less
  false-if-exception and more variable-bound?.  If a variable is present
  in the local module but not bound, assume that it is gettext if it has
  the right name.  This is to allow for (define _ gettext).

* test-suite/tests/tree-il.test ("warnings"): Update (_ "foo") example.
2012-03-02 17:46:28 +01:00
Andy Wingo
d489998364 Merge remote-tracking branch 'origin/stable-2.0'
There are a some failures currently:

    FAIL: tree-il.test: warnings: format: non-literal format string with forward declaration
    ERROR: srfi-18.test: current-exception-handler: current handler returned at top level - arguments: ((wrong-type-arg "car" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "pair" #<unspecified>) (#<unspecified>)))
    ERROR: srfi-18.test: current-exception-handler: multiple levels of handler nesting - arguments: ((wrong-type-arg "car" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "pair" #<unspecified>) (#<unspecified>)))
    ERROR: srfi-18.test: current-exception-handler: exception handler installation is thread-safe - arguments: ((wrong-type-arg "car" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "pair" #<unspecified>) (#<unspecified>)))

Conflicts:
	module/language/tree-il/peval.scm
	module/language/tree-il/primitives.scm
	test-suite/tests/tree-il.test
2012-03-02 17:20:47 +01:00
Andy Wingo
eebcacf41c peval: inline applications of lambda to rest args
* module/language/tree-il/peval.scm (peval): Add optimization to
  hoist the inner procedure out of e.g.
    (lambda args (apply (lambda ...) args))
  This commit restores the ability to detect escape-only prompts at
  compile-time.

* test-suite/tests/tree-il.test: Update test for prompt with a lambda,
  and add a specific test for lambda application.
2012-03-02 16:47:39 +01:00