rust/src
Felix S. Klock II aaf398f26a Graphviz based flow graph pretty-printing.
Passing `--pretty flowgraph=<NODEID>` makes rustc print a control flow graph.

In pratice, you will also need to pass the additional option:
`-o <FILE>` to emit output to a `.dot` file for graphviz.

(You can only print the flow-graph for a particular block in the AST.)

----

An interesting implementation detail is the way the code puts both the
node index (`cfg::CFGIndex`) and a reference to the payload
(`cfg::CFGNode`) into the single `Node` type that is used for
labelling and walking the graph.  I had once mistakenly thought that I
only wanted the `cfg::CFGNode`, but for labelling, you really want the
cfg index too, rather than e.g. trying to use the `ast::NodeId` as the
label (which breaks down e.g. due to `ast::DUMMY_NODE_ID`).

----

As a drive-by fix, I had to fix `rustc::middle::cfg::construct`
interface to reflect changes that have happened on the master branch
while I was getting this integrated into the compiler.  (The next
commit actually adds tests of the `--pretty flowgraph` functionality,
so that should ensure that the `rustc::middle::cfg` code does not go
stale again.)
2014-05-15 13:50:42 -07:00
..
compiler-rt@ed112ca1e4
compiletest auto merge of #13948 : huonw/rust/test-regex-filter, r=alexcrichton 2014-05-15 11:22:02 -07:00
doc Add a crate for missing stubs from libcore 2014-05-15 13:50:37 -07:00
driver
etc
gyp@1e46da1000
jemalloc@6a96910f2e
libarena
libbacktrace
libcollections
libcore Add a crate for missing stubs from libcore 2014-05-15 13:50:37 -07:00
libflate
libfmt_macros
libfourcc
libgetopts
libglob
libgraphviz
libgreen
libhexfloat
liblibc
liblog
libnative Make from_bits in bitflags! safe; add from_bits_truncate 2014-05-15 13:50:33 -07:00
libnum
librand
libregex
libregex_macros
librlibc Add a crate for missing stubs from libcore 2014-05-15 13:50:37 -07:00
librustc Graphviz based flow graph pretty-printing. 2014-05-15 13:50:42 -07:00
librustdoc rustdoc: functions in ffi blocks are unsafe 2014-05-15 13:50:28 -07:00
librustuv Make from_bits in bitflags! safe; add from_bits_truncate 2014-05-15 13:50:33 -07:00
libsemver
libserialize
libstd Add IntoMaybeOwned impl for StrBuf to ease conversion to MaybeOwned. 2014-05-15 13:50:42 -07:00
libsync auto merge of #14174 : stepancheg/rust/once, r=alexcrichton 2014-05-15 04:16:47 -07:00
libsyntax Add EntryPat and NodePat variants to ast_map. 2014-05-15 13:50:42 -07:00
libterm
libtest test: ensure that the extended usage description gets printed. 2014-05-15 23:04:09 +10:00
libtime
liburl
libuuid
libuv@43495892de
libworkcache
llvm@4b4d0533b4
rt
rustllvm Add a crate for missing stubs from libcore 2014-05-15 13:50:37 -07:00
test shootout-mandelbrot: Precalc initial values & use SIMD in the main loop. +80-100% 2014-05-15 13:50:39 -07:00
README.md
snapshots.txt Register new snapshots 2014-05-15 13:50:34 -07:00

This is a preliminary version of the Rust compiler, libraries and tools.

Source layout:

Path Description
librustc/ The self-hosted compiler
libstd/ The standard library (imported and linked by default)
libextra/ The "extras" library (slightly more peripheral code)
libgreen/ The M:N runtime library
libnative/ The 1:1 runtime library
libsyntax/ The Rust parser and pretty-printer
libcollections/ A collection of useful data structures and containers
libnum/ Extended number support library (complex, rational, etc)
libtest/ Rust's test-runner code
------------------- ---------------------------------------------------------
libarena/ The arena (a fast but limited) memory allocator
libflate/ Simple compression library
libfourcc/ Data format identifier library
libgetopts/ Get command-line-options library
libglob/ Unix glob patterns library
libregex/ Regular expressions
libsemver/ Rust's semantic versioning library
libserialize/ Encode-Decode types library
libsync/ Concurrency mechanisms and primitives
libterm/ ANSI color library for terminals
libtime/ Time operations library
libuuid/ UUID's handling code
------------------- ---------------------------------------------------------
rt/ The runtime system
rt/rust_*.c - Some of the runtime services
rt/vg - Valgrind headers
rt/msvc - MSVC support
rt/sundown - The Markdown library used by rustdoc
------------------- ---------------------------------------------------------
compiletest/ The test runner
test/ Testsuite
test/codegen - Tests for the LLVM IR infrastructure
test/compile-fail - Tests that should fail to compile
test/debug-info - Tests for the debuginfo tool
test/run-fail - Tests that should compile, run and fail
test/run-make - Tests that depend on a Makefile infrastructure
test/run-pass - Tests that should compile, run and succeed
test/bench - Benchmarks and miscellaneous
test/pretty - Pretty-printer tests
test/auxiliary - Dependencies of tests
------------------- ---------------------------------------------------------
librustdoc/ The Rust API documentation tool
libuv/ The libuv submodule
librustuv/ Rust libuv support code
------------------- ---------------------------------------------------------
llvm/ The LLVM submodule
rustllvm/ LLVM support code
------------------- ---------------------------------------------------------
etc/ Scripts, editors support, misc

NOTE: This list (especially the second part of the table which contains modules and libraries) is highly volatile and subject to change.