Skip to content
JIT compiler for Scheme targeting x86-64 platforms
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
documents
extern wip nan-boxing Feb 27, 2018
lib
tools Merge branch 'master' of github.com:bsaleil/lc Apr 4, 2019
unit-tests
.gitignore
.travis.yml
LICENSE
Makefile Fix special case of $$gambit-call primitive Aug 27, 2018
README.md update readme Aug 29, 2018
analyses.scm
array1.scm.scm
ast.scm
build-lib.scm IO operations now uses gambit primitives May 30, 2016
bytes-allocated.sh Update benchmarks to work with FLOAT* macros Aug 27, 2018
codegen.scm Improve div ops Mar 22, 2019
config-debug.scm Add specialized config file for debug and release targets Jun 1, 2017
config-release.scm Add specialized config file for debug and release targets Jun 1, 2017
copy-with-declare.sh
core.scm improve graph script Mar 20, 2019
ctx.scm
expand.scm Move lazy unboxing sequence to its own lco after type check Jun 18, 2018
fib.scm
float.scm optimize flonum imm -> xmm moves Apr 25, 2018
gdbseq wip Mar 13, 2018
lazy-comp.template Fix alloc-imm seq & intraprocedural nan wip Jul 11, 2018
main.scm
mem.scm Add bytes allocated slot for --stats Jul 31, 2018
native.scm
run-ut.scm
strat1.scm
strat2.scm Move opt-max-version option to strat1 & strat2 Jul 28, 2017
strat3.scm Fix wrong floc -> floc moves Aug 8, 2017
strat4.scm Fix strat4 H2 Aug 21, 2017
stratnomax.scm
stratprog-noheur.scm save wip heuristic Dec 6, 2017
stratprog.scm heur1 is now based on the last generated stack Dec 8, 2017
stratprognoreg.scm save wip heuristic Dec 6, 2017
stratunified.scm Fix function lco creation (create a *single* lco per function) Dec 14, 2017
test.scm.json
utils.scm
values.scm Fix intraprocedural nan boxing Jul 17, 2018
x86-debug.scm Add bytes allocated slot for --stats Jul 31, 2018

README.md

lc

Build Status

JIT compiler for Scheme targeting Linux x86-64 platforms.

  • Baptiste Saleil and Marc Feeley. Interprocedural Specialization of Higher-Order Dynamic Languages Without Static Analysis. In European Conference on Object-Oriented Programming (ECOOP'17), 2017.
    [pdf]
  • Baptiste Saleil and Marc Feeley. Type Check Removal Using Lazy Interprocedural Code Versioning. In Scheme and Functional Programming Workshop (SFPW'15), 2015.
    [pdf]
  • Baptiste Saleil and Marc Feeley. Code Versioning and Extremely Lazy Compilation of Scheme. In Scheme and Functional Programming Workshop (SFPW'14), 2014.
    [pdf]

Building

LC depends on a modified version of the Gambit Scheme compiler that must be installed before building LC:

# Build the modified version of Gambit
git clone https://github.com/bsaleil/gambit
cd gambit
mkdir build
./configure --enable-single-host --prefix=$(pwd)/build
make -j8
make install

The gsc executable of the modified version of Gambit must be available in PATH both when building and running LC:

# Make 'gsc' binary available in PATH
export PATH=$(pwd)/build/bin:$PATH

Then, LC can be built:

# Build LC
git clone https://github.com/bsaleil/lc -b stable
cd lc
make -j8

Running

Make sure the gsc binary of the modified version of gambit is also available in PATH when running lc.

./lc file.scm

Example

To compute the 40th Fibonacci number:

fib.scm:

(define (fib n)
  (if (< n 2)
      1
      (+ (fib (- n 1))
         (fib (- n 2)))))

(println (fib 40))
$ time ./lc fib.scm
165580141

real	0m0,550s
user	0m0,537s
sys	0m0,010s
You can’t perform that action at this time.