Commit Graph

1280 Commits

Author SHA1 Message Date
Daniel Micay
d9c0f0f188 add memset32/memset64 2013-05-26 10:26:03 -04:00
Daniel Micay
cf8e9f9aec make the memcpy/memmove intrinsics higher-level
This allows them to make use of the type's alignment, instead of being
pessimistic and assuming it is only 1.
2013-05-26 10:26:03 -04:00
James Miller
2c2346e3d4 Mark &mut parameters as noalias 2013-05-26 17:40:07 +12:00
Alex Crichton
ac6c15aece Actually filter view_items in blocks 2013-05-24 17:31:15 -05:00
bors
ed9a793d24 auto merge of #6706 : brson/rust/glue, r=catamorphism
Instead of `glue_drop1234` it's `Type::<hash>::glue_drop1234`

Haven't done any performance testing.
2013-05-23 23:13:46 -07:00
bors
212d6a2f61 auto merge of #6710 : thestinger/rust/swap, r=catamorphism 2013-05-23 22:04:40 -07:00
Daniel Micay
a7f450ab22 indentation fix 2013-05-23 22:32:33 -04:00
Daniel Micay
7d2f836065 add memcpy intrinsic to mirror memmove 2013-05-23 22:29:30 -04:00
bors
a776d65b4d auto merge of #6690 : erickt/rust/cleanup-warnings, r=brson
Simple patch series to fix up all the warnings a rustc compile is giving at the moment. It also fixes a NOTE in `to_bytes.rs` to remove the `to_bytes::iter_bytes_<N>` functions.
2013-05-23 18:10:36 -07:00
Erick Tryzelaar
9635b30837 cleanup warnings from librustc 2013-05-23 17:57:07 -07:00
Erick Tryzelaar
1965d72957 core: remove iter_bytes helper functions 2013-05-23 17:48:16 -07:00
Brian Anderson
7f642f3d85 rustc: Give glue symbols meaningful names
Instead of `glue_drop1234` it's `Type::<hash>::glue_drop1234`

Haven't done any performance testing.
2013-05-23 17:01:45 -07:00
Brian Anderson
d213443a67 rustc: Check for null before dropping ~objects. #5192 2013-05-23 15:33:34 -07:00
Patrick Walton
18fca3e2e5 librustc: Add some missing use core::prelude::*; in the test cases 2013-05-22 21:57:12 -07:00
Patrick Walton
18df18c817 libstd: Fix merge fallout. 2013-05-22 21:57:11 -07:00
Patrick Walton
c10e0cb9c9 syntax: Change syntax extensions to expand to std::foo instead of core::foo 2013-05-22 21:57:08 -07:00
Patrick Walton
d5055f4e97 librustc: Make std_inject inject the name std, not core 2013-05-22 21:57:08 -07:00
Patrick Walton
c532e033c9 librustc: Change std to extra throughout libsyntax and librustc 2013-05-22 21:57:08 -07:00
Patrick Walton
f3723cf7c4 libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra 2013-05-22 21:57:07 -07:00
Patrick Walton
ebfc2b8e56 librustc: Rename core injection to std injection 2013-05-22 21:57:05 -07:00
Patrick Walton
565942b145 librustc: Fix privacy checking for cross-crate variants 2013-05-22 21:57:03 -07:00
Patrick Walton
211d038abc librustc: Make ~Trait two words by storing the type descriptor in the vtable. 2013-05-22 21:57:03 -07:00
Patrick Walton
08e561ae70 librustc: Disable borrow check debugging even when rustc is compiled with -O0.
This improves -O0 compile times dramatically.
2013-05-22 21:57:02 -07:00
Patrick Walton
ca9bb2d9ac librustc: Disallow use from reaching into impls or traits.
This can perhaps be restored in the future. For now this is a precursor to
making typedefs work as expected.
2013-05-22 21:57:02 -07:00
bors
1d3e84c5d6 auto merge of #6669 : yjh0502/rust/fix_6209, r=graydon
Fix issue #6209, and some related issues about constant expression
 - unmatched type between arms
 - unmatched type in range
2013-05-22 18:01:36 -07:00
Corey Richardson
e64339645b Implement static_assert attribute
This verifies that a static item evaluates to true, at compile time.
2013-05-22 13:13:24 -04:00
Jihyun Yu
f8af2b50ee fix issue #6209 2013-05-22 14:06:25 +09:00
Tim Chevalier
8c68c4a52c rustc: Don't generate code for unreachable expressions
The way we deal with unreachable expressions in trans is pretty ad hoc,
but this at least doesn't make it worse, and eliminates the LLVM
assertion failure reported in #5741.
2013-05-21 13:15:48 -07:00
bors
64963d6cba auto merge of #6611 : huonw/rust/syntax-ext-no-dup, r=jbclements
Fixes https://github.com/mozilla/rust/issues/6578 by merging the 3 different ways to build an AST into a single `AstBuilder` trait, creating a more uniform and briefer interface.

Also, converts the `ext_ctxt` trait-object to be a plain struct, as well as renaming it to `ExtCtxt`.

Seems to make expansion slightly faster for the normal case (e.g. `libcore` and `libstd`), but slower for `librustc` (slightly) and `libsyntax` (0.3s -> 0.8s! I'm investigating this, but I'd prefer this patch to land relatively quickly.).

`git blame` suggests maybe @graydon or @erickt are familiar with this area of the code. r?
2013-05-21 10:43:17 -07:00
Huon Wilson
4045da9f4f syntax/ext: modernise ext_ctxt to be CamelCase and use new. 2013-05-22 00:04:10 +10:00
bors
808aada1fb auto merge of #6654 : sanxiyn/rust/accurate-span-2, r=bstrie 2013-05-21 05:37:17 -07:00
Seo Sanghyeon
258d20ea84 Correct span for unused_import 2013-05-21 19:09:22 +09:00
bors
329d8e2622 auto merge of #6648 : alexcrichton/rust/issue-6633, r=graydon
Resolves #6633 and removes an unnecessary import in libcore
2013-05-21 01:04:16 -07:00
bors
5a3e320514 auto merge of #6647 : alexcrichton/rust/unnecessary-alloc, r=graydon
This adds a lint mode for detecting unnecessary allocations on the heap. This isn't super fancy, currently it only has two rules

1. For a function's arguments, if you allocate a `[~|@]str` literal, when the type of the argument is a `&str`, emit a warning.
2. For the same case, emit warnings for boxed vectors when slices are required.

After adding the lint, I rampaged through the libraries and removed all the unnecessary allocations I could find.
2013-05-20 23:55:20 -07:00
bors
d49a9dbc7f auto merge of #6646 : dotdash/rust/method_lookup, r=brson 2013-05-20 22:52:22 -07:00
bors
6c0a4693c9 auto merge of #6649 : brson/rust/atomic-load-align, r=graydon 2013-05-20 19:25:29 -07:00
bors
32e30aaa00 auto merge of #6576 : nikomatsakis/rust/issue-5362-tuple-indices, r=graydon
r? @pcwalton
2013-05-20 18:04:39 -07:00
Brian Anderson
474d9983be rustllvm: Use target alignment for atomic load/store 2013-05-20 17:28:06 -07:00
Alex Crichton
82fa0018c8 Remove all unnecessary allocations (as flagged by lint) 2013-05-20 16:10:40 -05:00
Alex Crichton
074799b4c5 Implement a lint mode to detect unnecessary allocations 2013-05-20 16:08:50 -05:00
Alex Crichton
15f97acdc8 Correctly track the source of imports with the same name 2013-05-20 13:02:08 -05:00
Björn Steinbrink
19dc72809d Optimize the lookup of traits containing a given method
Currently, trait_info is a hashmap that allows a quick lookup of all
methods contained in a given trait, but we actually only use it to
lookup traits that contain a given method. Adjusting the map to support
the lookup we actually need gives a nice speed boost, reducing the time
required for the resolution step for librustc from ~2.6s to ~1.0s on my
box.
2013-05-20 19:50:30 +02:00
Seo Sanghyeon
17dfebf883 Remove legacy_modes 2013-05-21 00:41:56 +09:00
bors
2e6cda254a auto merge of #6635 : brson/rust/snapshot, r=brson 2013-05-20 02:46:36 -07:00
bors
ab46a38039 auto merge of #6632 : steveklabnik/rust/remove_more_warnings, r=thestinger
With this, the build is almost 100% warning free.

One more can be fixed after the next snapshot, and there's one other that I filed an issue about already.
2013-05-20 01:37:39 -07:00
Brian Anderson
66319b0278 Register snapshots 2013-05-19 23:34:32 -07:00
Steve Klabnik
d3f70b141a Fix many warnings. 2013-05-19 21:32:32 -07:00
Corey Richardson
808c5b8d4e Test fixes, use LLVMConstFCmp in ConstFCmp 2013-05-19 22:09:32 -04:00
Corey Richardson
b97642758f Fix LLVMConst{I,F}Cmp 2013-05-19 22:09:32 -04:00
Corey Richardson
e42fcb958c Implement unimplemented const binops 2013-05-19 22:09:32 -04:00