unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Screaming-Fist: a JIT framework for Guile
@ 2023-12-03 17:26 Nala Ginrut
  2023-12-03 20:49 ` Dr. Arne Babenhauserheide
  2023-12-04 21:26 ` Maxime Devos
  0 siblings, 2 replies; 6+ messages in thread
From: Nala Ginrut @ 2023-12-03 17:26 UTC (permalink / raw)
  To: Guile User

Hi Folks!
I'd like to introduce our new project named screaming-fist which is a JIT
framework based on libgccjit.

The project is still preliminary, but the POC could run.

The basic idea is to hide the JIT details and let users write Scheme-like
code for JIT on the fly.

here's the simple code:
--------------------------------
(import (screaming-fist jit))

(jit-define (square x)
  (:anno: (int) -> int)
  (* x x))
(square 5)

;; ==> 25
----------------------------------

And you can dump IR, say, gimple:
----------------------------------------------

(import (screaming-fist utils) (screaming-fist jit))
(parameterize ((dump-mode "gimple"))
 (jit-define (square x)
  (:anno: (int) -> int)
  (* x x)))

-------------------------------


The possible output could be:

------------------------------

int square (int x){
  int D.79;

  <D.76>:
  D.79 = x * x;
  return D.79;}

--------------------------------------------

The branching and looping codegen is still under debugging.

Here's the project page:

https://gitlab.com/SymeCloud/screaming-fist

Happy hacking!


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-05 20:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-03 17:26 Screaming-Fist: a JIT framework for Guile Nala Ginrut
2023-12-03 20:49 ` Dr. Arne Babenhauserheide
2023-12-05  9:36   ` Nala Ginrut
2023-12-04 21:26 ` Maxime Devos
2023-12-05 10:14   ` Nala Ginrut
2023-12-05 20:30     ` Nala Ginrut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).