Lindsey Kuper
8b79bed6dd
Clean up whitespace
2012-08-08 16:07:52 -07:00
Tim Chevalier
febd7ee239
Make let _ = e; have the same semantics as e;
...
The first case was getting treated like a variable binding, meaning that
if e had a destructor, it wouldn't run until the end of the enclosing scope.
To me it seems less confusing for let _ = e; and e; to work exactly the same
way, so now, the destructor for e runs immediately in both cases.
2012-08-08 15:37:45 -07:00
Brian Anderson
d99ca69cf7
lint: Allow trailing underscores in camel case idents
2012-08-08 15:05:49 -07:00
Michael Sullivan
79b5f68176
Implement + for @-vectors.
2012-08-08 14:30:45 -07:00
Patrick Walton
f110e8f21c
rustc: Do some plumbing work on nested enums
2012-08-08 14:19:21 -07:00
Jesse Ruderman
a76e4334b3
Add spawn_conversation
2012-08-08 16:57:13 -04:00
Elliott Slaughter
166cb1b28b
rustc: Strict enforcement of glue function types.
...
Make all glue functions take values by alias to remove the need for
bitcasts at the top of every glue function. Use static type
information to produce the correct type for glue functions so that
LLVM can enforce the type system at call sites.
2012-08-08 12:21:25 -07:00
Michael Sullivan
76d04af71a
In decoder, rename class_member_id to item_def_id.
2012-08-08 12:01:19 -07:00
Eric Holk
19c86c1e71
xfail-pretty
2012-08-08 12:00:52 -07:00
Tim Chevalier
c7d60ee053
Don't add struct names to the value name space if there's no constructor
...
Closes #3149
2012-08-08 11:53:08 -07:00
Eric Holk
c5fbff01ce
Add a really optimistic fast path in receive. Gives about a 7% performance improvement in msgsend-ring-pipes
2012-08-08 10:28:57 -07:00
Eric Holk
bc6ba6b091
Adding some examples for my internship presentation.
2012-08-08 10:28:57 -07:00
Niko Matsakis
802ea5d57e
refactor categorization out of borrowck into its own module.
...
first step towards #3148 and #3024 .
2012-08-08 09:22:07 -07:00
Niko Matsakis
52c517383e
improve borrowck error messages to explain regions better
2012-08-07 20:59:06 -07:00
Niko Matsakis
99af0d5480
new test case demonstrating ability to return ptr to interior of option
2012-08-07 20:13:03 -07:00
Patrick Walton
31965860c7
rustc: Resolve constructor expressions for variant structs
2012-08-07 19:12:58 -07:00
Patrick Walton
5ce3281a62
rustc: Parse variant structs; add a trivial test case
2012-08-07 18:55:19 -07:00
Graydon Hoare
8c95feda39
Add minor debug mode for measuring type sizes, helper for #3025 .
2012-08-07 18:40:02 -07:00
Patrick Walton
438765da59
rustc: Box struct_defs
2012-08-07 17:46:51 -07:00
Graydon Hoare
175be53e3f
Translate const structs.
2012-08-07 17:31:26 -07:00
Michael Sullivan
4be8239ac2
Add 'static' to rust-mode.el.
2012-08-07 17:18:14 -07:00
Michael Sullivan
7f7f47620e
Implement static typeclass methods. Closes #3132 .
2012-08-07 17:18:14 -07:00
Elliott Slaughter
a695e074f2
rustc: Cosmetic change to type_of to make control flow more obvious.
2012-08-07 16:58:15 -07:00
Elliott Slaughter
cdfc4b1c7a
rustc: Fix for type_of on recursive enum creating two types instead of one.
2012-08-07 16:58:15 -07:00
Patrick Walton
61446293f9
rustc: Move some more routines that operate on struct definitions out of line
2012-08-07 16:46:19 -07:00
Patrick Walton
0f711e72f7
libsyntax: Break struct definitions out of classes internally in a few more places
2012-08-07 16:09:08 -07:00
Brian Anderson
1f0574e8f0
Registor snapshots
2012-08-07 16:03:58 -07:00
Ben Blum
64ba7a31cb
Touch up semaphores; add another test
2012-08-07 18:57:49 -04:00
Patrick Walton
a3f9e18b7a
libsyntax: Allow users of the visitor to visit struct defs
2012-08-07 15:55:33 -07:00
Patrick Walton
deaef48675
rustc: Split out struct bodies into a separate "struct_def" type in the AST
2012-08-07 15:35:05 -07:00
Ben Blum
1a6dadad5b
fix trailing whitespace
2012-08-07 18:20:02 -04:00
Ben Blum
f2ca54991f
Add sync.rs with counting blocking semaphores
2012-08-07 18:18:48 -04:00
Ben Blum
bdbad614ac
Remove rust_cond_lock and sys::condition (rename to little_lock)
2012-08-07 18:18:48 -04:00
Graydon Hoare
32e4fd62e9
Const slices now work. Something odd about non-const cases though, see #3138 .
2012-08-07 15:04:40 -07:00
Brian Anderson
42540841f3
Add missing comma
2012-08-07 14:34:00 -07:00
Patrick Walton
727c7c7499
rustc: Add stub support for struct variants to the AST
2012-08-07 14:25:53 -07:00
Brian Anderson
bc267c696c
syntax: Rename expr_alt to expr_match
2012-08-07 13:35:51 -07:00
Brian Anderson
92ef17aaeb
syntax: Fix parsing of inherent traits
2012-08-07 13:01:22 -07:00
Brian Anderson
2772b2e5c7
syntax: Make match arm parsing more restrictive again
...
Require comma separators for all expression types except the plain block
2012-08-07 12:23:43 -07:00
Eric Holk
abf4421e7c
Generate try_send versions for all the messages. Fixes #3128
2012-08-07 11:47:12 -07:00
Eric Holk
672bfa5773
Working on a macro for selecting from many pipes.
2012-08-07 11:47:12 -07:00
Eric Holk
8d1922d4c8
Add a selectable implementation for *packet_header
2012-08-07 11:47:12 -07:00
Eric Holk
184da12896
Nifty macros for receiving from a protocol.
2012-08-07 11:47:12 -07:00
Eric Holk
d594f3701a
Use a proper protocol definition instead of the already-expanded code.
2012-08-07 11:47:11 -07:00
Ben Blum
18ac4a8e6d
Change task().future_result's argument mode
2012-08-07 14:26:41 -04:00
Ben Blum
ae6d84f573
Rework task::try for new task_builder interface ( close #3103 )
2012-08-07 14:26:41 -04:00
Ben Blum
0cc6cefaec
Add util::ignore
2012-08-07 14:26:41 -04:00
Lindsey Kuper
efea6f016e
Reindent some match exprs to agree with rust-mode.el
2012-08-07 10:41:48 -07:00
Lindsey Kuper
e656261ee7
Comments, minor refactoring, clean up wording of error messages
2012-08-07 10:29:19 -07:00
Niko Matsakis
0755922320
xfail-fast issue-2242
2012-08-07 07:15:47 -07:00
Niko Matsakis
7d374bde43
add lint mode for deprecated pattern usage
2012-08-07 07:14:44 -07:00
Niko Matsakis
dbef6e593d
move borrowck tests to use ref, fix a few exposed shortcomings
2012-08-07 06:11:12 -07:00
Patrick Walton
793c0a1116
test: Modernize and un-XFAIL issue-2242-d.rs (issue #2242 )
2012-08-06 21:40:49 -07:00
Patrick Walton
6a7c714df6
test: Add a dvec indexing operator test, which serves as a test for #2615 (cross-crate operator overloading).
2012-08-06 21:30:57 -07:00
Tim Chevalier
f3b2296ee4
Auto-deref the base expr in trans_method_callee
...
(specifically in the method_trait case) -- if you wrote x.f()
and x has type @T for a trait T, x wasn't getting auto-deref'ed.
This was bad.
Closes #2935
2012-08-06 19:17:44 -07:00
Niko Matsakis
aacd18f4ed
first shot at integrating ref/value bindings into borrowck
...
(more needed)
2012-08-06 19:15:39 -07:00
Patrick Walton
60f47eabe2
rustc: Parse and stub (broken) typechecking for bounded function types
2012-08-06 18:55:24 -07:00
Paul Stansifer
c0f7ed68e2
Fix log_syntax of unexpanded code.
2012-08-06 18:27:37 -07:00
Tim Chevalier
a4cedd9598
Disallow multiple constructors or destructors in the same class
...
Closes #2825
2012-08-06 18:01:26 -07:00
Patrick Walton
253dfc3387
rustc: Implement pattern matching for structs
2012-08-06 17:36:24 -07:00
Tim Chevalier
5cb3a94bfb
Shorten lines, fix build breakage
2012-08-06 17:33:23 -07:00
Michael Sullivan
94aa38d470
Move some decoder code to the right place.
2012-08-06 17:20:22 -07:00
Ben Blum
a3dd67ae91
Make 100 generations perf test sensitive to spawn failures
2012-08-06 19:46:20 -04:00
Tim Chevalier
6bd01d0ac8
In resolve, forbid duplicate value, type, and module items
...
Closes #3099
2012-08-06 16:37:18 -07:00
Niko Matsakis
0308884416
s/alt/match/... again.
2012-08-06 16:16:08 -07:00
Niko Matsakis
4a216a000a
s/alt/match/
2012-08-06 16:13:52 -07:00
Niko Matsakis
c0e988f932
emacs: add match as keyword
2012-08-06 16:13:04 -07:00
Niko Matsakis
a6a5c48c64
make ref x
bindings produce region ptrs and fix various minor bugs
...
we now detect inconsistent modes, binding names, and various other errors.
typeck/trans integration is mostly done.
borrowck not so much.
more tests needed.
2012-08-06 16:12:40 -07:00
Brian Anderson
ecaf9e39c9
Convert alt to match. Stop parsing alt
2012-08-06 15:36:30 -07:00
Brian Anderson
d3a9bb1bd4
std: URL paths can contain dashes
2012-08-06 15:17:08 -07:00
Brian Anderson
74370042aa
core: Rename task::osmain to platform_thread. #3090
2012-08-06 14:07:51 -07:00
Eric Holk
c973732a23
Enabling pingpong benchmark.
2012-08-06 13:25:34 -07:00
Eric Holk
517ad983f9
Handle interpolated paths in pattern parsing. Fixes #3007 .
...
We might need to use is_ident_or_path in a for other places too.
2012-08-06 13:25:34 -07:00
Eric Holk
4544c015b3
Fill out rust docs for pipes some more.
2012-08-06 13:25:34 -07:00
Patrick Walton
bff512a90f
rustc: Implement functional record update for structs
2012-08-06 13:17:42 -07:00
Brian Anderson
1e3143b34e
std: Parse underscores in url paths
2012-08-06 13:12:49 -07:00
Brian Anderson
03330baf9c
Add a test for issue #2312
2012-08-06 11:08:52 -07:00
Eric Holk
bd9d5e50be
Add missing =>
2012-08-06 09:55:53 -07:00
Eric Holk
9f287c211e
Refcount tasks in packets to avoid races.
...
Revert "Once again, revert "Use pipes in compiletest""
Fixes #3098
2012-08-06 09:10:19 -07:00
Eric Holk
86947e47ad
More documentation on pipes, and moving assert in runtime.
2012-08-06 09:07:40 -07:00
Brian Anderson
d8e9724fb1
syntax: Stop parsing alts without arrows
2012-08-05 22:10:34 -07:00
Brian Anderson
025d86624d
Switch alts to use arrows
2012-08-05 22:08:09 -07:00
Brian Anderson
3fe1c7071d
std: Some fixes to url parsing
2012-08-05 16:33:28 -07:00
Brian Anderson
dbf58716df
std: URLs without schemes parse as errors. Closes #3112
2012-08-05 13:48:29 -07:00
Brian Anderson
a52f6d26db
Fix closure pretty-print tests
2012-08-04 17:41:04 -07:00
Brian Anderson
a60f9c76f5
xfail-fast run-pass/trait-composition-trivial
2012-08-04 17:37:30 -07:00
Patrick Walton
8c77536526
rustc: Normalize region-bounded string slices properly
...
This prevents an LLVM assertion that will bite you if you try to put a static
string in an Error.
2012-08-04 15:11:54 -07:00
Graydon Hoare
edfc79cc47
Translate const vecs, most of const slices. More for #2317 .
2012-08-03 21:44:52 -07:00
Patrick Walton
f23674394f
rustc: Merge fn& and fn in favor of fn&.
...
This is a step on the way to moving the function "proto" sigil out front.
2012-08-03 19:49:12 -07:00
Patrick Walton
51a5a4ad0e
rustc: Translate repeated vector syntax
2012-08-03 18:49:44 -07:00
Graydon Hoare
488ece05b5
Implement &-expressions in consts. Part of #2317 .
2012-08-03 18:07:58 -07:00
Patrick Walton
e02b1b1ec8
rustc: Parse and typecheck repeating vector expressions; e.g. [ 0, ..512 ]
2012-08-03 18:03:19 -07:00
Ben Blum
4174de8bb9
rt: expose rust_task refcounts to rustland
2012-08-03 21:00:23 -04:00
Ben Blum
f57760c609
Add task-perf-linked-failure.rs
2012-08-03 20:24:41 -04:00
Lindsey Kuper
fe2f3d210a
Further work on default methods in traits.
...
And some trait-related code cleanup in typeck::collect.
2012-08-03 16:17:54 -07:00
Ben Blum
a98407ee34
vim: don't hilight "any"
2012-08-03 18:46:48 -04:00
Patrick Walton
e0ee2447bf
libsyntax: Fix trailing whitespace
2012-08-03 15:24:34 -07:00
Eric Holk
739e83d859
Xfailing until the pipe race is fixed.
2012-08-03 15:22:33 -07:00
Eric Holk
618d311c3d
Once again, revert "Use pipes in compiletest"
...
This reverts commit 1d04b0ed5a
.
2012-08-03 15:22:01 -07:00
Patrick Walton
5012abde8f
test: Add a trivial test that trait composition parses
2012-08-03 15:03:19 -07:00
Patrick Walton
b65dd9d090
rustc: Parse, serialize, and deserialize trait inheritance
2012-08-03 15:02:53 -07:00
Patrick Walton
a805a1fb37
rustc: Add the notion of inherited visibility
2012-08-03 15:02:53 -07:00
Ben Blum
0c623c4474
Document arc::exclusive.
2012-08-03 17:50:59 -04:00
Graydon Hoare
241085a073
Fix signed/unsigned bug, likely cause of windows crash.
2012-08-03 13:36:28 -07:00
Eric Holk
2c06e7aac9
Fixing failing test cases
2012-08-03 12:48:14 -07:00
Eric Holk
749a184a06
Fix a failing string test.
2012-08-03 12:04:19 -07:00
Eric Holk
01ca0d1f68
Be more defensive in pipes ( #3098 )
2012-08-03 12:04:18 -07:00
Patrick Walton
9e68966611
rustc: Remove fixed-length string warning
2012-08-03 12:03:15 -07:00
Patrick Walton
aa4683c181
test: Add a test case for bare static strings
2012-08-03 11:51:47 -07:00
Patrick Walton
4e60d7e3a6
rustc: "foo" is now a static string
2012-08-03 11:51:04 -07:00
Patrick Walton
4bfd4fb8ea
test: Remove a fixed-length string from a test
2012-08-03 11:47:08 -07:00
Brian Anderson
903068c132
Long lines
2012-08-03 11:46:31 -07:00
Tim Chevalier
b0cf106e9a
Test for issue 2904, which got fixed somewhere along the line
2012-08-03 11:39:39 -07:00
Daniel Patterson
7e43f8f8dc
std::net::url - change alt to match, ret to return, as per recent syntax changes
2012-08-03 11:28:19 -07:00
Daniel Patterson
64eb497d34
std::net::url - eliminate out of date comment and switch to str::each_chari instead of str_reader to make code cleaner
2012-08-03 11:28:19 -07:00
Daniel Patterson
8e3105b6db
std::net::url - fix to_str to work with authorityless urls, add test
2012-08-03 11:28:19 -07:00
Daniel Patterson
21187206c3
std::net::url cleanups for lint check
2012-08-03 11:28:19 -07:00
Daniel Patterson
b57f6b73ba
std::net::url - making parsing of authority give error messages if in encounters invalid stuff; support for ipv6, more tests.
2012-08-03 11:28:19 -07:00
Daniel Patterson
d60dd6be87
std::net::url making scheme parsing compliant with rfc, give appropriate error messages, better split fn
2012-08-03 11:28:19 -07:00
Daniel Patterson
e349201bc2
std::net::url - comment cleanup, new test
2012-08-03 11:28:18 -07:00
Daniel Patterson
ef46314d1e
std: integrating erickt's url encoding/decoding from github.com/erickt/rust-uri into std::net::url
2012-08-03 11:28:18 -07:00
Patrick Walton
dfe1f6260e
rustc: Remove all fixed-length strings from our codebase
2012-08-03 11:22:35 -07:00
Eric Holk
b3933b8822
Adding a test case for #2548
2012-08-03 10:22:16 -07:00
Niko Matsakis
cc1a2f2128
fix compilation of 2214
2012-08-03 08:05:04 -07:00
Tim Chevalier
336be1d644
Fix build breakage
2012-08-02 23:53:45 -07:00
Tim Chevalier
948172b93f
Make comparisons between region pointers work
...
Region pointers were considered a scalar type, so compare_scalar_type would
get called to compare region pointers in trans. This would fail, since
compare_scalar_type has no case for region pointers.
Changed type_is_scalar to return false for region pointers. This had the side
effect of breaking casts to types of the form &T. To ameliorate that, I added
library functions ptr::assimilate (taking a &T to a *T) and ptr::to_uint
(taking a &T to a uint), both of which use reinterpret_cast.
While I was at it, I removed ty::type_has_resources, which is dead code.
2012-08-02 23:53:45 -07:00
Niko Matsakis
31c5cec55b
Purge placement new; Make borrowck know about unary move.
...
cc #3071
2012-08-02 22:36:36 -07:00
Tim Chevalier
c2bb2f0837
When checking loop bodies and do-expr bodies, don't require the expected type to exist
...
If the expected type is none (due to a type error), we shouldn't fail with an ICE, but
rather, just print out another type error. Changed the do-expr type error message to
make sense in this context (see the test case for how it works).
Closes #3044 .
2012-08-02 21:44:14 -07:00
Eric Holk
c9c3a49bfc
Fixing a long line
2012-08-02 19:27:07 -07:00
Eric Holk
bd195518c7
Fix an apparent race in pipes.
...
Also removed some unsafety in pipes and added vec::consume_mut.
2012-08-02 19:27:07 -07:00
Eric Holk
110ff312df
Give better error messages when port_set.recv fails.
2012-08-02 19:27:07 -07:00
Eric Holk
ce6d6511c7
Set thread name on Mac to make gdb thread info more useful.
2012-08-02 19:26:33 -07:00
Eric Holk
f76a46242b
Convert pfib to pipes. This is a useful stress test.
2012-08-02 18:55:44 -07:00
Eric Holk
1d04b0ed5a
Revert "Revert "Use pipes in compiletest""
...
This reverts commit 96c6f57d18
.
2012-08-02 18:55:44 -07:00
Eric Holk
1f2178e2d3
Removing an obsolete benchmark
2012-08-02 18:55:44 -07:00
Lindsey Kuper
19570ab1f0
Revert "Remove "iface" from keyword table."
...
This reverts commit 51b9674ed7
.
2012-08-02 18:42:09 -07:00
Patrick Walton
c076d3ccc0
rustc: Translate class literals correctly if the class has a destructor
2012-08-02 18:14:50 -07:00
Patrick Walton
16a0f72f8c
rustc: Throw out some more regions when normalizing types
2012-08-02 18:14:50 -07:00
Lindsey Kuper
51b9674ed7
Remove "iface" from keyword table.
2012-08-02 18:10:07 -07:00
Graydon Hoare
4779d2b392
De-duplicate core::hash some, refactor the traits.
2012-08-02 18:06:33 -07:00
Graydon Hoare
009352101d
Shift writer_util to a derived impl attached to the writer trait
2012-08-02 18:06:33 -07:00
Graydon Hoare
ff00edb7e1
Add target_word_size cfg variable
2012-08-02 18:06:33 -07:00
Graydon Hoare
b14a6aca9f
Cleanups in the int and uint templates.
2012-08-02 18:06:33 -07:00
Graydon Hoare
4019d3a86b
Add trait to emacs keyword table.
2012-08-02 18:06:33 -07:00
Lindsey Kuper
2f832d4b2d
test: "iface" -> "trait" in filenames.
2012-08-02 17:58:56 -07:00
Brian Anderson
b8f5dde9d4
Register snapshots
2012-08-02 17:45:35 -07:00
Lindsey Kuper
65e0e30e59
Make typeck::collect aware of provided methods in traits.
2012-08-02 17:15:36 -07:00
Michael Sullivan
2fe299d1a5
Extend ast_map to know about method declarations in traits.
2012-08-02 16:02:30 -07:00
Niko Matsakis
97452c0ca1
Remove modes from map API and replace with regions.
...
API is (for now) mostly by value, there are options to use it by
reference if you like. Hash and equality functions must be pure
and by reference (forward looking to the day when something
like send_map becomes the standard map).
2012-08-02 15:53:28 -07:00
Niko Matsakis
476ce459bd
update ctags def'n which had fallen somewhat out of date
2012-08-02 15:53:27 -07:00