Marijn Haverbeke
e0cf550527
Register new snapshot
2012-01-11 18:16:26 +01:00
Marijn Haverbeke
f2352f4062
Fix regression in resolving of external impls
2012-01-11 17:12:11 +01:00
Marijn Haverbeke
87253cf3a9
Revert some iface shape code, fix a few more things in it
...
We can now run the compiler with an iface-based hashtable
implementation.
2012-01-11 11:46:44 +01:00
Marijn Haverbeke
0145b15f0c
Pass type with params intact as item_type for method callees
...
This prevents trans_args from optimizing out nil return types. The
method might be generic, in which case it *will* write to a nil retptr.
2012-01-11 11:11:45 +01:00
Niko Matsakis
441a42c5d2
update shape code to handle iface instances
2012-01-10 19:05:28 -08:00
Graydon Hoare
0e334c6839
Fold and re-evaluate expr in tag discriminant.
2012-01-10 15:59:57 -08:00
Kevin Atkinson
1dc3debdaf
Add support for casting enum-like tags to scalar values.
2012-01-10 15:59:57 -08:00
Kevin Atkinson
08abf8d37f
Support explicit discriminant numbers on tag variants.
...
Addresses issue #1393 .
For now disallow disr. values unless all variants use nullary
contractors (i.e. "enum-like").
Disr. values are now encoded in the crate metadata, but only when it
will differ from the inferred value based on the order.
2012-01-10 15:59:57 -08:00
Patrick Walton
d0fe6723fc
test: Fix test/pretty/tag-blank-lines.rs for the tag -> enum switch
2012-01-10 16:02:49 -08:00
Patrick Walton
ffdb7f97f8
rustc: Accept "enum" in addition to "tag"
2012-01-10 15:32:39 -08:00
Niko Matsakis
1592de0faf
replace lambda with fn@
2012-01-10 13:31:06 -08:00
Niko Matsakis
8b911587df
rename sendfn to fn~, lambda to fn@
2012-01-10 13:31:06 -08:00
Brian Anderson
af086aa8ef
rustc: Remove sret attributes from functions
...
Something about the way we're using it is causing incorrect code generation.
Closes #1343
2012-01-10 13:28:12 -08:00
Patrick Walton
d4a4b82973
rt: Export upcall_s_shared_malloc since the SpiderMonkey bindings need it
2012-01-10 10:44:26 -08:00
Niko Matsakis
110c3ccdca
add rust_task_is_unwinding predicate and do not kill if already unwinding
2012-01-09 19:53:32 -08:00
Austin Seipp
070b1c8333
Remove support for 'when' in alt-patterns from parser
...
Issue #1396
2012-01-09 19:27:06 -08:00
Austin Seipp
a94b1ccacb
Change all uses of 'when' in alt-patterns to 'if'
...
Issue #1396
2012-01-09 19:27:05 -08:00
Brian Anderson
d8a0ef1c84
Merge pull request #1477 from erickt/master
...
Adding longlong and ulonglong types
2012-01-09 17:13:35 -08:00
Graydon Hoare
8387896dda
Remove proto_sugar and 'lambda' as keyword, commit to fn@.
2012-01-09 16:12:48 -08:00
Graydon Hoare
f6ecbe88ca
Fix rpath bug.
2012-01-09 16:12:47 -08:00
Erick Tryzelaar
ae76a7db5d
libcore: add longlong and ulonglong types.
2012-01-09 15:14:39 -08:00
Brian Anderson
a736669fb6
Register snapshots
2012-01-09 14:58:00 -08:00
Brian Anderson
7e8974305c
rt: Set Linux red zone to 20K again
...
With runtime logging on it smashes the stack
2012-01-09 11:44:36 -08:00
Austin Seipp
9211348989
Make the parser accept 'if' as an alternative to 'when' in alt patterns.
...
Also fix the pretty printer, making it output 'if' instead of 'when'.
Issue #1396
2012-01-09 10:50:33 -08:00
Brian Anderson
fbad0204e4
Merge pull request #1470 from grahame/grahame
...
add new read_chars method, fix bug in read_char
2012-01-09 10:35:48 -08:00
Marijn Haverbeke
6b20e8c88b
Fix error message case in two cfail test
...
I had made the error consistent with other errors, but forgot to
also change the tests.
2012-01-09 17:51:39 +01:00
Marijn Haverbeke
9e2b273221
Iface types are not structural
...
Not sure how they ended up being marked as such.
2012-01-09 16:44:37 +01:00
Marijn Haverbeke
a62bd9abec
Work around recursive type check for iface types
...
They are nominal, and can safely refer to themselves.
2012-01-09 16:25:39 +01:00
Marijn Haverbeke
c13f087454
Properly recognize self as an upvar when closed over
...
Closes #1463
2012-01-09 16:25:39 +01:00
Niko Matsakis
51364b5708
Fix #1474 : check that block args resolved to bare fns do not make use of upvars
2012-01-09 06:50:40 -08:00
Niko Matsakis
8944a390c6
change spawn_connected argument to copy mode
2012-01-09 06:50:39 -08:00
Marijn Haverbeke
1ee9a83de0
Fix bug in iface shape code
...
Issue #1437
2012-01-09 15:12:18 +01:00
Marijn Haverbeke
f30c5ea686
Remove leftover comm.rs in std
...
(The actual comm module lives in core.)
2012-01-09 14:53:13 +01:00
Marijn Haverbeke
0945fcf1fb
Fix typo in example in libcore docs
2012-01-09 14:44:52 +01:00
Marijn Haverbeke
47cfeba467
Add cases for iface values to rust_shape.h
...
They appear to log okay now, but I can't promise much beyond that.
@pcwalton If you feel like taking a look, I'd be grateful. Interfaces are
boxes containing a (tydesc, dict, value_of_any_type) tuple, where the leading
tydesc describes the whole tuple.
Issue #1437
2012-01-09 14:44:21 +01:00
Grahame Bowland
ba694775f5
add tests for io::readchars and io::readchar
...
Additionally reformat so that 'make check' passes.
2012-01-09 20:49:17 +08:00
Marijn Haverbeke
9fa7491676
Don't resolve upvars in fn() { ... } exprs
...
Closes #1467
2012-01-09 11:32:18 +01:00
Haitao Li
26536e6915
rt: Fix build with clang on non-Mac
2012-01-09 15:34:06 +08:00
Jesse Ruderman
972f6c17fb
Fix bustage
2012-01-08 19:34:02 -08:00
Jesse Ruderman
159ad7a63b
Update fuzzer
2012-01-08 19:24:24 -08:00
Brian Anderson
c5564c9bae
Declare MIT license in crate attributes, not BSD
...
The Rust License is actually the MIT license, not BSD
2012-01-08 16:22:55 -08:00
Niko Matsakis
9775b480fd
add spawn_connected
2012-01-08 15:32:13 -08:00
Niko Matsakis
91cd57e872
correct long line
2012-01-08 15:32:03 -08:00
Niko Matsakis
7a336f1e7c
modify last use to take into account cap clause, add new test
2012-01-08 14:57:03 -08:00
Niko Matsakis
106385cb91
make spawned fn copy mode so that bare fns can be used
2012-01-08 14:57:03 -08:00
Marijn Haverbeke
7d3f892f35
First barely-working version of casting to iface
...
Issue #1437
2012-01-08 23:07:15 +01:00
Marijn Haverbeke
a161371d13
Add fall-through case for non-iface bounds typeck::lookup_method
...
Closes #1462
2012-01-08 21:59:37 +01:00
Marijn Haverbeke
9a7061dfab
Fix some bad code in the dict interner
...
Issue #1436
2012-01-08 21:57:54 +01:00
Grahame Bowland
bcc25634e6
add new read_chars method, fix bug in read_char
...
having a read_chars method is convenient and more efficient.
the old read_char method had a bug due to re-use of the 'w' width
variable as a loop counter and so was broken for wide characters,
this patch fixes that.
2012-01-09 00:37:03 +08:00
Brian Anderson
e3afc78fde
core: Update task spawning example
2012-01-07 17:11:54 -08:00
Niko Matsakis
5bee80612b
fix valgrind error: allocate enough space for all type descs
2012-01-07 08:03:34 -08:00
Niko Matsakis
1e674ffe43
choose a new arbitrary value
2012-01-06 22:40:32 -08:00
Niko Matsakis
2f0eb7ae0c
add rust_util.h header file
2012-01-06 22:40:32 -08:00
Niko Matsakis
d4410a9f9b
rewrite to use old C++-based mechanism
2012-01-06 22:40:32 -08:00
Niko Matsakis
a1ef79c9d2
update to use new spawn syntax
2012-01-06 22:40:32 -08:00
Niko Matsakis
a366a9eece
report unicode decode failures nicely
2012-01-06 22:40:32 -08:00
Niko Matsakis
0595f57186
revert changes to trans_uniq.rs
2012-01-06 22:40:32 -08:00
Niko Matsakis
154f81b0be
revert metrics
2012-01-06 22:40:32 -08:00
Niko Matsakis
6237368cc2
plug leak: free shared type descrs recursively, as we ought to
2012-01-06 22:40:32 -08:00
Niko Matsakis
d1b987d292
hack the tydesc that is registered with a malloc to be what cc expects
2012-01-06 22:40:31 -08:00
Niko Matsakis
8506241f3a
fix how we walk functions to match new closure fmt
2012-01-06 22:40:31 -08:00
Niko Matsakis
8e89df69de
rejigger impl to have an opaque closure ptr rather than
...
opaque closure
2012-01-06 22:40:31 -08:00
Niko Matsakis
7db640e63d
collapse sizeof, alignof into metrics, pass along an instance if avail
2012-01-06 22:40:31 -08:00
Niko Matsakis
4f52e5a5ec
make size_of and align_of take an optional value
2012-01-06 22:40:31 -08:00
Niko Matsakis
2074e06278
emit the take glue for closure tydescs
2012-01-06 22:40:31 -08:00
Niko Matsakis
9f84f88276
port over the tests to use the new API
2012-01-06 22:40:31 -08:00
Niko Matsakis
25e81e34ea
rewrite task tests
2012-01-06 22:40:31 -08:00
Niko Matsakis
98f5109cde
simplify task impl
2012-01-06 22:40:31 -08:00
Niko Matsakis
e88905cd28
remove trailing whitespace
2012-01-06 22:07:29 -08:00
Jesse Ruderman
bf038b9b90
Get these files compiling again
2012-01-06 22:06:32 -08:00
Niko Matsakis
373dbe7741
test exposing memory management failure for #1078
2012-01-06 21:15:27 -08:00
Brian Anderson
4632358cbc
Revert "rt: Reduce mac red zone to 6K"
...
This reverts commit d499e739a1
.
2012-01-06 18:16:19 -08:00
Brian Anderson
be565a1a7a
cargo: Print rustc's stdout when compilation fails
...
stdout is where all the useful info is, not stderr.
2012-01-06 18:04:25 -08:00
Brian Anderson
d499e739a1
rt: Reduce mac red zone to 6K
2012-01-06 16:42:26 -08:00
Brian Anderson
396a8bd4e5
rustc: Use std::homedir to locate /home/banderson
...
Issue #1359
2012-01-06 16:38:29 -08:00
Brian Anderson
4b2f37253a
std: Untabify
2012-01-06 16:37:04 -08:00
Brian Anderson
74c825e385
std: Add fs::homedir
...
Returns the home directory of the user as appropriate for the platform.
Issue #1359
2012-01-06 16:33:17 -08:00
Brian Anderson
2f4c9315af
rt: Fail the scheduler immediately on task failure in win32
2012-01-06 16:18:56 -08:00
Tim Chevalier
7c7559edaf
Disallow variable names that shadow tags in scope
...
Now, if you have a tag named "foo", a variable declaration like
"let foo..." is illegal. This change makes it possible to eliminate
the '.' after a nullary tag pattern in an alt (but I'll be doing
that in a future commit) -- as now it's always obvious whether a
name refers to a tag or a new declared variable.
resolve implements this change -- all the other changes are just to
get rid of existing code that declares variables that shadow tag
names.
2012-01-06 14:44:43 -08:00
Tim Chevalier
da519c8587
Eliminate a use of map::get in freevars
...
map::get is evil -- just say no!
2012-01-06 14:44:43 -08:00
Graydon Hoare
4f3171ea81
Merge pull request #1450 from erickt/master
...
adding some misc functions and some functions just for [u8]
2012-01-06 13:04:49 -08:00
Marijn Haverbeke
7b00bac540
Add some basic comments to trans_imp.rs
2012-01-06 17:50:55 +01:00
Marijn Haverbeke
822acdd170
Make binding of fns with bounded type parameters work
...
Interns non-static dicts to heap-allocated equivalents so that they no
longer have stack scope.
Closes #1436
2012-01-06 17:40:05 +01:00
Marijn Haverbeke
d23e2052e0
Support interface casting in the typechecker
...
Issue #1437
2012-01-06 17:40:05 +01:00
Marijn Haverbeke
cf5c877fc0
Statically allocate static dicts
...
Issue #1436
2012-01-06 17:40:05 +01:00
Marijn Haverbeke
41a2d8495e
Fix pretty-printing of ty params in iface methods
2012-01-06 17:40:05 +01:00
Marijn Haverbeke
7c1f683c6d
Fix bug in method type parameter passing
...
It would occasionally pass the wrong type parameter, when calling
a generic method from a generic impl on a bounded param type.
2012-01-06 17:40:05 +01:00
Erick Tryzelaar
6cfc196d42
libstd: rename c_vec::size to len.
2012-01-06 08:12:18 -08:00
Niko Matsakis
295df68faf
add alignment to i386 for good measure, though we do not yet
...
save SSE regs in i386 (we ought to, though!)
2012-01-06 07:57:56 -08:00
Erick Tryzelaar
3e68803891
libcore: add [u8] helper functions to vec.
2012-01-06 07:47:14 -08:00
Erick Tryzelaar
eade7844a3
libstd: switch map to use libcore's hash functions.
2012-01-06 07:47:14 -08:00
Erick Tryzelaar
7806180557
libcore: add a trivial uint hash function.
2012-01-06 07:47:13 -08:00
Erick Tryzelaar
ae225e2b6c
libcore: Add binop functions to u32 and u64
2012-01-06 07:47:13 -08:00
Niko Matsakis
fefae72a53
fix alignment of registers structure
2012-01-06 07:45:06 -08:00
Brian Anderson
b1e2f04eb4
libcore: Use correct link name for lgamma_r on win32
2012-01-05 21:35:03 -08:00
Brian Anderson
b532812572
rustc: Stop exported back::rpath::test
...
Tests no longer need to be exported
2012-01-05 18:23:30 -08:00
Brian Anderson
51e6df689c
rustc: Allow the test runner to run unexported tests
2012-01-05 18:16:56 -08:00
Graydon Hoare
d2218d9c9c
Attempt to fix build breakage due to lgammaf_r having two leading underscores on mingw.
2012-01-05 17:54:30 -08:00
Brian Anderson
c2c497ff53
rustc: Configure out #[test] functions when not testing
2012-01-05 17:31:57 -08:00
Graydon Hoare
a2acb052ca
Simplify NSIS package script.
2012-01-05 17:03:02 -08:00