-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lazy evaluation, fix I/O bugs, refactor, add docs & license
- Loading branch information
1 parent
ed4d2b5
commit bac1411
Showing
17 changed files
with
412 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# source this file on OSX to use the Homebrew LLVM installation | ||
|
||
export LLVM_ASSEMBLER$(brew --prefix llvm)/bin/llvm-as | ||
export LLVM_LINKER=$(brew --prefix llvm)/bin/llvm-link | ||
export LLVM_INTERPRETER=$(brew --prefix llvm)/bin/lli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ | |
*.realout | ||
|
||
# executables | ||
latc | ||
latc_llvm |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
# compiler executables | ||
name = "latc_llvm" | ||
version = "0.1.0" | ||
version = "0.2.0" | ||
authors = ["Krzysztof Kowalczyk <[email protected]>"] | ||
edition = "2018" | ||
|
||
|
@@ -15,9 +15,8 @@ members = [".", "latte_lib"] | |
|
||
[dependencies] | ||
# actual compiler & frontend logic implementation | ||
latte_lib = {path = "latte_lib", version = "0.1.0"} | ||
latte_lib = {path = "latte_lib", version = "0.2.0"} | ||
|
||
[dev-dependencies] | ||
# compile-time embedding of files from source directories, used for testing | ||
include_dir = "0.4.1" | ||
rstest = "0.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Krzysztof Kowalczyk | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
all: test release | ||
|
||
test: test-cargo test-e2e | ||
|
||
runtime: | ||
clang -S -std=c99 -o lib/runtime.ll lib/runtime.c -emit-llvm | ||
clang -S -std=c99 -O2 -o lib/runtime.ll lib/runtime.c -emit-llvm | ||
llvm-as -o lib/runtime.bc lib/runtime.ll | ||
|
||
test: | ||
test-cargo: runtime | ||
cargo test --all -- --exact | ||
|
||
test-e2e: runtime | ||
bash test_e2e.sh | ||
|
||
release: runtime | ||
cargo build --package latc_llvm --bin latc_llvm --release | ||
cp target/release/latc_llvm ./ | ||
cp latc_llvm latc | ||
chmod +x latc_llvm latc |
Oops, something went wrong.