Commit Graph

1150 Commits

Author SHA1 Message Date
Tim Chevalier
3aa5b0cb44 Make moves explicit in rustc 2012-09-11 13:59:57 -07:00
Patrick Walton
23880daef2 rustc: Remove the cmp type upcall 2012-09-11 12:12:13 -07:00
Brian Anderson
298eb8c726 Convert 'import' to 'use'. Remove 'import' keyword. 2012-09-10 19:04:26 -07:00
Brian Anderson
1a8a0a77b1 Camel case std::serialization 2012-09-10 19:02:57 -07:00
Patrick Walton
2aa67e9aa9 rustc: Stop calling cmp shape glue in trans.
XFAIL's alt-borrowed_str for now. Will need to fix this up in the future.
2012-09-10 17:26:17 -07:00
Brian Anderson
cb7a5395dd Convert std::map to camel case 2012-09-10 17:08:36 -07:00
Brian Anderson
93d3b8aa6b Convert class methods to impl methods. Stop parsing class methods 2012-09-10 16:13:08 -07:00
Patrick Walton
bea6fe0ec1 rustc: Trim down and rename trans_compare. Now only eq shape glue remains. 2012-09-10 15:48:05 -07:00
Patrick Walton
7e9f98a8c9 rustc: Make range literals use compare_scalar_types instead of trans_compare 2012-09-10 15:27:12 -07:00
Patrick Walton
3c7cc9a1b8 rustc: Long lines 2012-09-10 15:12:37 -07:00
Patrick Walton
d6ceef95ba rustc: Move trans_compare into alt.rs 2012-09-10 15:10:28 -07:00
Niko Matsakis
04f1763409 Combine the vtable_origins from impl + method.
Not as clean as it could be, but fixes #3314.
2012-09-10 12:59:17 -07:00
Patrick Walton
22b8757705 rustc: Make shape-based compare glue never called for comparison operators.
Only called for string patterns.
2012-09-10 12:48:42 -07:00
Brian Anderson
e0c232025c Long lines 2012-09-09 17:23:29 -07:00
Brian Anderson
f53c2948aa Rename variables that clash with keywords 2012-09-09 16:53:19 -07:00
Brian Anderson
9c98d0f99b Fix some old syntax 2012-09-08 20:04:21 -07:00
Brian Anderson
3bd1f32cd9 Convert all kind bounds to camel case. Remove send, owned keywords. 2012-09-07 18:10:11 -07:00
Brian Anderson
2810ea9a68 Convert 'again' to 'loop'. Remove 'again' keyword 2012-09-07 17:39:03 -07:00
Graydon Hoare
5d823d46ad Migrate std::map to use core:#️⃣:Hash trait. Disable many hokey hashes. 2012-09-07 17:24:16 -07:00
Tim Chevalier
f5093dff7b Remove support for multiple traits in a single impl
There was half-working support for them, but they were never fully
implemented or even approved. Remove them altogether.

Closes #3410
2012-09-07 17:22:04 -07:00
Tim Chevalier
53ce42dc4f Implement &-patterns
Closes #2855
2012-09-07 17:09:07 -07:00
Brian Anderson
f0eae8f1c1 Convert field terminators to commas. Stop parsing semis. 2012-09-07 16:12:15 -07:00
Patrick Walton
1fcfee674a rustc: Add a str_eq lang item for pattern matching 2012-09-07 15:46:08 -07:00
Brian Anderson
2572e80355 Remove 'let' syntax for struct fields 2012-09-07 14:02:33 -07:00
Niko Matsakis
14303bad89 Do not copy values of type () or _|_
This can trigger a crash because we assume we
can supply null ptrs and undefined values for
values of those types, as we should be treated
them as zero-size.

Interestingly, this crash only shows up (atm)
in non-optimized builds.  Therefore, I added
a -Z no-opt flag so that the new test
(capture_nil) can specify that it should not
run with optimizations enabled.
2012-09-07 13:00:03 -07:00
Patrick Walton
c21b3ff818 rustc: Make "ne" use traits 2012-09-07 12:44:53 -07:00
Patrick Walton
b4d879a2ef rustc: Trailing whitespace 2012-09-07 12:27:44 -07:00
Patrick Walton
feb014eb3c rustc: Add an "ne" method to the Eq trait, and implement it everywhere 2012-09-07 12:24:48 -07:00
Tim Chevalier
ac1f84c153 Don't check impl ty params for equality with trait ty params
This was too restrictive. We need to check the number of ty params,
and that the bounds are equal, but otherwise require_same_types does the job.

Closes #2611
2012-09-07 12:11:17 -07:00
Tim Chevalier
c6b51547c1 In typeck, don't assume traits with default methods are in the same crate
But note that default methods still don't work cross-crate (see #2794) --
this just makes it so that when a method is missing in a cross-crate impl,
the right error message gets printed.

Closes #3344
2012-09-07 10:27:29 -07:00
Niko Matsakis
cd3cc6d17b Ensure that scratch datum's are zeroed out in the alloca phase.
This should address the valgrind failure that @elliotslaughter
was seeing, though I am not sure why the bots / test continued
to pass, since this is precisely the condition this test was looking
for!
2012-09-07 09:32:56 -07:00
Elliott Slaughter
3f0d207b32 gc: Add stack walker for new garbage collector.
Safe points are exported in a per-module list via the crate map. A C
runtime call walks the crate map at startup and aggregates the list of
safe points for the program.

Currently the GC doesn't actually deallocate memory on malloc and
free. Adding the GC at this stage is primarily of testing value.

The GC does attempt to clean up exchange heap and stack-allocated
resource on failure.

A result of this patch is that the user now needs to be careful about
what code they write in destructors, because the GC and/or failure
cleanup may need to call destructors. Specifically, calls to malloc
are considered unsafe and may result in infinite loops or segfaults.
2012-09-07 09:21:21 -07:00
Niko Matsakis
fb8786fe52 Refactor fn_ty, working towards #3320 2012-09-07 07:54:11 -07:00
Tim Chevalier
46990ad111 Use callee ID when kind-checking expressions that may be overloaded
And fix up test cases that should have failed if not for this bug.

Closes #2587
2012-09-06 15:44:10 -07:00
Niko Matsakis
c5e2cf2ee5 Repair long lines 2012-09-06 15:40:11 -07:00
Niko Matsakis
ee4ba4490d Issue #3402: Load immediate rvalues right away
Should lead to smaller stack frames, hopefully reducing
the perf hits we saw
2012-09-06 15:23:03 -07:00
Niko Matsakis
fe9f0556d2 Refactor ty_var and ty_var_integral into one ty_infer variant 2012-09-06 12:31:33 -07:00
Brian Anderson
b4e547d71a Remove struct ctors 2012-09-06 10:52:26 -07:00
Niko Matsakis
5e36a99794 Refactor trans to replace lvalue and friends with Datum.
Also:
- report illegal move/ref combos whether or not ref comes first
- commented out fix for #3387, too restrictive and causes an ICE
2012-09-06 06:11:12 -07:00
Tim Chevalier
3a34c96086 Add a lint pass for structural records
Closes #3322
2012-09-05 18:35:30 -07:00
Patrick Walton
0a852e0da0 rustc: Make "priv" work on enum variants 2012-09-05 17:24:28 -07:00
Graydon Hoare
81695d85dc Mark crate metadata with a version tag. Close #3390. 2012-09-05 16:53:55 -07:00
Patrick Walton
31af60b257 rustc: Fix double-reporting of private item errors. Un-XFAIL private-item-simple.rs. 2012-09-05 16:21:53 -07:00
Vincent Belliard
d12128f56f fix issue #3222 2012-09-05 16:38:00 +02:00
Patrick Walton
9b88b5fe38 rustc: Don't allow private fields to be named in constructors or destructured 2012-09-04 19:07:23 -07:00
Patrick Walton
fba673b26b rustc: Implement private methods.
Doesn't work cross-crate yet.
2012-09-04 18:30:27 -07:00
Brian Anderson
c491bf939e std: Camel case smallintmap 2012-09-04 16:04:10 -07:00
Brian Anderson
200959d7ce Remove 'with' 2012-09-04 15:47:04 -07:00
Patrick Walton
127144bf38 rustc: Implement private fields for max/min classes 2012-09-04 14:50:46 -07:00
Brian Anderson
3764fe3f2a std: Camel case list 2012-09-04 14:12:49 -07:00