gsoc: 1/3 progress report

Charles Zhang <[email protected]> Tue, 12 Jun 2018 13:37:38 -0400
Newsgroups gmane.lisp.clisp.devel
Message-ID <CAB=SSS=BP26PNnp2JkMrm1T6qK7Y2oNbxBwFCjeyYLB8OC2pvQ@mail.gmail.com>
Hello clisp,

Cleavir on clisp is now integrated fairly well into CLISP. One can now
(setf cleavir-clisp::*use-cleavir* t) to turn on Cleavir. Any
subsequent calls to COMPILE and COMPILE-FILE will use Cleavir instead
of CLISP's compiler. Setting it to nil uses CLISP's compiler again.
Files compiled with Cleavir are fully FASL compatible with CLISP.

Enough is working to compile alexandria.

> (load "clisp/src/cleavir/load.lisp")
> (setf cleavir-clisp::*use-cleavir* t)
> (let ((sys::*load-compiling* t)) (asdf:load-system :alexandria :force t))
....
> (alexandria:ensure-car '(a b))
A

> (disassemble #'alexandria:ensure-car)

Disassembly of function NIL
(CONST 0) = NIL
(CONST 1) = CAR
1 required argument
0 optional arguments
No rest parameter
No keyword parameters
15 byte-code instructions:
0     (LOAD&PUSH 1)
1     (CALLS2&PUSH 22)                    ; CONSP
3     (LOAD&PUSH 0)
4     (JMPIFEQTO 0 L9)                    ; NIL
7     (JMP L12)
9     L9
9     (LOAD 2)
10    (SKIP&RET 3)
12    L12
12    (CONST&PUSH 1)                      ; CAR
13    (CALLS1&PUSH 86)                    ; FDEFINITION
15    (LOAD&PUSH 0)
16    (LOAD&PUSH 4)
17    (FUNCALL 1)
19    (SKIP&RET 4)

Charles

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel