1
0
forked from M-Labs/nac3
New ARTIQ compiler, third iteration
Go to file
Sebastien Bourdeauducq 25fc9db66d cargo: specify inkwell LLVM target explicitly
Windows LLVM linking otherwise breaks on the non-existing targets.
2021-12-02 22:24:33 +08:00
nac3artiq cargo: specify inkwell LLVM target explicitly 2021-12-02 22:24:33 +08:00
nac3ast fix clippy warnings 2021-11-06 23:00:18 +08:00
nac3core cargo: specify inkwell LLVM target explicitly 2021-12-02 22:24:33 +08:00
nac3parser typo 2021-11-06 14:14:40 +08:00
nac3standalone cargo: specify inkwell LLVM target explicitly 2021-12-02 22:24:33 +08:00
runkernel runkernel: improve print_int debug functions 2021-11-19 12:39:57 +08:00
.gitignore nac3embedded: basic source extraction 2020-12-18 23:45:09 +08:00
Cargo.lock nac3artiq: embed linker script, put intermediate objects in temp dir 2021-11-06 13:04:00 +08:00
Cargo.toml integrate nac3parser 2021-11-03 17:11:00 +08:00
flake.lock flake: revert nixpkgs to unbreak rust cross-compilation 2021-11-26 17:00:20 +08:00
flake.nix flake: use *.pyd for Windows Python module 2021-12-02 22:24:23 +08:00
llvm-future-riscv-abi.diff llvm: switch RISC-V ABI when FPU is present 2021-11-11 23:42:32 +08:00
llvm-mingw-crosscompile.diff flake: patch nixpkgs to fix mingw llvm_12 build 2021-11-26 17:01:44 +08:00
llvm-restrict-targets.diff typo 2021-11-11 23:44:14 +08:00
llvm-unbreak-static-cross.diff flake: unbreak llvm-config for cross-compilation of static libs 2021-12-02 18:46:04 +08:00
README.md README: update 2021-11-03 17:22:14 +08:00

NAC3 compiler

This repository contains:

  • nac3ast: Python abstract syntax tree definition (based on RustPython).
  • nac3parser: Python parser (based on RustPython).
  • nac3core: Core compiler library, containing type-checking and code generation.
  • nac3standalone: Standalone compiler tool (core language only).
  • nac3artiq: Integration with ARTIQ and implementation of ARTIQ-specific extensions to the core language.
  • runkernel: Simple program that runs compiled ARTIQ kernels on the host and displays RTIO operations. Useful for testing without hardware.

The core compiler knows nothing about symbol resolution, host variables etc. nac3artiq and nac3standalone provide (implement) the symbol resolver to the core compiler for resolving the type and value for unknown symbols. The core compiler only type checks classes and functions requested by nac3artiq/nac3standalone (the API should allow the caller to specify which methods should be compiled). After type checking, the compiler analyses the set of functions/classes that are used and performs code generation.

value could be integer values, boolean values, bytes (for memcpy), function ID (full name + concrete type)