Commit Graph

38 Commits

Author SHA1 Message Date
Graydon Hoare
fa6c68a025 Set no-unwind attribute on all upcalls other than fail. 2012-04-25 17:19:36 -07:00
Graydon Hoare
82727b926f Get explicit unique estrs working. 2012-04-16 16:17:51 -07:00
Brian Anderson
f466a2fa8f rustc: -L also indicates the location of native libraries
-L currently specifies paths to search for Rust crates

Building crates that use native libraries is difficult. When the
library is located somewhere unexpected there is no way
to tell rustc additional paths to look in.

If libclang is located at `.` then rustc is not going to
know that and linking will fail.

To get around that I often end up inserting

    #[link_args = "-L."] native mod m { }

into other crates to get them to build.

Now you just `rustc -L .` and it builds.

This doesn't do any rpathing so it's still up to somebody else
to put the library somewhere it will be found or use LD_LIBRARY_PATH

This feature comes with a single, XFAILed test, because I could
not think of a way to test it. Odd.
2012-04-16 12:33:21 -07:00
Brian Anderson
979a225598 rustc: Don't hardcode -lm
It does not appear to serve a purpose
2012-04-13 22:35:01 -07:00
Brian Anderson
a6e748a1d9 rustc: Hash the CMH into symbol names 2012-04-07 17:50:49 -07:00
Brian Anderson
d9070b4751 rustc: Append the crate version to symbols 2012-04-07 17:39:55 -07:00
Brian Anderson
19b7a7d803 Revert "Mangle exported names using node IDs rather than types"
This reverts commit c83d61de93.
2012-04-07 17:29:06 -07:00
Marijn Haverbeke
c902eafa14 Convert old-style for loops to new-style
Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.

(This hack will go away soon.)

Issue #1619
2012-04-06 20:38:23 +02:00
Tim Chevalier
c83d61de93 Mangle exported names using node IDs rather than types
Use node IDs rather than types to ensure exported names are unique.
duplicate symbol. Closes #2074.
2012-04-05 18:22:53 -07:00
Graydon Hoare
28a0e9c999 Construct new strings through upcalls. 2012-04-02 17:38:06 -07:00
Brian Anderson
0e87039348 rustc: Remove the rustsyntax::attr wrapper in front 2012-03-29 14:42:31 -07:00
Brian Anderson
ce216a5533 rustc: Remove the session dependency from front::attr 2012-03-29 14:42:30 -07:00
Marijn Haverbeke
1b81c5112a Remove last vestiges of old-style intrinsics
Closes #2048
2012-03-23 16:08:01 +01:00
Marijn Haverbeke
683085b3f0 Stop trying to link intrinsics.bc 2012-03-23 12:57:37 +01:00
Marijn Haverbeke
52d618a99a Revert removal of intrinsics
Oops. We can't do this yet until the next snapshot.
2012-03-23 12:51:20 +01:00
Marijn Haverbeke
f5024692d4 Remove support for the old-style intrinsics
Closes #2042
Closes #1981
2012-03-23 12:21:55 +01:00
Niko Matsakis
b653a18416 add mut decls to rustc and make them mandatory 2012-03-21 21:04:14 -07:00
Graydon Hoare
8e911cbd65 Work on fixing name mangling. 2012-03-20 15:16:12 -07:00
Graydon Hoare
b994b17be8 Remove object file directly rather than running "rm". Close #1778 also. 2012-03-20 12:39:40 -07:00
Brian Anderson
20417ebf31 core: Move unsafe conversions to str::unsafe 2012-03-19 15:47:52 -07:00
Graydon Hoare
869b2d7064 Send string concatenation to specialized upcall, shave 17s off librustc compile time. 2012-03-19 14:29:39 -07:00
Marijn Haverbeke
22bef74b55 Remove shared tydescs
All tydescs are static now, there's no need to worry about
marshalling them between threads anymore.
2012-03-16 15:38:42 +01:00
Marijn Haverbeke
146b61189a Get rid of rust_crate_cache in the runtime
We are no longer generating dynamic tydescs or dicts.

Issue #1982
2012-03-16 00:44:06 +01:00
Marijn Haverbeke
c3a93ecd3f Remove dynastack code from compiler 2012-03-15 15:08:30 +01:00
Marijn Haverbeke
83c9f58534 Rename dict to vtable throughout the compiler
The difference went away.
2012-03-15 09:28:50 +01:00
Brian Anderson
2a293ed8b8 Convert *u8 native string users to *c_char 2012-03-14 18:20:14 -07:00
Brian Anderson
3a2df84d89 core: Rename str::from_cstr et. al to from_buf 2012-03-14 18:19:08 -07:00
Brian Anderson
3864d6d845 std: Rename the hashmap constructors to conform to new standards
Instead of using the new_ prefix just name them after their type
2012-03-14 18:19:08 -07:00
Patrick Walton
273c5e5f11 rustc: Lift the @ from the type definition of crate_ctxt into its uses
This will make it easier to convert crate_ctxt into a region pointer, since
there are functions that return crate contexts. There would be no way to type
these functions if crate_ctxt had to be an inferred region pointer.
2012-03-14 17:31:16 -07:00
Graydon Hoare
6f5853f5a1 Libc/os/run/rand/io reorganization. Close #1373. Close #1638.
- Move io, run and rand to core.
 - Remove incorrect ctypes module (use libc).
 - Remove os-specific modules for os and fs.
 - Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Brian Anderson
91e5a1c8b3 core: Remove the nearly empty math module
This mod only had two functions, all of whose users have been changed
to use the uint module.
2012-03-10 17:43:19 -08:00
Tim Chevalier
d048a00cf3 Change util::unreachable to core::unreachable
Closes #1931
2012-03-08 14:30:01 -08:00
Patrick Walton
c9375fed8d stdlib: Stop incurring vtable dispatch costs when hashmaps are used
This required changing almost all users of hashmaps to import the hashmap interface first.

The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07 17:35:13 -08:00
Patrick Walton
c245d9e980 Revert "stdlib: Stop incurring vtable dispatch costs when hashmaps are used"
This reverts commit f0250a23d3.
2012-03-07 16:56:45 -08:00
Patrick Walton
f0250a23d3 stdlib: Stop incurring vtable dispatch costs when hashmaps are used
This required changing almost all users of hashmaps to import the hashmap interface first.

The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07 16:51:31 -08:00
Brian Anderson
b32e09172c rustc: Make llvm_err non-returning 2012-03-05 18:16:15 -08:00
Brian Anderson
0ee96de4ee rustc: Lower case error messages 2012-03-05 17:05:20 -08:00
Graydon Hoare
87c14f1e3d Move src/comp to src/rustc 2012-03-02 18:46:13 -08:00