Giter VIP home page Giter VIP logo

indigo's Introduction

Indigo

Indigo is a compiler for a C-like toy language (named "SysY") into ARMv7a assembly, written in C++ 17.

Building

Environment:

  • CMake and Make
  • GCC >= 9.2.0 or Clang > 8.0

Steps:

mkdir build && cd build
cmake .. && make -j8
./compiler -h    # for help information

Architecture

Testing

Environment:

  • Building environment
  • GCC
  • Clang (if you need to compare compiler speeds)
  • Python >= 3.7
    • Packages: colorlog, tqdm

Steps:

mkdir -p output

# Test against official functional tests
python3 scripts/test.py build/compiler \
    test_codes/sysyruntimelibrary/libsysy.a test_codes/functional_test -r
    
# Test against custom tests
python3 scripts/test.py build/compiler \
    test_codes/sysyruntimelibrary/libsysy.a test_codes/upload -r -t 90
    
# Test against performance tests
python3 scripts/test.py build/compiler \
    test_codes/sysyruntimelibrary/libsysy.a test_codes/performance_test -r -t 120 -z
    
# Compare performance with GCC and Clang, assuming all tests are passed
python3 scripts/speed_compare.py build/compiler \
    test_codes/sysyruntimelibrary/libsysy.a \
    test_codes/sysyruntimelibrary/stdlib.c \
    test_codes/performance_test -r -t 120

License

Copyright (c) 2020 SEGVIOL Team (Bo Zhao, Qi Teng, Ruichen He, Ziye Li).

This program is licensed under the GPLv3 license.

All files in the test_codes folder, except those in test_codes/upload, are official test cases written by the NSCSCC 2020 Committee. These files follow the license specified in the official test code repository.

indigo's People

Contributors

hyc2026 avatar leomiku avatar lynzrand avatar tqnwhz 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.