Commit graph

8025 commits

Author SHA1 Message Date
Marijn Haverbeke
0c97fcbf66 Properly check kinds in instantiation of generics
Issue #1177
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
7bef89f9b5 Prevent alias pass from inserting implicit copies for noncopyable types
Issue #1177
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
17b78c4a7a Overhaul the kind-checking pass
Not really useful yet because missing last-use-of-local optimization.

Also: instantiation of type parameters needs to be checked.

Issue #1177
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
cefff237bf Make tag, resource and object constructors take their arguments by copy
Doing something like some([1, 2, 3]) will now no longer create a temporary
copy of the vector. It will also be easier for the kind checker to see that
putting a resource into a data-structure constructor is safe.
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
4e03112141 Add a pass-by-copy parameter passing convention
This is intended to solve the problem of how to pass arguments to
constructor functions -- you want to move in rvalues, but not have to
explicitly copy stuff that is not an rvalue. The by-copy passing
convention will ensure the callee gets its own copy of the value. For
rvalues, it'll just pass off the value. For lvalues, it'll make a
copy.

Issue #1177
2011-11-18 12:49:00 +01:00
Marijn Haverbeke
6297fc979e Register snapshot 2011-11-18 12:48:57 +01:00
Marijn Haverbeke
9cf48d3753 Preparation for kind system overhaul
This goes before a snapshot, so that subsequenct patches can make the
transition without breaking the build. Disables kind checking pass, makes
parser accept both new and old-style kind annotation.

Issue #1177
2011-11-18 10:52:28 +01:00
Niko Matsakis
eff7fae7b9 comparing/walking two pointers still aligns same as 1 ptr 2011-11-17 15:41:45 -08:00
Niko Matsakis
b30f7af98b remove blank line 2011-11-17 15:11:52 -08:00
Niko Matsakis
60e93cd1ec Re-enable cycle coll. on x86_64, seems to work better now. 2011-11-17 14:40:03 -08:00
Niko Matsakis
f597971441 make ref cnts a long not an int 2011-11-17 14:23:48 -08:00
Niko Matsakis
8925875ccb add FIXME for issue #1184 2011-11-17 13:44:13 -08:00
Niko Matsakis
0d874476cf fix resource-generic 2011-11-17 13:44:13 -08:00
Niko Matsakis
11187437c5 Merge branch 'master' of github.com:graydon/rust 2011-11-17 13:44:04 -08:00
Brian Anderson
6a0e85b81c Remove intrinsic_2 functions 2011-11-17 13:23:35 -08:00
Brian Anderson
5e7dff4db5 Register snapshots 2011-11-17 13:22:29 -08:00
Brian Anderson
3bffb8b5de build: Add various shorthand make check rules 2011-11-17 12:04:37 -08:00
Niko Matsakis
f9231e932c add an extra underscore 2011-11-17 12:02:15 -08:00
Brian Anderson
dd275cd749 Stop using temporary intrinsic_2 functions 2011-11-17 11:55:04 -08:00
Niko Matsakis
e7ad5978d9 Merge branch 'master' of github.com:graydon/rust 2011-11-17 11:52:56 -08:00
Brian Anderson
30871408a6 rt: Remove debug printf in rust_start 2011-11-17 11:48:10 -08:00
Niko Matsakis
adc79e2f44 remove compile-command from local variable blocks 2011-11-17 11:46:13 -08:00
Brian Anderson
c1cf7cb323 Register snapshots 2011-11-17 11:44:31 -08:00
Brian Anderson
a92699fe58 rt: Make morestack link on x86_64. Still utterly broken 2011-11-17 11:12:59 -08:00
Brian Anderson
d624e523c9 rt: Make stack growth code build on Linux 2011-11-17 10:53:06 -08:00
Patrick Walton
e6c3c4e48c rt: More work on morestack 2011-11-17 10:52:59 -08:00
Haitao Li
f4eb25e0d0 tutorial: Fix type mismatch in example FFI code
Compile error:
time.rs:13:23: 13:43 error: mismatched types: expected
*R[tv_sec=mMltv_usec=mMl] but found *R[tv_sec=Mltv_usec=Ml] (record
elements differ in mutability)
time.rs:13     libc::gettimeofday(std::ptr::addr_of(x),
std::ptr::null());
                                  ^~~~~~~~~~~~~~~~~~~~
error: aborting due to previous errors
rust: upcall fail 'explicit failure', ../src/comp/driver/session.rs:70
rust: domain main @0x9dfd178 root task failed
2011-11-17 22:50:08 +08:00
Haitao Li
388eed383f rustc: Add a flag '--warn-unused-imports'
Followup of issue #889
2011-11-17 09:28:30 +01:00
Haitao Li
fe6484d3e6 rustc: Fix warn on unused import bug
rustc generates incorrect warning for cascaded import declarations like:

  use std;
  import std::io;
  import io::println;
  fn main() { println("hello"); }

  warning: unused import io

A followup of issue #889
2011-11-17 09:27:17 +01:00
Niko Matsakis
bfc81352aa remove unused flag (thanks lht) 2011-11-16 21:52:01 -08:00
Stefan Plantikow
99c421f01d Removed --no-typestate flag from rutsc
Fixes issue #1139
2011-11-16 18:52:46 -08:00
Brian Anderson
02cebbb9f1 Revert "rt: More work on morestack"
This reverts commit 68aff2ad6d.
2011-11-16 18:49:19 -08:00
Brian Anderson
5559e149e4 Revert "rt: Make stack growth code build on Linux"
This reverts commit da4b7da4e1.
2011-11-16 18:49:07 -08:00
Brian Anderson
55f89dbed9 rustc: Fix help text for --sysroot 2011-11-16 18:35:30 -08:00
Brian Anderson
da4b7da4e1 rt: Make stack growth code build on Linux 2011-11-16 18:33:00 -08:00
Patrick Walton
68aff2ad6d rt: More work on morestack 2011-11-16 18:00:57 -08:00
Brian Anderson
8199558443 rt: Remove an unnecessary check from rust_task::yield 2011-11-16 17:55:04 -08:00
Brian Anderson
bae817efe6 rt: Remove rust_task::notify_tasks_wating_to_join 2011-11-16 17:22:14 -08:00
Brian Anderson
342dc21d2c Disconnect ports before draining them. Issue #1155 2011-11-16 17:22:14 -08:00
Niko Matsakis
809ca13bfa fix minor merge errors 2011-11-16 16:13:43 -08:00
Niko Matsakis
c22ad0752f wrap long line 2011-11-16 15:27:49 -08:00
Niko Matsakis
2b8cf89ba2 correct signed-ness and long line 2011-11-16 15:27:49 -08:00
Niko Matsakis
037a1de405 apply calling convention at call site too 2011-11-16 15:27:09 -08:00
Niko Matsakis
834b6879ea temp workaround for failure to pass ulonglong successfully 2011-11-16 15:27:09 -08:00
Niko Matsakis
938b23e228 fix prereqs 2011-11-16 15:27:09 -08:00
Niko Matsakis
62b298ee13 missed merges 2011-11-16 15:27:08 -08:00
Niko Matsakis
cbcdeb80d9 remove wrappers from intrinsics 2011-11-16 15:27:08 -08:00
Niko Matsakis
23bb158acb fix win32 types, make close() use i32 as return type 2011-11-16 15:27:08 -08:00
Niko Matsakis
e3699a2636 make stdcall use shim 2011-11-16 15:24:56 -08:00
Brian Anderson
d2199e8716 Various fixes for x86_64 on linux
Configure LLVM correctly, use the right data layout, add the readlink
function back, fix C constants, etc.
2011-11-16 15:24:56 -08:00