| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
@catamorphism, this re-enables threadsafe rustpkg tests, @brson this will fail unless the bots have LLVM rebuilt, so this is a good indicator of whether that happened or not.
|
|
|
|
back::link::sanitize support escape_utf8
fix #7486
|
|
Check if there is duplicated field names in struct.
|
|
continued from #7495
|
|
|
|
|
|
Continuation of #7430.
I haven't removed the `map` method, since the replacement `v.iter().transform(f).collect::<~[SomeType]>()` is a little ridiculous at the moment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
With these changes, exchange allocator headers are never initialized, read or written to. Removing the header will now just involve updating the code in trans using an offset to only do it if the type contained is managed.
The only thing blocking removing the initialization of the last field in the header was ~fn since it uses it to store the dynamic size/types due to captures. I temporarily switched it to a `closure_exchange_alloc` lang item (it uses the same `exchange_free`) and #7496 is filed about removing that.
Since the `exchange_free` call is now inlined all over the codebase, I don't think we should have an assert for null. It doesn't currently ever happen, but it would be fine if we started generating code that did do it. The `exchange_free` function also had a comment declaring that it must not fail, but a regular assert would cause a failure. I also removed the atomic counter because valgrind can already find these leaks, and we have valgrind bots now.
Note that exchange free does not currently print an error an out-of-memory when it aborts, because our `io` code may allocate. We could probably get away with a `#[rust_stack]` call to a `stdio` function but it would be better to make a write system call.
|
|
this makes the exchange allocation header completely unused, and leaves
it uninitialized
|
|
the only user of the tydesc is ~fn, and it doesn't use this glue code
|
|
this is no longer used, exchange allocations do not set ref_count
|
|
this is never read anymore
|
|
|
|
This allows the integral paths to avoid allocations on the heap
Closes #4424, #4423
|
|
strings
|
|
is very common, and the replacement (.iter().transform().collect()) is very
ugly.
|
|
This allows for highlighting of function calls
for free floating, member, and static functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iterator adapators.
|
|
|
|
|
|
|
|
* stop using an atomic counter, this has a significant cost and
valgrind will already catch these leaks
* remove the extra layer of function calls
* remove the assert of non-null in free, freeing null is well defined
but throwing a failure from free will not be
* stop initializing the `prev`/`next` pointers
* abort on out-of-memory, failing won't necessarily work
|
|
603137c r=cmr
fe10db2 r=bstrie
|
|
I almost got locked out of my machine because I misunderstood the purpose of the function and called it with a limit of uint::max_value, which turned this function into an almost endless loop.
|
|
Also contains a fix to help ctag pick up macro definitions.
|
|
|
|
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
|
|
* hide the rustrt module in the docs
* remove the useless `traits` module wrapping the `Add` impl
|
|
|
|
|
|
adjust run.rs test for android to pass check std
|
|
This removes usage of `&const` throughout the standard libraries/compiler, and it removes some extraneous fields in the AST now that unique boxes always inherit their mutability.
|
|
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
|
|
The code that tried to revoke the cleanup for the self argument tried
to use "llself" to do so, but the cleanup might actually be registered
with a different ValueRef due to e.g. casting. Currently, this is
worked around by early revocation of the cleanup for self in
trans_self_arg.
To handle this correctly, we have to put the ValueRef for the cleanup
into the MethodData, so trans_call_inner can use it to revoke the
cleanup when it's actually supposed to.
|