Giter Site home page Giter Site logo

latte's Introduction

Implementation of a simple C-like language compiler in Rust

Polish documentation:

  1. Frontend: src/frontend.rs

  2. Backend: src/backend.rs użycie rejestrów i phi zamiast alloc: TAK

  3. Optymalizacje: Na frontendzie jest constant-folding (bez zaglądania do zmiennych), które jest tam używane do sprawdzenia return-ów oraz na backendzie do ominięcia trywialnych if-ów, typu if (5 > 3 || false) {...}. Dodatkowo użycie LLVM API do generacji kodu w postaci SSA de facto implikuje upraszczanie lokalnych wyrażeń, które dają się policzyć w czasie kompilacji (constant folding z zaglądaniem do zmiennych).

  4. Rozszerzenia: Jak narazie żadne.

Używane biblioteki:

Generacja parsera:
    lalrpop = "0.17.2"

Runtime parsera:
    lalrpop-util = "0.17.2"

Wyświetlanie komunikatów diagnostycznych:
    codespan-reporting = "0.6.0"
    codespan = "0.6.0"
    termcolor = "1.0.5"

Wrapper LLVM API:
    inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm6-0" }

latte's People

Watchers

Piotr Rybicki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.