rust/src
Tim Chevalier 971b5d5151 Started adding support for return checking and non-returning function annotations
* Reorganized typestate into several modules.

* Made typestate check that any function with a non-nil return type
  returns a value. For now, the check is a warning and not an error
  (see next item).

* Added a "bot" type (prettyprinted as _|_), for constructs like be, ret, break, cont, and
  fail that don't locally return a value that can be inspected. "bot"
  is distinct from "nil". There is no concrete syntax for _|_, while
  the concrete syntax for the nil type is ().

* Added support to the parser for a ! annotation on functions whose
  result type is _|_. Such a function is required to have either a
  fail or a call to another ! function that is reached in all control
  flow paths. The point of this annotation is to mark functions like
  unimpl() and span_err(), so that an alt with a call to err() in one
  case isn't a false positive for the return-value checker. I haven't
  actually annotated anything with it yet.

* Random bugfixes:

* * Fixed bug in trans::trans_binary that was throwing away the
    cleanups for nested subexpressions of an and or or
    (tests: box-inside-if and box-inside-if2).

** In typeck, unify the expected type arguments of a tag with the
   actual specified arguments.
2011-05-16 16:59:25 -07:00
..
comp Started adding support for return checking and non-returning function annotations 2011-05-16 16:59:25 -07:00
etc Let the snapshot-file parser parse empty T lines, since they are used to start a transition. 2011-05-16 15:14:44 -07:00
fuzzer Change fuzzer to match new module standards 2011-05-12 22:45:55 -04:00
lib Make the parser more careful about keywords 2011-05-13 22:00:13 +02:00
rt rt: Don't overshoot the end of the logging spec during parsing 2011-05-13 23:22:29 -04:00
rustllvm rustllvm: Free TargetMachine in LLVMRustWriteOutputFile 2011-05-14 00:48:51 -04:00
test Started adding support for return checking and non-returning function annotations 2011-05-16 16:59:25 -07:00
README Remove rustboot from the repository. 2011-05-13 18:38:28 -07:00
run.py
snapshots.txt Register new snapshots for incompatible-syntax transition. 2011-05-12 13:03:05 -07:00

This is preliminary version of the Rust compiler(s).

Source layout:

comp/              The self-hosted compiler

rt/                The runtime system
rt/rust_*.cpp      - The majority of the runtime services
rt/isaac           - The PRNG used for pseudo-random choices in the runtime
rt/bigint          - The bigint library used for the 'big' type
rt/uthash          - Small hashtable-and-list library for C, used in runtime
rt/{sync,util}     - Small utility classes for the runtime.

test/              Testsuite (for both bootstrap and self-hosted)
test/compile-fail  - Tests that should fail to compile
test/run-fail      - Tests that should compile, run and fail
test/run-pass      - Tests that should compile, run and succeed
test/bench         - Benchmarks and miscellanea

Please be gentle, it's a work in progress.