From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Screaming-Fist: a JIT framework for Guile Date: Mon, 4 Dec 2023 01:26:24 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22211"; mail-complaints-to="usenet@ciao.gmane.io" To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Dec 03 18:27:11 2023 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r9qFL-0005WX-AX for guile-user@m.gmane-mx.org; Sun, 03 Dec 2023 18:27:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9qEy-00004s-37; Sun, 03 Dec 2023 12:26:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r9qEs-0008WB-E9 for guile-user@gnu.org; Sun, 03 Dec 2023 12:26:44 -0500 Original-Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9qEq-0001PP-N7 for guile-user@gnu.org; Sun, 03 Dec 2023 12:26:42 -0500 Original-Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a18b0f69b33so654695766b.0 for ; Sun, 03 Dec 2023 09:26:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701624397; x=1702229197; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=BP5RlI4y57CDgQtSjDA7s0ScwgqVIw2Mg/Yg7Tps7hg=; b=YCB1emetYSxX+5tsdtPAfcVveWFxQKKFN9uvyT4AD5mRi84BffabG2LdCK1+NZLPfC dmNmTtS95Ax9jC6JGy9jtrDeEAP1FbAnUjxFmY82Dt8wXUbbZ+TJyM0M4JDIl8tUg/WK dUiBfpe+07P6Y1ndcheOn8c1wqsaoNWCntUo9p6KVzHBdruxwSpRsWGzp/59yXP7XMDD C/A7QQx8SD0UEe5adu7ICy4PN2p6S51zBel0Yt6RUNPtD60bpcBJWdrzaWG/3N798JHT Naxeu0WioeHy6Je9O/iiB803X+8J852r7y3EA1UJwy5Ab50FjvZYGxIdE327F3Nl2tHT UN9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701624397; x=1702229197; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BP5RlI4y57CDgQtSjDA7s0ScwgqVIw2Mg/Yg7Tps7hg=; b=pcx8GLcDc+1ufaN9bpyyqDko8Hppcjcf4P8BMduubFrl0jaPmtOuXDjlY3TmonU+eV 50LcDiqZNbinFgLOmmNQ6w0qljxsVKim1hOc4TUVGr+7JTafwO57sV/DSCH+7BKLGTrW yxxTyi8kVxI6Ex5x3oSocfzis4X3tCiNHz9LE6sCG5GsyaPIjADsYqHJvTEuGf6Qp0mq 4zYwMuheNHsOyHSuGcsDsBdsqE5l5yETt4rz93NtHu9Wtd6M66sr2gwcU4ol5YK/QXvX LP9oJUxFKMVwt2TQO+EcjUDChprJETd13lhowxaK7V46T7VZSr/V1oOd2YxYREIkmrHi 8/ew== X-Gm-Message-State: AOJu0YyH6DuClpRplufE24nsQpTTMfSIgFtg/dHMYtfljqCUUqXxRUu4 lcMNfoy0xoDcQlAEb72pDBh7kXX5iOs81rQ3LXz21ajIWuvwMg== X-Google-Smtp-Source: AGHT+IE7GBcu8sM68SCJl7UXFAgwJJCHY4RHFculGsXuCzwUPnCuNYLQtQClU0MRUeCTP2AlsnIEqM7lXE7yMI2QS24= X-Received: by 2002:a17:906:3f53:b0:9e5:26b2:b38d with SMTP id f19-20020a1709063f5300b009e526b2b38dmr5290122ejj.10.1701624396771; Sun, 03 Dec 2023 09:26:36 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=nalaginrut@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19339 Archived-At: 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.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!