소개
Cross platform C preprocessor and compiler.
프로그래밍 언어 및 런타임측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original{ "Minimalist", "C", "Compiler"}; /* WIP */

Artwork by Egon Elbre based on the Go gopher by Renee French
Goals
- Aggressive removal of cruft.
- Fast.
- Simple.
Status
NOT UNDER DEVELOPMENT
This compiler has been ported to C here https://github.com/andrewchambers/c where development continues. This was done to allow self hosting far earlier, increase speed, increase portability, and decrease binary size. Interestingly, the C version is less lines of code too.
Building
go get github.com/andrewchambers/cc/cmd/x64cc
Contact
Hacking
The code is heavily inspired by https://github.com/rui314/8cc as well as http://bellard.org/tcc/. I recommend studying the source code of 8cc before contributing here, as 8cc is currently far more mature.
- The compiler is implemented in Go.
- The compiler currenty does no optimization, this is intentional.
- Contributions to this project are welcome, I will respond on gitter or via email.
Bugs
Yes.
When the compiler is more mature, we can do automatic bug hunting using the following resources:
- https://embed.cs.utah.edu/csmith/ (https://github.com/csmith-project/csmith)
- https://github.com/gcc-mirror/gcc/tree/master/gcc/testsuite/gcc.c-torture
- https://github.com/rui314/8cc/tree/master/test
The bugs can then be automatically reduced to minimal form using http://embed.cs.utah.edu/creduce/ (https://github.com/csmith-project/creduce).
Ideas
- Concurrency using goroutines - C can be compiled a function at a time, so there is a lot of room for this.
- Compile toolchain to javascript using Gopherjs, make a demo site.
- Implement a companion Go -> C compiler, then compile ourselves with it.
- Allow preprocessor include paths from archives to allow sdk's to be packaged as a single binary + archive.
- Implement a backend that is similar to llvm, expose this as a library for other language frontends.
- A companion assembler/linker to remove the dependence on binutils.
- An SSA optimizing backend.
- Compilation of Go1.4 so we can bootstrap ourselves.
관련 프로젝트 살펴보기
불러오는 중…