Commit Graph

1356 Commits

Author SHA1 Message Date
Brian Anderson
7fb1a4e2d1 Camel case core::intrinsic 2012-09-02 15:19:52 -07:00
Brian Anderson
80c4f74c29 Remove the 'to' keyword 2012-09-01 18:38:18 -07:00
Brian Anderson
d777e51333 Demode reinterpret_cast 2012-09-01 18:18:29 -07:00
Tim Chevalier
4128cc4cb4 Make utility funs in core::int, core::uint, etc. not by-reference
Closes #3302
2012-08-31 16:21:47 -07:00
Zack Corr
638db28c47 jit: Correct formatting and argv[0] for JITted programs 2012-08-31 16:20:36 -07:00
Zack Corr
efb576a60d jit: Clean rustllvm code, let rustc expose __morestack instead of linking in libmorestack and return _rust_main and call it from rustc 2012-08-31 16:20:36 -07:00
Brian Anderson
b999973c0f Add a morestack_addr (temporary) intrinsic 2012-08-31 16:20:36 -07:00
Zack Corr
a02ab41b65 jit: correct formatting 2012-08-31 16:20:36 -07:00
Zack Corr
19ea3ab480 jit: Add passes and cleanup code 2012-08-31 16:20:36 -07:00
Zack Corr
7993f48209 jit: Add custom memory manager (still segfaulting) 2012-08-31 16:20:35 -07:00
Zack Corr
d7aa9918ef Add experimental JIT compiler 2012-08-31 16:20:35 -07:00
Lindsey Kuper
6d8d258f35 Tag things that have to do with default methods with issue #2794. 2012-08-31 19:09:01 -04:00
Patrick Walton
5b4d5cee03 rustc: Make entire crates privileged scopes for the purposes of coherence 2012-08-31 15:14:15 -07:00
Kevin Cantu
7d57b4864a Remove deprecated modes from list.rs (and temporarily delete list::push) 2012-08-31 12:55:39 -07:00
Patrick Walton
6e7d5e1cbd rustc: Implement "use mod" 2012-08-31 11:20:50 -07:00
Patrick Walton
4846affedb rustc: "extern mod { ... }" should be written "extern { ... }" instead 2012-08-30 17:10:07 -07:00
Patrick Walton
1f056eda8e rustc: Make the compiler no longer ICE on unused foreign constants 2012-08-30 16:08:58 -07:00
Brian Anderson
65b05a6ce8 Bump version to 0.4 2012-08-30 14:05:59 -07:00
Patrick Walton
a1c11cab2d rustc: Make <=, >=, and > use traits as well 2012-08-29 19:23:15 -07:00
Patrick Walton
96534365c2 rustc: Make < and = into traits 2012-08-29 18:25:22 -07:00
Brian Anderson
c0c8d3aa8f core: Demode int/uint mods 2012-08-29 16:23:36 -07:00
Brian Anderson
ee2ce036cc Camel case more std types 2012-08-29 16:09:50 -07:00
Brian Anderson
aab4d6b8d7 std: Camel case some constructors 2012-08-29 15:34:38 -07:00
Brian Anderson
8aca44ee0c core: Don't normalize paths by default. Add a normalize method 2012-08-29 14:28:37 -07:00
Graydon Hoare
5eef15df12 Rename resolve3 -> resolve. 2012-08-29 13:26:52 -07:00
Tim Chevalier
cb8ecd7984 Allow extern mods to be anonymous
extern mod {
  f();
}

is now allowed, and puts f in the enclosing scope. (Requires a
link_name attribute to be really useful...)
2012-08-29 12:22:05 -07:00
Niko Matsakis
75201cdc04 vtable.rs: adjust formatting, correct build error 2012-08-29 06:07:17 -07:00
Niko Matsakis
e9ac7489b5 Refactor representation of borrowing so that it is tracked by fn_ctxt and not infer 2012-08-29 05:27:43 -07:00
Tim Chevalier
06675caa42 Comment the default case in typeck::check::vtable::lookup_vtable copiously
Try to save the next person who looks at this code the heartbreak that I
went through.
2012-08-28 19:51:11 -07:00
Tim Chevalier
a70e37b214 In ty::impl_traits, treat structs properly
Treat structs just like impls: use their associated list of
trait refs to get the list of traits that one of them implements.
I don't understand what was happening before, but it was wrong.

Closes #2936
2012-08-28 19:51:11 -07:00
Ben Striegel
a605fd0cad CamelCasify lots of std 2012-08-28 18:52:44 -07:00
Graydon Hoare
ecb646477b Add lint modes for uses of @ and ~ pointers, in general. 2012-08-28 18:25:41 -07:00
Graydon Hoare
b769e29680 Compress metadata section. Seems a minor speed win, major space win. 2012-08-28 14:50:39 -07:00
Elliott Slaughter
0031617f30 rustc: Add cfg(gc) and cfg(nogc).
Needed in libcore to determine whether core::gc is being compiled with
GC on or not, which then affects various safety checks to avoid
collecting memory the GC is itself using.
2012-08-28 11:05:32 -07:00
Brian Anderson
161a82e433 Camel case various core constructors 2012-08-27 17:22:18 -07:00
Graydon Hoare
88e0476bd0 Add some counters to metadata. 2012-08-27 16:59:30 -07:00
Brian Anderson
1cd97ee47d Mark intrinsic::tydesc with #[allow(non_camel_case_types)] 2012-08-27 15:06:46 -07:00
Brian Anderson
0c6e470a25 Convert core::result to camel case 2012-08-27 14:37:04 -07:00
Patrick Walton
3a1582012e libcore: Implement ord and eq language items 2012-08-27 14:27:43 -07:00
Patrick Walton
2bb056f4ab rustc: Avoid an allocation on every GEPi 2012-08-27 14:27:42 -07:00
Niko Matsakis
6d788198d7 fix a few remaining unused pattern binding warnings 2012-08-27 14:10:55 -07:00
Erick Tryzelaar
3e6ddf72ba rustc: make sure to import shr. 2012-08-27 14:10:55 -07:00
Erick Tryzelaar
ad19609dbc rustc: Fix typo in variant name 2012-08-27 14:10:55 -07:00
Erick Tryzelaar
c83ab4bcb8 rustc: import vstore_uniq 2012-08-27 14:10:55 -07:00
Erick Tryzelaar
65bd46c8a5 rustc: more pattern cleanup 2012-08-27 14:10:54 -07:00
Erick Tryzelaar
5ce5ee86bc rustc: fix the unused pattern vars warnings. 2012-08-27 14:10:54 -07:00
Elliott Slaughter
38fee9526a rustc: When landing pads are off, avoid skipping cleanup code.
This forces various things to be created (e.g. drop glue), and also
happens to be necessary for GC liveness to recognize cleanups as
roots.
2012-08-27 12:48:35 -07:00
Elliott Slaughter
5593add3a8 rustc: Break cyclical dependence between emit_tydescs and gen_shape_tables.
Force all tydescs to be emitted before emit_tydescs to avoid linker
failures.
2012-08-27 12:48:35 -07:00
Brian Anderson
8337fa1a54 Camel case the option type 2012-08-26 15:56:16 -07:00
Patrick Walton
62be878ed1 rustc: Use memmove in unsafe::reinterpret_cast (issue #3025).
This was causing a bunch of structural copies, which when inlined
was leading to enormous register pressure. Often this is seen in
code which makes use of result::unwrap.
2012-08-26 11:25:53 -07:00
Patrick Walton
ff9151fa55 rustc: Use memset when zeroing allocas out (issue #3025).
Previously, LLVM was generating a ton of byte-by-byte copies,
leading to huge numbers of vregs and bloating the code. Now, using
memset, the code becomes a nice series of SSE moves instead.
2012-08-26 10:50:06 -07:00
Patrick Walton
80429dd7bd rustc: Add some more debugging to vtable 2012-08-25 23:13:50 -07:00
Brian Anderson
09df8f1abf Fix more unused variable warnings 2012-08-25 18:38:21 -07:00
Patrick Walton
8ef4551904 rustc: Implement foreign constants.
This is needed for a lot of Apple libraries, as Apple tends to put a lot of
globals in dynamic libraries.
2012-08-25 15:09:33 -07:00
Tim Chevalier
33ba097069 Add backquotes to error message 2012-08-25 09:15:26 -07:00
Vincent Belliard
bdbedb9d35 implements issue #2356 2012-08-25 17:01:52 +02:00
Tim Chevalier
5e22fb9c7f Remove match check 2012-08-24 22:28:12 -07:00
Tim Chevalier
0dad78e03d Eliminate match checks in trans and typeck 2012-08-24 20:45:30 -07:00
Michael Sullivan
90812c143d Rework method lookup to properly handle self types for non impl matches. Closes #3268. Closes #3274. 2012-08-24 17:57:41 -07:00
Michael Sullivan
6a56212649 A bunch of code refactoring in method matching. 2012-08-24 17:57:41 -07:00
Michael Sullivan
cf62433f43 Comments only: fix a comment in method resolution. 2012-08-24 17:57:41 -07:00
Graydon Hoare
c284b8b1dc Start using core::path2::Path in a lot of places. 2012-08-24 15:51:16 -07:00
Niko Matsakis
a8f1bee457 fix some unused pattern binding warnings 2012-08-24 15:37:21 -07:00
Michael Sullivan
e55c5ceac2 Infer purity for || style closures. Closes #3023. 2012-08-24 14:21:27 -07:00
Michael Sullivan
2c96a43cf1 Get rid of the unsafe hacks in resolve3. Closes #3267. 2012-08-24 14:21:26 -07:00
Elliott Slaughter
7706262a73 rustc: Add flag for enabling GC. 2012-08-24 14:01:27 -07:00
Elliott Slaughter
30768d3609 rustc: Don't emit metadata for default and GC box addrspaces. 2012-08-24 14:01:27 -07:00
Elliott Slaughter
e68db3ad3c rustc: Fix for updated macro syntax. 2012-08-24 14:01:26 -07:00
Elliott Slaughter
a7a74c79fa rustc: Emit index of tydescs by addrspace. 2012-08-24 14:01:26 -07:00
Elliott Slaughter
c2e99ba826 rustc: Root resources with addrspaces. 2012-08-24 14:01:26 -07:00
Ben Blum
37bcd67a09 Enforce copyability in bind_by_value match arms (fix #3255) 2012-08-24 16:43:03 -04:00
Niko Matsakis
e47d2f6060 extend liveness to treat bindings more like other variables
This results in a lot of warnings in rustc.  I left them in because
many are bugs and we should fix our code, but Graydon asked that
I not touch every file in the codebase.
2012-08-24 12:55:08 -07:00
Michael Sullivan
0f996f70a6 Remove purity from fn_decl and move it out to containing AST elements. 2012-08-23 19:40:01 -07:00
Ben Blum
673d0d83cf Less confusing error message when copying into heap closures (close #2942) 2012-08-23 22:07:56 -04:00
Niko Matsakis
a08f3a7d4d More complete fix to #3162 (borrowck bug related to access to rec fields) 2012-08-23 18:54:08 -07:00
Niko Matsakis
5ccf8175a8 don't consider use of @fn to be region-param'd 2012-08-23 17:55:04 -07:00
Tim Chevalier
6b6bea9531 Add boolean constants as part of const_eval
Doesn't exactly eliminate a match check, but simplifies the logic a bit
2012-08-23 17:22:08 -07:00
Niko Matsakis
5eea7d6e61 don't infer region paramaterization for ids in a bound context 2012-08-23 16:22:23 -07:00
Tim Chevalier
9f591319dd Rename str::bytes to str::to_bytes
Closes #3245
2012-08-23 15:46:10 -07:00
Ben Blum
caceac06ce Remove old-moded atomic intrinsics (#3200) 2012-08-23 16:54:25 -04:00
Niko Matsakis
3cf74564b8 update liveness to camel-cased conventions, silence warnings 2012-08-23 12:38:18 -07:00
Paul Stansifer
29f32b4a72 m1!{...} -> m1!(...) 2012-08-23 11:14:14 -07:00
Michael Sullivan
0f0a9775ba Some error message cleanup in check.rs. 2012-08-23 10:21:35 -07:00
Ben Blum
5d5cfcc005 Merge pull request #3258 from erickt/serialization
Fixing serialization no-implicit-copies warnings, and other misc cleanup
2012-08-23 09:37:21 -07:00
Niko Matsakis
511e7626ae Infer variance of types with respect to the region parameter.
A similar approach could be used for type parameters.

Fixes #2282.
2012-08-23 06:30:43 -07:00
Tim Chevalier
c8ce32e7f4 Represent "item families" in the decoder as an enum
This eliminates some match checks. Also get rid of other match checks
in metadata code.
2012-08-22 20:32:09 -07:00
Erick Tryzelaar
cfa71a135b rustc: add all the pretty printer modes to error message 2012-08-22 19:10:28 -07:00
Brian Anderson
4ef1d9d5b5 rustc: Remove typestate source 2012-08-22 18:33:19 -07:00
Ben Blum
9f0b3e3164 remove a debug print statement moving out of enums 2012-08-22 21:16:34 -04:00
Tim Chevalier
f61bbe2709 Dead code elimination 2012-08-22 17:52:27 -07:00
Ben Blum
37962288ec Compile moving out of enums (#2329) 2012-08-22 20:40:25 -04:00
Ben Blum
5b25fc918a Parse and typecheck moving out of enums (#2329) 2012-08-22 20:40:25 -04:00
Tim Chevalier
1b804ce343 Merge find_linkage_attrs with find_linkage_metas
This gets rid of a gratuitous `match check`.
2012-08-22 16:43:23 -07:00
Paul Stansifer
1153b5dcc8 intern identifiers 2012-08-22 14:59:25 -07:00
Michael Sullivan
744fea1a4f Track the type of self properly. Closes #3247. 2012-08-22 13:18:29 -07:00
Tim Chevalier
7284969292 Eliminate many match checks in rustc 2012-08-22 12:25:08 -07:00
Niko Matsakis
ce3cc46ce6 Fix generation of generic methods with explicit self
There used to be two distinct code paths.  Now there is one.
2012-08-21 20:15:22 -07:00
Ben Blum
9b489f6fff Don't refute "()" in let-bindings (fixes #3104). 2012-08-21 21:05:01 -04:00
Ben Blum
f5332769d5 Convert atomic intrinsics away from old argument modes (partial #3200) 2012-08-21 15:30:53 -04:00
Niko Matsakis
9423302c82 remove trailing whitespace 2012-08-21 11:24:41 -07:00