David Rajchenbach-Teller
7faed3d87c
[Fix] float.rs: str_to_float reimplemented
2011-10-12 10:56:05 +02:00
David Rajchenbach-Teller
3219c40e18
[Optim] int.rs: reimplemented pow with fast exponentiation
2011-10-12 10:56:05 +02:00
Lindsey Kuper
0d43e90172
Revert "Merge pull request #1025 from elly/master"
...
This reverts commit e12e76e9ba
, reversing
changes made to f480203fdd
.
2011-10-11 22:23:47 -04:00
Lindsey Kuper
813c2eb369
Revert "Revert "Add a test case for #898 . Closes #898.""
...
This reverts commit e305ab3851
.
Oops again. Reverting a mistaken revert.
2011-10-11 22:03:23 -04:00
Lindsey Kuper
e305ab3851
Revert "Add a test case for #898 . Closes #898."
...
This reverts commit f480203fdd
.
Oops. This patch requires people to bump their LLVM version.
2011-10-11 22:00:17 -04:00
Elly Jones
19eae0bc38
Update LinkModules invocation to use new prototype
...
LLVM revision 141606 changes the prototype of llvm::Linker::LinkModules.
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-10-11 21:32:34 -04:00
Brian Anderson
f480203fdd
Add a test case for #898 . Closes #898 .
...
Seems to have been fixed.
2011-10-11 16:50:50 -07:00
Brian Anderson
55379a97d4
Use the correct function type for external bare functions
...
Issue #1022
2011-10-11 15:12:49 -07:00
Brian Anderson
d8fb86d2e3
Register snapshots
2011-10-11 15:01:27 -07:00
Brian Anderson
cfa2346086
Use a non-ambiguous character for encoding bare functions
...
I was using 'R' and that was already used for records.
Issue #1022
2011-10-11 14:38:15 -07:00
Brian Anderson
8c77d063a9
Add a test for assignment of bare functions
...
Issue #1022
2011-10-11 13:40:31 -07:00
Brian Anderson
b04f84275a
Add a test that bare functions are word-sized
...
Issue #1022
2011-10-11 13:40:28 -07:00
Brian Anderson
90c2402089
Add a test that uses a hypothetical bare-fn spawn signature
...
Issue #1022
2011-10-11 12:10:56 -07:00
Brian Anderson
1b0f1f0b79
Remove the environment argument from bare functions
...
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
84e98f4f65
Add a test for higher-order bare functions
...
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
145feb3298
Add a test for binding bare functions
...
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
5b0f79b75a
Don't allow bind to produce bare functions
...
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
b277039325
Introduce ast::proto_bare
...
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
9c46cc58cb
Add a temporary syntax for bare functions
...
Bare functions will be represented as 'fn#' until they're implemented. Then
we'll switch it over to just 'fn'.
Issue #1022
2011-10-11 10:51:09 -07:00
David Rajchenbach-Teller
2ec85135e2
[Move] Moved str_to_float, float_to_str from compiler to lib
2011-10-11 16:41:34 +02:00
Marijn Haverbeke
33167f7dec
Adjust function signatures to allow for vecs being immediate
...
Some code was relying on vectors being implicitly by-reference (as
non-immediate value). This adds the necessary &&-sigils.
Closes #1021
2011-10-10 16:01:51 +02:00
Marijn Haverbeke
b4bae8fea5
Make vectors and strings immediates again
...
There's no good reason to force them to be spilled anymore. Some
pieces of trans become more elegant this way, and less stack allocs
and load/stores are needed.
Issue #1021
2011-10-10 15:59:16 +02:00
Marijn Haverbeke
5c53959f20
Make bcx_tcx-style accessors return by reference
2011-10-10 12:25:58 +02:00
Marijn Haverbeke
00daeb485c
Move type_is_immediate into ty.rs
2011-10-10 12:23:58 +02:00
Marijn Haverbeke
a35dbf3fd5
Don't spill immediates in order to drop them
...
Issue #1012
2011-10-10 12:20:28 +02:00
Marijn Haverbeke
fa1295343f
Make free glue take a pointer to the heap part (box)
...
This way, it can be used to drop values without first spilling them.
Issue #1012
2011-10-10 10:25:32 +02:00
Brian Anderson
96f6a1861c
Revert "Revert "Stop using (DY)LD_LIBRARY_PATH on Unix""
...
This reverts commit 941d5e737c
.
2011-10-09 15:23:41 -07:00
Brian Anderson
ecfa37d336
Register snapshots
2011-10-09 15:23:34 -07:00
Brian Anderson
941d5e737c
Revert "Stop using (DY)LD_LIBRARY_PATH on Unix"
...
This reverts commit 4b58071f96
.
2011-10-09 15:05:12 -07:00
Marijn Haverbeke
aff536ec0e
Fix bad float-type detection in trans
...
Closes #1017
2011-10-09 10:07:10 +02:00
Brian Anderson
79e9f7a015
Make windows package uninstallable
2011-10-07 14:09:29 -07:00
Brian Anderson
fed56b07ba
Make windows packaging work again
2011-10-07 13:48:20 -07:00
Marijn Haverbeke
1efe5f0577
Fix up test for last commit
2011-10-07 16:58:27 +02:00
Marijn Haverbeke
f26e770745
Make 1-1 parse again
...
Issue #954
This is not a very elegant fix -- we should probably do something with
constant folding to handle negative-int alt patterns in the future.
2011-10-07 16:46:44 +02:00
Marijn Haverbeke
c7eee8fb05
Stop registering cleanups for types that don't need them
2011-10-07 14:46:23 +02:00
Marijn Haverbeke
31586339b1
Make it possible to have locals that don't live on the stack
...
Local values that are not mutated, don't need to be cleaned up, and
are immediate, don't need to be spilled. (All immediate args, and
non-pointer immediate let locals.)
2011-10-07 14:43:19 +02:00
Marijn Haverbeke
7586082bb0
Add tests for programs that are invalid by arg-passing-style
...
Closes #1008
2011-10-07 10:41:40 +02:00
Marijn Haverbeke
8db71530f5
Forbid passing dynamically-sized types by value
...
Issue #1008
2011-10-07 10:41:40 +02:00
Marijn Haverbeke
2ff89469d4
Actually pass parameters specified as by-val by value
...
Issue #1008
2011-10-07 10:41:40 +02:00
Marijn Haverbeke
41528dc543
Add pass-by-ref annotation to the tests to make them typecheck
...
Issue #1008
2011-10-07 10:41:39 +02:00
Marijn Haverbeke
fe916fb9f0
Give up on providing a by-value version of map, convert fold over to
...
passing pointers by ref
Issue #1008
2011-10-07 09:56:12 +02:00
Marijn Haverbeke
f9fbd86f52
Parse and typecheck by-value and by-ref arg specs
...
Add sprinkle && throughout the compiler to make it typecheck again.
Issue #1008
2011-10-07 09:09:50 +02:00
Brian Anderson
ed5a962d6f
Hopefully make test_prefix_rpath_abs work on win32
2011-10-06 16:39:34 -07:00
Brian Anderson
831d861d84
Mac uses @executable_path instead of $ORIGIN
2011-10-06 16:26:32 -07:00
Brian Anderson
5cd6dbd5b9
Always use an absolute path for the backup install prefix rpath
2011-10-06 16:12:45 -07:00
Brian Anderson
04e89af6db
Add std::str::contains
2011-10-06 16:08:44 -07:00
Brian Anderson
4b58071f96
Stop using (DY)LD_LIBRARY_PATH on Unix
2011-10-06 15:23:20 -07:00
Brian Anderson
a1e4ab3e38
Register snapshots
2011-10-06 15:11:30 -07:00
Brian Anderson
e4068f6715
Mac doesn't seem to support rpath $ORIGIN
2011-10-06 14:29:03 -07:00
Brian Anderson
06087e67e1
Configure out rpath tests when not testing
2011-10-06 13:29:36 -07:00
Brian Anderson
4b9e572044
Remove an unnecessary linking flag. Add comments about linking
2011-10-06 13:16:16 -07:00
Brian Anderson
062ba22d99
rpathing is based on the target, not host OS
2011-10-06 13:12:11 -07:00
Brian Anderson
d8a85f0758
Make rpath work on mac
2011-10-06 13:09:00 -07:00
Marijn Haverbeke
9c037d2194
Revert "rustc: Add a workaround for a segfault with --time-passes (issue #1005 )."
...
This reverts commit 100e0264b2
.
2011-10-06 16:12:47 +02:00
Marijn Haverbeke
8ee017add4
Register new snapshot
2011-10-06 10:56:07 +02:00
Marijn Haverbeke
6a4270523e
Ignore && and + before argument names.
...
Issue #1008
2011-10-06 10:16:52 +02:00
Marijn Haverbeke
39b468e17a
Fix problem with polymorphic return value being instantiated as nil
...
Closes #1005
2011-10-06 09:40:56 +02:00
Brian Anderson
e6d7b0cff3
Register snapshots
2011-10-05 18:15:45 -07:00
Patrick Walton
8d8b48a901
rt: Make C stack switching Valgrind-clean by warning Valgrind when we're about to write to the C stack from the Rust stack
2011-10-05 16:33:17 -07:00
Patrick Walton
cf3e7f2f0b
stdlib: Add a void type
2011-10-05 16:33:17 -07:00
Brian Anderson
00a81a22a8
Add more valgrind suppressions for __libc_freeres
...
Somehow these started showing up on the tinderbox
2011-10-05 16:21:56 -07:00
Brian Anderson
8215ffc822
rpath all the things!
2011-10-05 16:21:56 -07:00
Brian Anderson
ee8e058004
Add a FIXME about test exports to rustc: 🔙 :rpath
2011-10-05 16:21:56 -07:00
Brian Anderson
2f340a4d3d
rpath the path to the runtime
...
We don't currently rpath native libs, but we do know where rustrt is
located and everything needs to link to it.
2011-10-05 16:21:55 -07:00
Brian Anderson
3d5471f6ab
Fix some remaining rpath bugs
2011-10-05 16:21:55 -07:00
Brian Anderson
82ef8519c3
Fix some path handling in std::fs on win32
2011-10-05 16:21:55 -07:00
Brian Anderson
8b4601e08e
Figure out the relative path from output to each crate
2011-10-05 16:21:55 -07:00
Brian Anderson
19ba9b4d8d
Begin work on rpath
2011-10-05 16:21:55 -07:00
Niko Matsakis
61c9c46d94
remove pthread_exit() from rust_start()
...
It was causing OS X Lion to hang and (according to Apple) is undefined
in any case
2011-10-05 16:10:36 -07:00
Patrick Walton
100e0264b2
rustc: Add a workaround for a segfault with --time-passes (issue #1005 ).
2011-10-05 14:35:30 -07:00
Marijn Haverbeke
142f63fe78
Tie up the last ends in destination-passing-conversion
...
Closes #667
2011-10-05 12:23:18 +02:00
Marijn Haverbeke
3bc3f96138
Make trans_lval lval-only
...
Call trans_temp_lval if you want the old fallback-to-temporary behaviour.
Issue #667
2011-10-05 11:51:41 +02:00
Marijn Haverbeke
2cc0008ec0
Add trans_temp_expr for what used to be trans_expr, rename t_e_dps to trans_expr
...
Issue #667
2011-10-05 11:26:27 +02:00
Marijn Haverbeke
975ac55b3d
Lose the by_ref destination style
...
It's not needed.
Issue #667
2011-10-05 10:41:30 +02:00
Marijn Haverbeke
babd1ff3c7
Revert "Revert "Reorganize translation of expr_field""
...
This reverts commit 11e407aaa9
.
2011-10-05 10:21:57 +02:00
Marijn Haverbeke
c33e61e75c
Revert "Revert "Get rid of 'overwrite' destination kind""
...
This reverts commit ce9e0fc94f
.
2011-10-05 10:21:48 +02:00
Marijn Haverbeke
062aa3272c
Revert "Revert "Move trans_call to destination_passing style""
...
This reverts commit 276dfc6133
.
2011-10-05 10:21:40 +02:00
Brian Anderson
1f2e999262
Use std::os::get_exe_path to determine sysroot
2011-10-04 21:35:06 -07:00
Brian Anderson
1391154b14
Use util::filesearch to locate intrinsics.bc and main.o
2011-10-04 21:35:06 -07:00
Brian Anderson
ebcc76d68d
Move the library search into util::filesearch
2011-10-04 21:35:06 -07:00
Brian Anderson
b25e78524c
Fix some comment drift
2011-10-04 21:35:06 -07:00
Brian Anderson
33ee73102d
Remove some redundancy in metadata::creader
2011-10-04 21:35:06 -07:00
Brian Anderson
d91b7b61ef
Encapsulate current sysroot and lib path handling into util::filesearch
2011-10-04 21:35:06 -07:00
Brian Anderson
a8ce543dc9
Add std::os::get_exe_path
...
Need this to correctly determine sysroot in rustc
2011-10-04 21:35:06 -07:00
Brian Anderson
a0a4d34e14
Add std::ctypes
2011-10-04 21:35:06 -07:00
Brian Anderson
2124839cd7
Hide unused variable warnings in stdtest::treemap
2011-10-04 21:35:06 -07:00
Brian Anderson
6f5a0c7500
Add std::fs::normalize
2011-10-04 21:22:03 -07:00
Brian Anderson
51ae30287b
Add std::fs::split
2011-10-04 20:18:04 -07:00
Patrick Walton
0e5ea4d64f
Revert "stdlib: Migrate rust_file_is_dir() over to the C stack, and add a void type" due to build bustage on Windows
...
This reverts commit 9698ef89a0
.
2011-10-04 18:24:30 -07:00
Patrick Walton
9698ef89a0
stdlib: Migrate rust_file_is_dir() over to the C stack, and add a void type
2011-10-04 18:20:22 -07:00
Patrick Walton
990233eb3d
rustc: Allow calling native functions on the C stack that take generic arguments. They get turned into i8 pointers.
2011-10-04 17:41:57 -07:00
Patrick Walton
276dfc6133
Revert "Move trans_call to destination_passing style"
...
This reverts commit 6e56ec0066
.
2011-10-04 17:05:35 -07:00
Patrick Walton
ce9e0fc94f
Revert "Get rid of 'overwrite' destination kind"
...
This reverts commit 6e652588bf
.
2011-10-04 17:05:27 -07:00
Patrick Walton
11e407aaa9
Revert "Reorganize translation of expr_field"
...
This reverts commit 007ec666ad
.
2011-10-04 17:05:16 -07:00
Patrick Walton
af60cf407c
rt: Switch the AIO stuff to the C stack
2011-10-04 12:08:06 -07:00
Marijn Haverbeke
007ec666ad
Reorganize translation of expr_field
...
Issue #667
2011-10-04 17:52:23 +02:00
Marijn Haverbeke
6e652588bf
Get rid of 'overwrite' destination kind
...
It wasn't safe (computing the rval might invalidate the lval addr), and needlessly
complicating things (code was already building up intermediary results to work
around other unsafeties).
Issue #667
2011-10-04 17:52:23 +02:00
Marijn Haverbeke
6e56ec0066
Move trans_call to destination_passing style
...
Issue #667
The retptr passed to a function will now often be the actual
destination of the returned value (as in `{field1: func1()}`).
2011-10-04 17:41:34 +02:00
Patrick Walton
53c9b9a5dd
rt: Switch the libuv bindings over to not using explicit task pointers
2011-10-03 18:23:30 -07:00
Patrick Walton
3ad4fa00ac
rt: Fix comment typo in rust_uv.cpp
2011-10-03 18:23:30 -07:00
Patrick Walton
a7b44e847a
rt: Make the builtins no longer take an explicit task parameter
2011-10-03 18:23:30 -07:00
Brian Anderson
b5bb42acfb
XFAIL run-fail/linked-failure4. Deadlocks on mac
2011-10-03 14:46:52 -07:00
Patrick Walton
968b66ad40
rustc: Implement C stack stdcall
2011-10-03 13:59:38 -07:00
Brian Anderson
3a6f3cf275
Move compiletest to src/ and cleanup build rules
2011-10-02 17:28:59 -07:00
Haitao Li
e50371060b
rustc: Fix link error on Ubuntu Oneiric. Issue #903
2011-10-02 21:29:16 +08:00
Patrick Walton
42287d0fd3
rustc: Call LLVM on the C stack
2011-09-30 18:50:07 -07:00
Patrick Walton
4793a02376
rt: Omit leading underscore on symbol names on Linux
2011-09-30 18:50:05 -07:00
Patrick Walton
e9287e55cc
rustc: Stub a --stack-growth option; it's behind a flag for now because it requires patches to LLVM.
2011-09-30 18:21:39 -07:00
Brian Anderson
f525f6e94c
Register new snapshots
2011-09-30 18:03:54 -07:00
Brian Anderson
821dd6c02c
Change the directory for target libs
...
This pushes them down from stageN/lib/rustc/$(target) to
stageN/lib/rustc/$(target)/lib in order to make room for a target bin dir
2011-09-30 17:19:24 -07:00
Patrick Walton
c065280a0b
rustc: Remove some debug code
2011-09-30 14:26:06 -07:00
Patrick Walton
7ab0897ac6
rustc: Track link_args attributes on C stack cdecl natives as well
2011-09-30 14:25:10 -07:00
Patrick Walton
dcf0e807fb
trans: Use inttoptr as appropriate when casting return values of C stack functions
2011-09-30 12:07:50 -07:00
Brian Anderson
de6d07abf9
Register snapshots and finish filesystem reorg
2011-09-29 23:33:44 -07:00
Brian Anderson
80829af872
Remove legacy library search paths
2011-09-29 23:12:31 -07:00
Brian Anderson
b569e9c657
Update snapshot scripts for the new regime
2011-09-29 22:58:34 -07:00
Brian Anderson
196cc6de2e
Teach compiletest to construct the PATH variable correctly on win32
2011-09-29 22:58:34 -07:00
Brian Anderson
ab8338fb5a
Make rustc's host triple agree with the build system's
2011-09-29 22:58:33 -07:00
Brian Anderson
0148daa058
Reorganize structure of build directory
...
Each stage is organized more according to Unix standards and to
accommodate multiple target architectures.
stageN/
bin - rustc lives here
lib - libraries that rustc needs
lib/rustc/$(target_triple/ - target libraries
2011-09-29 22:58:33 -07:00
Patrick Walton
79e4961c7f
rustc: Remove some debug code
2011-09-29 18:53:00 -07:00
Patrick Walton
f9e3a604a6
rustc: Make the generic C stack function signature include a usable return value
2011-09-29 18:52:23 -07:00
Patrick Walton
5b6dbcb030
stdlib: Un-export str::buf; add a comment
2011-09-29 18:36:27 -07:00
Patrick Walton
3be6cf7ab2
vim: Add pure
to the list of keywords
2011-09-29 18:18:37 -07:00
Patrick Walton
dd7ff8dee4
stdlib: Export str::buf
2011-09-29 17:58:51 -07:00
Patrick Walton
a5b422fe6b
rustc: Translate calls on the C stack
2011-09-29 17:34:49 -07:00
Patrick Walton
f22601321f
rustc: Fix call signature for call_c_stack
2011-09-29 17:34:49 -07:00
Patrick Walton
e31849fb79
rt: Fix assembler for C calls to work more like a regular function call
2011-09-29 17:34:49 -07:00
Patrick Walton
6dece91ed3
stdlib: Add vec::eachi to the standard library
2011-09-29 17:34:49 -07:00
Patrick Walton
c04efec87f
rustc: Add upcall stubs for the new C stack upcalls
2011-09-29 17:34:49 -07:00
Patrick Walton
41ab324539
rustc: Generate types in trans for the C-stack native ABI
2011-09-29 17:34:49 -07:00
Marijn Haverbeke
e4436c3a5d
Don't build up results for ignored expressions.
...
Issue #667
2011-09-29 12:02:37 +02:00
Marijn Haverbeke
d74a7a83d7
Fail with an informative error when trying to bind a method
...
Issue #435
2011-09-29 11:55:29 +02:00
Marijn Haverbeke
d243ea57f5
Move last remaining expression types out of trans_expr
...
Issue #667
2011-09-29 11:41:45 +02:00
Marijn Haverbeke
f089f533e8
Move expr_cast and expr_copy to DPS style
...
Issue #667
2011-09-29 10:46:49 +02:00
Marijn Haverbeke
d946e09a72
Move closure construction over to DPS style
...
Issue #667
2011-09-29 10:36:40 +02:00
Marijn Haverbeke
508c48ce10
Reduce move ops to a construct-in-place when possible
2011-09-29 10:36:40 +02:00
Brian Anderson
15e34deba3
Eliminate glue.o. Closes #990
2011-09-28 15:35:21 -07:00
Brian Anderson
e1ba559c03
Test cases for #985
...
Other restrictions on pinned kinds happened to fix this
Closes #985
2011-09-28 15:35:21 -07:00
Brian Anderson
cb4e99b688
Don't allow vectors of pinned kinds
...
Vectors of pinned kinds can't be safe because most interesting uses of vector
perform copies
2011-09-28 15:35:21 -07:00
Brian Anderson
14bac217b0
Make error patterns in some kind tests more specific
2011-09-28 15:35:21 -07:00
Patrick Walton
f7d0c1cec3
rustc: Add a new "C stack cdecl" native ABI
2011-09-28 12:58:33 -07:00
Brian Anderson
657e3ffaf5
xfail-fast run-pass/alt-range.rs
2011-09-28 12:46:29 -07:00
Brian Anderson
381205b747
Revert "Revert "Implement pattern ranges for all numeric types.""
...
This reverts commit a034f87146
.
Conflicts:
src/comp/middle/check_alt.rs
src/comp/middle/trans_alt.rs
src/comp/syntax/ast.rs
src/comp/syntax/ast_util.rs
src/comp/syntax/fold.rs
src/comp/syntax/print/pprust.rs
Conflicts:
src/comp/middle/trans_alt.rs
2011-09-28 12:46:29 -07:00
Patrick Walton
5fac684af8
vim: const
is a keyword
2011-09-28 12:40:34 -07:00
Patrick Walton
d8a80cb31f
rt: Add a call stub that switches to the C stack, untested as of yet
2011-09-28 12:26:36 -07:00
Patrick Walton
1eaaae860f
rt: Add an upcall to allocate space on the C stack. This will be used for native calls on the C stack.
2011-09-28 11:31:44 -07:00
Patrick Walton
e8757ea01f
rt: Expose the C stack inside the Rust scheduler so that C calls can switch to it
2011-09-28 10:22:02 -07:00
Patrick Walton
dbf472b0df
rustc: Switch to cdecl for all calls. This is needed to make stack growth efficient, as I need to use eax and ecx in the function prologue and can't afford to stomp on incoming arguments.
2011-09-28 10:22:02 -07:00
Marijn Haverbeke
512cfb4b83
Remove a few kludges that worked around issue #913
2011-09-28 12:59:44 +02:00
Marijn Haverbeke
c94159652a
Register new snapshot
...
It had been a while. I mostly wanted a fix for #913 in stage0.
2011-09-28 12:56:54 +02:00