rust/src
Björn Steinbrink 765a2901d5 Avoid double indirection for the "self" arg in methods
Currently we pass all "self" arguments by reference, for the pointer
variants this means that we end up with double indirection which causes
a unnecessary performance hit.

The fix itself is pretty straight-forward and just means that "self"
needs to be handled like any other argument, except for by-value "self"
which still needs to be passed by reference. This is because
non-pointer types can't just be stuffed into the environment slot which
is used to pass "self".

What made things tricky is that there was also a bug in the typechecker
where the method map entries are created. For type impls, that stored
the base type instead of the actual self-type in the method map, e.g.
Foo instead of &Foo for &self. That worked with pass-by-reference, but
fails with pass-by-value which needs the real type.

Code that makes use of methods seems to be about 10% faster with this
change. Also, build times are reduced by about 4%.

Fixes #4355, #4402, #5280, #4406 and #7285
2013-06-29 19:27:40 +02:00
..
compiletest librustc: Remove the broken overloaded assign-ops from the language. 2013-06-28 10:44:16 -04:00
driver Remove the fuzzer 2013-06-15 16:12:56 -07:00
etc fix zsh completion for lint and debug flags 2013-06-29 00:58:24 -04:00
libextra 'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep for making them noncopyable. 2013-06-29 04:39:34 -04:00
librust Make librust satisfy noncopyable stack closures 2013-06-29 04:39:37 -04:00
librustc Avoid double indirection for the "self" arg in methods 2013-06-29 19:27:40 +02:00
librustdoc librustc: Remove the broken overloaded assign-ops from the language. 2013-06-28 10:44:16 -04:00
librusti librustc: Fix merge fallout and test cases. 2013-06-28 10:44:17 -04:00
librustpkg auto merge of #7439 : catamorphism/rust/cut-rustpkg-output, r=catamorphism 2013-06-29 00:49:45 -07:00
libstd 'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep for making them noncopyable. 2013-06-29 04:39:34 -04:00
libsyntax 'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep for making them noncopyable. 2013-06-29 04:39:34 -04:00
libuv@dfae9c3e95 libsyntax: Fix more merge fallout. 2013-05-22 21:57:11 -07:00
llvm@2e9f0d21fe llvm: Unrevert change 2013-05-08 17:04:03 -07:00
rt auto merge of #7395 : yichoi/rust/android_dummy, r=brson 2013-06-27 03:07:31 -07:00
rustllvm rustc: Dispose of LLVM passes in test cases 2013-06-19 15:18:25 -07:00
test auto merge of #7363 : bblum/rust/soundness, r=nikomatsakis 2013-06-29 04:22:53 -07:00
README.txt Update doc references to new names for std, extra, and std::libc 2013-06-16 23:26:08 -07:00
snapshots.txt Update snapshots file 2013-06-25 16:43:58 +12:00

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

Source layout:

librustc/          The self-hosted compiler

libstd/            The standard library (imported and linked by default)
libextra/          The "extras" library (slightly more peripheral code)
libsyntax/         The Rust parser and pretty-printer

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            - Concurrency utils
rt/util            - Small utility classes for the runtime.
rt/vg              - Valgrind headers
rt/msvc            - MSVC support
rt/linenoise       - a readline-like line editing library

test/              Testsuite
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
test/pretty        - Pretty-printer tests
test/auxiliary     - Dependencies of tests

compiletest/       The test runner

librustpkg/        The package manager and build system

librusti/          The JIT REPL

librustdoc/        The Rust API documentation tool

llvm/              The LLVM submodule

libuv/             The libuv submodule

rustllvm/          LLVM support code

libfuzzer/         A collection of fuzz testers

etc/               Scripts, editor support, misc