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

14 commits

Author SHA1 Message Date
Christine Lemmer-Webber
6f112d501d
Compile cps to bytecode by default
* module/language/cps/spec.scm (choose-compiler): Compile cps to
  bytecode by default if js-il or javascript are not explicitly chosen.
2021-10-10 21:44:55 -04:00
Christopher Lemmer Webber
280312a9c3
Fix cps's choose-compiler to be able to compile javascript
* module/language/cps/spec.scm (choose-compiler): Fix to be able to
  recognize js-il and javascript as targets to compile to
2021-05-11 10:37:10 -04:00
Christopher Lemmer Webber
a23bf2a4d9
Add compiler-chooser for CPS spec
However, it probably isn't correct.  Right now it just always chooses
"bytecode"... how to get it to correctly/intelligently choose the right
path?

* module/language/cps/spec.scm (choose-compiler): New variable.
(cps): Add it as #:compiler-chooser target.
2021-05-11 10:16:34 -04:00
Christopher Lemmer Webber
88f7aa0b3a
Merge branch 'compile-to-js-2017' into compile-to-js-rebase 2021-05-10 15:58:15 -04:00
Andy Wingo
4311dc9858 Define new "lowering" phase in compiler
* module/language/cps/compile-bytecode.scm (compile-bytecode):
* module/language/tree-il/compile-bytecode.scm (compile-bytecode):
* module/language/tree-il/compile-cps.scm (compile-cps): Rely on
  compiler to lower incoming term already.
* module/language/tree-il/optimize.scm (make-lowerer): New procedure.
* module/system/base/compile.scm (compute-lowerer): New procedure,
  replaceing add-default-optimizations.
  (compute-compiler): Lower before running compiler.
* module/system/base/language.scm (<language>): Change
  optimizations-for-level field to "lowerer".
* module/scripts/compile.scm (%options, compile): Parse -O0, -O1 and so
  on to #:optimization-level instead of expanding to all the
  optimization flags.
* module/language/cps/optimize.scm (lower-cps): Move here from
  compile-bytecode.scm.
  (make-cps-lowerer): New function.
* module/language/cps/spec.scm (cps): Declare lowerer.
2020-05-08 17:07:56 +02:00
Ian Price
05c57a6a66 Update Copyright Headers
* module/Makefile.am:
* module/language/cps/compile-js.scm:
* module/language/cps/spec.scm:
* module/language/javascript.scm:
* module/language/javascript/spec.scm:
* module/language/js-il.scm:
* module/language/js-il/compile-javascript.scm:
* module/language/js-il/inlining.scm:
* module/language/js-il/runtime.js: Update copyright headers
2017-08-28 14:08:31 +01:00
Ian Price
1b36a76ea4 Merge branch 'stable-2.2' into compile-to-js-2017 2017-06-14 21:13:10 +01:00
Andy Wingo
f261eaf03a Fix guild compile --to=cps / --from=cps
* module/language/cps/spec.scm (read-cps, write-cps): Fix CPS
  serialization and parsing, so that "guild compile" works with --to=cps
  and --from=cps.
2017-02-23 11:37:44 +01:00
Andy Wingo
4aabc205cc Add missing files
Last commit meant to rename files, not delete them.  Whoops!
2015-07-22 18:27:37 +02:00
Andy Wingo
0d4c937722 Remove CPS1 language
* module/language/cps.scm:
* module/language/cps/compile-bytecode.scm:
* module/language/cps/dfg.scm:
* module/language/cps/renumber.scm:
* module/language/cps/slot-allocation.scm:
* module/language/cps/spec.scm:
* module/language/cps/verify.scm:
* module/language/cps2/compile-cps.scm: Delete.
* module/Makefile.am: Remove deleted files.
2015-07-22 17:15:06 +02:00
Ian Price
ce1cc2706c Temp commit 2015-06-18 04:14:41 +01:00
Andy Wingo
691697de09 Rename "RTL" to "bytecode"
"RTL" didn't make any sense, and now that there's no other bytecode to
disambiguate against, just call it bytecode.

* module/Makefile.am:
* module/ice-9/eval-string.scm:
* module/language/bytecode.scm:
* module/language/bytecode/spec.scm:
* module/language/cps/arities.scm:
* module/language/cps/compile-bytecode.scm:
* module/language/cps/compile-rtl.scm:
* module/language/cps/contification.scm:
* module/language/cps/elide-values.scm:
* module/language/cps/primitives.scm:
* module/language/cps/reify-primitives.scm:
* module/language/cps/spec.scm:
* module/language/cps/specialize-primcalls.scm:
* module/language/rtl.scm:
* module/language/rtl/spec.scm:
* module/scripts/compile.scm:
* module/system/base/compile.scm:
* module/system/repl/common.scm:
* module/system/vm/assembler.scm:
* module/system/vm/debug.scm:
* module/system/vm/disassembler.scm:
* module/system/vm/dwarf.scm:
* test-suite/tests/cross-compilation.test:
* test-suite/tests/dwarf.test:
* test-suite/tests/rtl-compilation.test:
* test-suite/tests/rtl.test:
* test-suite/vm/run-vm-tests.scm: Fixups.
2013-12-02 21:31:47 +01:00
Andy Wingo
6e8ad82335 Add CPS -> RTL compiler
* module/Makefile.am:
* module/language/cps/compile-rtl.scm:
* module/language/cps/dfg.scm:
* module/language/cps/slot-allocation.scm: New modules.

* module/language/cps/spec.scm: Register the compiler.

* test-suite/Makefile.am:
* test-suite/tests/rtl-compilation.test: Add tests.
2013-08-31 09:40:56 +02:00
Andy Wingo
4fefc3a867 (compile foo #:to 'cps)
* module/language/tree-il/compile-cps.scm: New module implementing CPS
  conversion of Tree-IL.

* module/Makefile.am:
* module/language/tree-il/spec.scm:
* module/language/cps/spec.scm: Integrate CPS in the build and language
  system.
2013-08-31 09:40:56 +02:00