Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Lending Rework #69

Draft
wants to merge 21 commits into
base: staging
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/execution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ jobs:
if: contains(matrix.os, 'ubuntu')
run: sudo ln -s libclang-15.so.1 /lib/x86_64-linux-gnu/libclang.so
working-directory: ${{ env.LLVM_PATH }}/lib
- run: npm install --ignore-scripts
- run: cmake . -B build -G Ninja
- run: cmake --build build
- run: npm run build:syntax
- run: node ./compiler/test.js --action

- name: Installing Dependencies
run: npm install --ignore-scripts

- name: Compiler Setup
run: npm run build

- name: Compiler test
run: node ./compiler/test.js --action

build-win:
if: ${{ false }} # disable for now
Expand Down
131 changes: 5 additions & 126 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,132 +1,11 @@
{
"files.associations": {
"*.qp": "qupa",
"*.effect": "hlsl",
"*.frm": "vb",
"*.inc": "asp",
"*.uv": "uniview",
"xstring": "cpp",
"algorithm": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"barrier": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"cfenv": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"coroutine": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cuchar": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"exception": "cpp",
"execution": "cpp",
"filesystem": "cpp",
"format": "cpp",
"forward_list": "cpp",
"fstream": "cpp",
"functional": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"latch": "cpp",
"limits": "cpp",
"list": "cpp",
"locale": "cpp",
"map": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ostream": "cpp",
"queue": "cpp",
"random": "cpp",
"ranges": "cpp",
"ratio": "cpp",
"regex": "cpp",
"scoped_allocator": "cpp",
"semaphore": "cpp",
"set": "cpp",
"shared_mutex": "cpp",
"span": "cpp",
"sstream": "cpp",
"stack": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"string": "cpp",
"strstream": "cpp",
"system_error": "cpp",
"thread": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"utility": "cpp",
"valarray": "cpp",
"variant": "cpp",
"vector": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xstddef": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"__bit_reference": "cpp",
"__bits": "cpp",
"__config": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__split_buffer": "cpp",
"__std_stream": "cpp",
"__threading_support": "cpp",
"__tuple": "cpp",
"__verbose_abort": "cpp",
"propagate_const": "cpp",
"string_view": "cpp",
"*.ipp": "cpp"
},
"editor.insertSpaces": false,
"files.eol": "\n"
"files.eol": "\n",
"cSpell.words": [
"qupa",
"uniview"
]
}
20 changes: 8 additions & 12 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
# Building Uniview from source

## Requirements
* CMake >= 3.11
* git *used by cmake to get required submodules*
* [CMake](https://cmake.org/) >= 3.11
* [Git](https://git-scm.com/) *used by cmake to get required submodules*
* A modern C/++ compiler, preferably Clang 12 or newer
* [Ninja](https://ninja-build.org/)

First of all you need to build the LLVM source components that will be used by Uniview

## Dependency Setup
While in the root directory of the repository run either of these commands.
This will run a serise of CMake scripts which will:
This will run a series of CMake scripts which will:
1. Pull the require submodules
2. Set the require LLVM build parameters
3. Configure the LLVM build
4. Build the LLVM library
5. Install the library to the repository
5. Install the LLVM library into the repository

### Windows
**Windows**
```bash
lib/install.bat
```

### Ubuntu
**Ubuntu**
```bash
lib/install.bash
```
Expand All @@ -30,10 +31,5 @@ lib/install.bash

Setup the build environment
```bash
cmake . -B build
```

Then to build at any time just run
```bash
cmake --build build
npm run build
```
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ You can also find a few examples in `test/pre-alpha/`.
| Argument | Use |
| :- | :- |
| `-o {filename}` | The destination file name for the LLVM IR and binary output |
| `-s` | The compilation level to perform `llvm`, `assembly` |
| `--execute` | Executes the binary output after successful compilation |
| `-mode {mode}` | The processing to perform (`parse`, `verify`, `uvir`, `llir`, `object`, `execute`) |
| `--opt O{num}` | Runs optimisation passes over the output (any number between 0-3 inclusive) |
| `--version` | Prints the version of the compiler |
| `--verifyOnly` | Compiles to LLVM, but does not store the results or compiles further |
| `--compileOnly` | Compiles to binary, but does not execute the result |
| `--opt {num}` | Runs optimisation passes over the output (any number between 0-3 inclusive) |
| `--profile` | Enable compilation profiling |
| `--verbose` | Use verbose build logs |
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

## Changes
- [x] Comments are now able to be used anywhere whitespace can
- [x] Cloning now done via the `Clone()` function instead of via the `$` operator.
- [x] Cloning now done via the `Clone()` function instead of via the `$` operator
- [x] Now use `let x := 23;` to infer type rather than `let x = 23;`, this is to help with future variant types

## Tweaks
- [x] Now uses the LLVM tool chain (instead of clang) to generated the platform specific assembly, then clang does the final mile to make the executable binary.
Expand Down
Loading