All Projects → decaf-lang → decaf-rs

decaf-lang / decaf-rs

Licence: other
The Decaf compiler, written in Rust

Programming Languages

rust
11053 projects
assembly
5116 projects

Projects that are alternatives of or similar to decaf-rs

cross
“Zero setup” cross compilation and “cross testing” of Rust crates
Stars: ✭ 3,550 (+8155.81%)
Mutual labels:  mips
GoRAT
GoRAT (Go Remote Access Tool) is an extremely powerful reverse shell, file server, and control plane using HTTPS reverse tunnels as a transport mechanism.
Stars: ✭ 34 (-20.93%)
Mutual labels:  mips
prime.js
Prime JS is a different kind of JavaScript framework. Prime is written in 100% standard, explicit, and namespaced Object Oriented JavaScript.
Stars: ✭ 13 (-69.77%)
Mutual labels:  object-oriented
kpspemu
PSP Emulator written in Kotlin for JVM, JS and Native. Can work as PWA.
Stars: ✭ 57 (+32.56%)
Mutual labels:  mips
xavier
Xavier is a small object-oriented XML library for Lazarus and Delphi
Stars: ✭ 38 (-11.63%)
Mutual labels:  object-oriented
HIGH-TO-LOW
in this repository you will find codes in C and their equivalence in MIPS Assembly
Stars: ✭ 20 (-53.49%)
Mutual labels:  mips
lips
MIPS R4300i assembler in Lua
Stars: ✭ 20 (-53.49%)
Mutual labels:  mips
l4re-core
The core components of the L4Re operating system.
Stars: ✭ 39 (-9.3%)
Mutual labels:  mips
rebuild
Zero-dependency, reproducible build environments
Stars: ✭ 48 (+11.63%)
Mutual labels:  mips
BUAA CO
2017级北航计算机学院计算机组成原理课程设计(MIPS CPU)
Stars: ✭ 66 (+53.49%)
Mutual labels:  mips
libra-code
quantum-dynamics-hub.github.io/libra/index.html
Stars: ✭ 33 (-23.26%)
Mutual labels:  object-oriented
mipsasm
MIPS assembler and IDE
Stars: ✭ 45 (+4.65%)
Mutual labels:  mips
openwrt-useful-tools
A repo containing different tools compiled specifically for the Hak5 WiFi Pineapple MK6 and MK7.
Stars: ✭ 155 (+260.47%)
Mutual labels:  mips
CourseDownloader
GUI app for downloading whole online courses with folder structure from one url
Stars: ✭ 20 (-53.49%)
Mutual labels:  object-oriented
snap
Snap Programming Language
Stars: ✭ 20 (-53.49%)
Mutual labels:  object-oriented
asmdot
[Unstable] Fast, zero-copy and lightweight (Arm | Mips | x86) assembler in (C | C++ | C# | Go | Haskell | Javascript | Nim | OCaml | Python | Rust).
Stars: ✭ 23 (-46.51%)
Mutual labels:  mips
awesome-n64-development
A curated list of Nintendo 64 development resources including toolchains, documentation, emulators, example code, and more
Stars: ✭ 210 (+388.37%)
Mutual labels:  mips
venus
OO Standard Library for Perl 5
Stars: ✭ 14 (-67.44%)
Mutual labels:  object-oriented
H2 ALSH
Accurate and Fast ALSH for Maximum Inner Product Search (KDD 2018)
Stars: ✭ 18 (-58.14%)
Mutual labels:  mips
CallofDuty.py
Asynchronous, object-oriented Python wrapper for the Call of Duty API.
Stars: ✭ 86 (+100%)
Mutual labels:  object-oriented

Introduction

The public version of decaf pa.

The code involved in pa1a, pa2, pa3 are the same as the private version of decaf pa, because in them your task is only extending language features, which are different on different years. By contrast, the code involved in pa1b, pa4, pa5 may miss necessary code, because in them your task involves completing existing code, which are the same on different years.

Testcases

It is on the way, now the testcase folder doesn't contain any testcase. We will later identify a set of testcases that are suitable for publication.

Documentation (experiment guide)

decaf-doc

Build & Run

You need a nightly rust compiler. It is tested on rustc 1.38.0-nightly, there is no guarantee about any older version (I believe that a newer version won't break the code).

Run:

cargo run --bin test # for testing your implemetation using the testcase folder
# or
cargo run --bin decaf # for a command line app

The command line app (with name decaf) support the following arguments:

<input> # required, the input decaf file path
--target=<target> # required, <target> can be pa1a, pa1b, pa2, pa3, pa4, pa5
--output=<output> # optional, the output path; if not specified, it prints to stdout

Common problems

  1. The color (printed by test) is not working properly on Windows

Add colored::control::set_override(false); before calling test_all to disable color.

  1. --target=pa1b/pa4/pa5 panicked at unimplemented!()

Of course, they are simply not implemented. But there is also fallback code for the unimplemented code:

  • to make pa1b work, in syntax/src/parser_ll.rs, change the line unimplemented!() to return StackItem::_Fail;
  • to make pa4 work, in tacopt/src/bb.rs, remove the line crate::aliveness::work(self);
  • to make pa5 work, first make pa4 work, then in driver/src/lib.rs, change the line let asm = FuncGen::work(&fu, &tp, codegen::AllocMethod::Graph); to let asm = FuncGen::work(&fu, &tp, codegen::AllocMethod::Brute);

Of course the fallback code won't have exactly the same functionality as the code we expect you to implement, but as least they can make the compiler working.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].