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.
This commit is contained in:
parent
c8c19f2ef3
commit
116f94d661
11 changed files with 280 additions and 282 deletions
|
|
@ -10,6 +10,7 @@
|
|||
(eval . (put 'pass-if-exception 'scheme-indent-function 2))
|
||||
(eval . (put 'pass-if-equal 'scheme-indent-function 2))
|
||||
(eval . (put 'with-test-prefix 'scheme-indent-function 1))
|
||||
(eval . (put 'with-test-prefix/c&e 'scheme-indent-function 1))
|
||||
(eval . (put 'with-code-coverage 'scheme-indent-function 1))
|
||||
(eval . (put 'with-statprof 'scheme-indent-function 1))
|
||||
(eval . (put 'let-gensyms 'scheme-indent-function 1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue