Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • vivicat/guile-hoot
  • LukeSmithFanBoy/guile-hoot
  • spritely/guile-hoot
  • dannyob/guile-hoot
  • ShalokShalom/guile-hoot
  • squaremo/guile-hoot
  • aarong11/guile-hoot
  • Z572/guile-hoot
  • klavul/guile-hoot
  • Pinjontall94/guile-hoot
  • createyourpersonalaccount/guile-hoot
  • sbensu/guile-hoot
  • itorres/guile-hoot
  • abcdw/guile-hoot
  • kakafarm/guile-hoot
  • kyurivlis/guile-hoot
  • hierophantos/guile-hoot
  • wordempire/guile-hoot
18 results
Show changes
Commits on Source (3)
......@@ -94,23 +94,32 @@ we may be little schemers, we want our work to help advance the Wasm
standard for all dynamic languages.
@menu
* Supported platforms:: Where you can run Hoot.
* Status:: What works. What doesn't.
* Installation:: Setting up Hoot.
* Tutorial:: Compiling your first Scheme program to Wasm.
@end menu
@node Supported platforms
@section Supported platforms
Hoot's Scheme binaries are supported on the following Wasm runtimes:
@itemize
@item Mozilla Firefox 121 or later
@item Google Chrome 119 or later
@item Apple Safari 18.2 or later
@item NodeJS 22.3.0 or later
@end itemize
@node Status
@section Status
Hoot's Wasm output is compatible with Google Chrome starting with
version 119 and Mozilla Firefox starting with version 121. As of
writing, WebKit/Apple Safari is not yet compatible.
Hoot is still in an early phase of active development and its API
should be considered unstable and subject to change in future
releases. Hoot currently supports a subset of the R7RS-small Scheme
specification, along with a small set of Guile-specific functionality
such as @inlinefmtifelse{html,
releases. Hoot currently supports most of the R7RS-small Scheme
specification, a bit of R6RS, along with some Guile-specific
functionality such as @inlinefmtifelse{html,
@url{https://www.gnu.org/software/guile/manual/html_node/Prompts.html,
prompts}, @ref{Prompts,,,Guile Reference}}.
......@@ -471,9 +480,7 @@ backend that compiles CPS to Wasm.
In contrast to Guile's approach of compiling individual modules, Hoot
is a whole-program compiler. The user program and all imported
modules are part of the same compilation unit and the result is a
single Wasm binary. Currently, Hoot uses the R6RS library system and
does not support Guile's @code{define-module} form or R7RS style
libraries.
single Wasm binary.
For hooking the Hoot compiler up to a build system such as GNU Make,
invoke the @command{guild compile-wasm} tool:
......
......@@ -528,17 +528,19 @@
(22 (k `(ref.cast ,(make-ref-type #f (parse-heap-type port)))))
(23 (k `(ref.cast ,(make-ref-type #t (parse-heap-type port)))))
(24 (let* ((flags (get-u8 port))
(label (parse-idx))
(rt1 (make-ref-type (logtest 1 flags)
(parse-heap-type port)))
(rt2 (make-ref-type (logtest 2 flags)
(parse-heap-type port))))
`(br_on_cast ,rt1 ,rt2)))
(k `(br_on_cast ,label ,rt1 ,rt2))))
(25 (let* ((flags (get-u8 port))
(label (parse-idx))
(rt1 (make-ref-type (logtest 1 flags)
(parse-heap-type port)))
(rt2 (make-ref-type (logtest 2 flags)
(parse-heap-type port))))
`(br_on_cast_fail ,rt1 ,rt2)))
(k `(br_on_cast_fail ,label ,rt1 ,rt2))))
(26 (k `(extern.internalize)))
(27 (k `(extern.externalize)))
(28 (k `(ref.i31)))
......
......@@ -198,6 +198,21 @@
(then (i32.const 1))
(else (i32.const 2))))))
;; Regression test for br_on_cast parsing.
(test-wat->wasm
#vu8(0 97 115 109 1 0 0 0 1 7 1 96 1 100 109 1 127 3 2 1 0 10 23 1 21 0 2
100 108 32 0 251 24 0 0 109 108 26 65 0 15 11 26 65 1 11)
(module
(func $immediate? (param $x (ref eq)) (result i32)
(block $i31 (ref i31)
(local.get $x)
(br_on_cast $i31 (ref eq) (ref i31))
(drop)
(i32.const 0)
(return))
(drop)
(i32.const 1))))
;; Test exceptions
(test-wat->wasm
#vu8(0 97 115 109 1 0 0 0 1 4 1 96 0 0 13 3 1 0 0)
......