Skip to content

Commit

Permalink
Add generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
djwatson committed Oct 13, 2023
1 parent 951831d commit ed81844
Show file tree
Hide file tree
Showing 8 changed files with 13,687 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ cmake_install.cmake
*.bc
tmp1
tmp2
bootstrap.cpp
libwrite_double.so
opcodes*
vm.ll
bootstrap.c
test/tmp3
test/bench/foo
test/outputs/*
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ Hawk has no dependencies other than a recent (> 13) clang. GCC
Release mode, but not in Debug mode.

It has an optional dependency on libcapstone, and elf headers for debugging.
Currently chezscheme or chicken is used for bootstrapping, but is not
used after install.

```
sudo apt install chezscheme
```bash
git clone https://github.com/djwatson/hawk.git
cd hawk
cmake .
make -j
sudo make install
```

Currently chezscheme or chicken is used for bootstrapping, but is not
used after install. Prebuilt blobs are included if chez or chicken
(or hawk) are not found, and a bootstrap scheme is only required if
the sources are modified.

## OPTIONS

`--joff`
Expand Down Expand Up @@ -66,15 +68,15 @@ sudo make install
Print help message and exit.

## EXAMPLES
```
```bash
hawk hello.scm
```
Prints 'hello world', assuming hello.scm contains
```
```scheme
(display "hello world")
```
Compile the hello.scm script to an executable:
```
```bash
hawk --exe hello.scm
./hello
```
Expand Down
5 changes: 2 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ <h2>HAWK</h2>
<p>HAWK can be found on <a href="https://github.com/djwatson/hawk">github</a>. It is licensed under the <a href="https://opensource.org/license/mit/">MIT License</a>. </p>
</div>
<h2>Building</h2>
<div class="header">Hawk has no dependencies other than a recent (> 13) clang. It has an optional dependency on libcapstone, and elf headers for debugging. Currently chezscheme or chicken is used for bootstrapping, but is not used after install.</div>
<div class="header">Hawk has no dependencies other than a recent (> 13) clang. It has an optional dependency on libcapstone, and elf headers for debugging. Currently chezscheme or chicken is used for bootstrapping, but is not used after install. Prebuilt blobs are included if chez or chicken (or hawk) are not found, and a bootstrap scheme is only required if the sources are modified.</div>
<p></p>
<pre class="code"><code>$ sudo apt install chezscheme
$ git clone https://github.com/djwatson/hawk.git
<pre class="code"><code>$ git clone https://github.com/djwatson/hawk.git
$ cd hawk
$ cmake .
$ make -j
Expand Down
115 changes: 115 additions & 0 deletions lib/opcodes.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
(define opcodes '(
(ILOOP 0)
(LOOP 1)
(IFUNC 2)
(FUNC 3)
(IFUNCV 4)
(FUNCV 5)
(ICLFUNC 6)
(CLFUNC 7)
(ICLFUNCV 8)
(CLFUNCV 9)
(KSHORT 10)
(JMP 11)
(IRET1 12)
(RET1 13)
(HALT 14)
(SUBVN 15)
(ADDVN 16)
(ADDVV 17)
(SUBVV 18)
(MULVV 19)
(DIV 20)
(REM 21)
(EQ 22)
(JEQ 23)
(JNEQ 24)
(MEMQ 25)
(ASSV 26)
(ASSQ 27)
(LENGTH 28)
(EQUAL? 29)
(JISLT 30)
(JISEQ 31)
(JISNEQ 32)
(JISLTE 33)
(JISGT 34)
(JISGTE 35)
(ISLT 36)
(ISGT 37)
(ISLTE 38)
(ISGTE 39)
(ISEQ 40)
(JISF 41)
(JIST 42)
(GGET 43)
(GSET 44)
(KFUNC 45)
(KONST 46)
(MOV 47)
(BOX 48)
(UNBOX 49)
(SET-BOX! 50)
(GUARD 51)
(JGUARD 52)
(JNGUARD 53)
(VECTOR 54)
(CLOSURE 55)
(CLOSURE-GET 56)
(CLOSURE-SET 57)
(CLOSURE-PTR 58)
(APPLY 59)
(JFUNC 60)
(JLOOP 61)
(CALL 62)
(LCALL 63)
(CALLT 64)
(LCALLT 65)
(EQV? 66)
(JEQV 67)
(JNEQV 68)
(CONS 69)
(CAR 70)
(CDR 71)
(MAKE-VECTOR 72)
(MAKE-STRING 73)
(VECTOR-REF 74)
(STRING-REF 75)
(VECTOR-LENGTH 76)
(STRING-LENGTH 77)
(VECTOR-SET! 78)
(STRING-SET! 79)
(SET-CAR! 80)
(SET-CDR! 81)
(WRITE 82)
(WRITE-U8 83)
(WRITE-DOUBLE 84)
(SYMBOL->STRING 85)
(STRING->SYMBOL 86)
(CHAR->INTEGER 87)
(INTEGER->CHAR 88)
(OPEN 89)
(CLOSE 90)
(PEEK 91)
(READ 92)
(READ-LINE 93)
(INEXACT 94)
(EXACT 95)
(ROUND 96)
(SIN 97)
(SQRT 98)
(ATAN 99)
(COS 100)
(TRUNCATE 101)
(FLOOR 102)
(CEILING 103)
(EXP 104)
(LOG 105)
(TAN 106)
(ASIN 107)
(ACOS 108)
(CALLCC 109)
(CALLCC-RESUME 110)
(FILE-EXISTS? 111)
(DELETE-FILE 112)
))
12,420 changes: 12,420 additions & 0 deletions src/bootstrap.c

Large diffs are not rendered by default.

Loading

0 comments on commit ed81844

Please sign in to comment.