Tim Chevalier
5a8ba073bc
Make to_str pure and fix const parameters for str-mutating functions
...
Two separate changes that got intertwined (sorry):
Make to_str pure. Closes #3691
In str, change functions like push_char to take an &mut str instead of
an &str. Closes #3710
2012-10-11 14:17:59 -07:00
Tim Chevalier
15d8457104
Merge pull request #3700 from erickt/cargo-interner
...
allow interner cache to be shared across parsers (#3699 )
2012-10-09 14:50:01 -07:00
Tim Chevalier
22efa39382
Revert "Revert "Remove old auto_serialize2 code (needs snapshot)""
...
This reverts commit a33535e441
.
2012-10-08 17:43:45 -07:00
Tim Chevalier
a33535e441
Revert "Remove old auto_serialize2 code (needs snapshot)"
...
This reverts commit 0bd6da8a8c
.
2012-10-08 11:58:54 -07:00
Erick Tryzelaar
1ac75d2269
allow interner cache to be shared across parsers ( #3699 )
2012-10-08 10:42:13 -07:00
Niko Matsakis
ed3689d57c
remove ctor from ast
2012-10-08 06:36:42 -07:00
Erick Tryzelaar
0bd6da8a8c
Remove old auto_serialize2 code (needs snapshot)
2012-10-07 17:20:19 -07:00
Erick Tryzelaar
eb626e7119
Remove the old serializers (needs snapshot)
2012-10-07 17:20:19 -07:00
Erick Tryzelaar
d301dd3686
remove the old auto_serialize syntax extension
2012-10-07 14:56:18 -07:00
Erick Tryzelaar
e1c517ca48
migrate libsyntax/rustc to auto_serialize2
2012-10-07 10:32:25 -07:00
Simon BD
0e3bec0ced
Merge remote-tracking branch 'original/incoming' into incoming
2012-10-06 13:15:18 -05:00
Tim Chevalier
f96a2a2ca1
Remove by-mutable-ref mode from the compiler
...
and test cases. Closes #3513
2012-10-05 22:45:50 -07:00
Tim Chevalier
05999290e2
Finally removing all uses of by-mut-ref
...
The code for the mode itself is still there.
2012-10-05 21:03:40 -07:00
Tim Chevalier
45345bda6a
Remove uses of mutable ref mode.
...
It's still in the compiler right now, but warned about
2012-10-05 16:57:37 -07:00
Tim Chevalier
f8bc0d2545
Revert "wip"
...
This reverts commit ca49fd402a
.
2012-10-05 16:10:08 -07:00
Tim Chevalier
ca49fd402a
wip
2012-10-05 15:39:12 -07:00
Tim Chevalier
e16dbb7888
Demode some code using by-mutbl-ref; warn about by-mutbl-ref
...
The parser now warns about use of mutbl-ref mode, though it's kind
of a lie since this commit doesn't remove support for the mode.
Changed move_val_init to have stage0 and stage1/2 versions, the latter of
which is demoded.
Changed the type that the typechecker expects the move_val_init
intrinsic to have. After this is pushed, I can make a new snapshot,
which will remove the need for the stage0 versions.
2012-10-05 15:37:01 -07:00
Tim Chevalier
8fc60af441
Remove by-copy mode from std, mostly
...
One instance remains in net_tcp due to a foreign fn. Lots of
instances remain in serialization.rs, but IIRC that is being removed.
I had to do unholy things to task-perf-word-count-generic to get it
to compile after demoding pipes. I may well have messed up its
performance, but it passes.
2012-10-04 19:59:47 -07:00
Simon BD
efcd2385ea
Merge remote-tracking branch 'original/incoming' into incoming
...
Conflicts:
src/libstd/json.rs
src/libstd/sort.rs
2012-10-03 21:47:09 -05:00
Patrick Walton
2f451a7bd7
rustc: Only allow imports marked with "pub" to be imported from other modules
2012-10-02 18:15:19 -07:00
Patrick Walton
9284179311
libstd: Switch off legacy modes in both core and std.
2012-10-02 12:20:06 -07:00
Erick Tryzelaar
2569adc5ea
Split auto_serialize2 into two macros
2012-10-01 20:44:30 -07:00
Erick Tryzelaar
4f4160ee3b
Factor out auto_serialize2's impls from each other.
2012-10-01 20:44:30 -07:00
Erick Tryzelaar
c46b6f9efb
auto_serialize2 should deserialize structs using read_struct
2012-10-01 20:44:30 -07:00
Erick Tryzelaar
81423a3866
Add deserializable and more types to serialization2
2012-10-01 20:43:59 -07:00
Tim Chevalier
b18320446e
Move over to calling ptr::addr_of
...
Everything should now call ptr::addr_of instead of
ptr::p2::addr_of. Only the pipes macro code when compiled
by stage0 will call ptr::p2::addr_of. Needs a snapshot to get
rid of that.
2012-10-01 15:12:09 -07:00
Tim Chevalier
72ae42627b
Call 'new' instead of 'old' extfmt code, preparing for snapshot
2012-10-01 15:12:09 -07:00
Tim Chevalier
3639d38d5c
Add a demoded version of ptr::addr_of
...
Currently, the new version is ptr::p2::addr_of and the old one is
ptr::addr_of. This is kind of cheesy, but I need a snapshot before I
can ditch the old version, since the pipe compiler generates calls to
addr_of.
core is converted over to use the new version, std is not.
2012-09-28 22:19:01 -07:00
Brian Anderson
c9fb1b19aa
Add allow(deprecated_\*) to syntax, rustc, rustdoc, et al
2012-09-28 18:38:59 -07:00
Tim Chevalier
fec96b2ae0
Demoding in iter: any, all, map_to_vec, flat_map_to_vec, filter_to_vec
2012-09-28 17:44:15 -07:00
Niko Matsakis
565b39b302
rename iter2 to each2, make it follow iterator protocol
2012-09-28 16:13:03 -07:00
Brian Anderson
9e0a43c932
Pretty-print item visibility modifiers
2012-09-28 15:04:23 -07:00
Tim Chevalier
2f4ee89119
Demode extfmt
...
Needs a snapshot before this can be completed, because I changed
the mode for conv_poly.
2012-09-28 13:47:45 -07:00
Niko Matsakis
21519bc7e0
demode vec
2012-09-28 13:27:45 -07:00
Erick Tryzelaar
b68d287780
libsyntax: Fix long line
2012-09-27 19:24:11 -07:00
Brian Anderson
463d5d5f0b
Merge pull request #3607 from gutworth/incoming
...
utterly trivial refactoring
2012-09-27 18:35:43 -07:00
Brian Anderson
438bdd687b
core: More option demoding
2012-09-27 17:49:10 -07:00
Simon BD
868d10160f
Put function argument last in sort function. Fixes #3265 .
2012-09-27 19:05:13 -05:00
Patrick Walton
0bcb3bc536
libsyntax: Parse visibility modifiers before foreign items
2012-09-27 12:48:09 -07:00
Benjamin Peterson
459fe6ad55
factor out common lines
2012-09-27 15:05:06 -04:00
Brian Anderson
e8fe718bfd
core: Replace map/map_default with map_ref/map_default_ref
2012-09-26 20:15:23 -07:00
Tim Chevalier
996ec62cbf
Remove spurious by-ref argument to destructors
...
Destructors were internally declared with an extra (hidden) nil-typed
argument that was passed in by-ref mode. This was causing spurious
mode warnings. Deleted it. Also some misc. cleanup because I
couldn't help myself.
2012-09-26 19:42:02 -07:00
Brian Anderson
8f0e9ff029
Long lines
2012-09-26 18:23:05 -07:00
Niko Matsakis
67a8e7128a
Demode vec::push (and convert to method)
2012-09-26 18:02:07 -07:00
Erick Tryzelaar
b96af73159
turn ast::ident into a struct
...
This will help with the auto_serialize2 migration. We have to change
ident from a type alias to uint into a unique type. We need to use
a struct instead of a "enum ident = token::str_num" because structs
support constants, but newtypes do not.
2012-09-26 16:20:24 -07:00
Erick Tryzelaar
c0b9986c8f
libstd: change serialization2 to take &self argument methods
...
Unfortunately this trips over issue (#3585 ), where auto-ref isn't
playing nicely with @T implementations. Most serializers don't
care, but prettyprint2 won't properly display "@" until #3585 is
fixed.
2012-09-26 16:20:24 -07:00
Erick Tryzelaar
cd93441705
auto_serialize2 should fully qualify std::serialization2::deserialize
2012-09-26 16:20:24 -07:00
Erick Tryzelaar
99d84bacc8
libsyntax: remove quasiquoter from auto_serialize2
2012-09-26 16:20:24 -07:00
Erick Tryzelaar
2ba9d2a888
libsyntax: implement auto_serialize2 for enums, records, and structs
2012-09-26 16:20:24 -07:00
Erick Tryzelaar
dd502fc6e4
Allow hashmaps to infer their types
2012-09-26 16:20:24 -07:00
Eric Holk
135ebca8aa
Refactoring ReaderUtil trait, combining it with the traitless impl on Reader.
2012-09-26 15:55:42 -07:00
Tim Chevalier
101bc62ad9
Revert "fix modes on dtors"
...
This reverts commit d38b97a170
.
(Accidentally checked this in, oops)
2012-09-26 10:43:11 -07:00
Tim Chevalier
d38b97a170
fix modes on dtors
2012-09-26 10:42:11 -07:00
Vincent Belliard
ef23d77633
fix issue #3535 and add colon between mode and type when dumping funcion prototype
2012-09-26 07:48:19 -07:00
Graydon Hoare
9c6ae65865
Support visibility qualifiers in crate directives properly.
2012-09-24 17:29:32 -07:00
Brian Anderson
afd91f8a56
Register snapshots. Remove redundant Eq impls, Makefile hacks
2012-09-23 23:01:49 -07:00
Brian Anderson
4a78f9b166
core: Demode option
2012-09-23 17:15:00 -07:00
Niko Matsakis
0a26edca75
Fix trans for region patterns (&P)
2012-09-23 13:30:20 -05:00
Niko Matsakis
ba3eebd41d
Make it illegal to use modes in a fn signature with providing
...
an explicit variable name. (Step one to changing the defaults)
First step to #3535
2012-09-23 13:30:13 -05:00
Niko Matsakis
3d59ac3a19
De-mode vec::map, vec::eachi, vec::rev_each, vec::rev_eachi
2012-09-21 19:13:55 -07:00
Patrick Walton
f3d6c506a4
libsyntax: Fix botched merge
2012-09-21 18:44:00 -07:00
Patrick Walton
d48396c986
libcore: De-mode str
2012-09-21 18:37:06 -07:00
Graydon Hoare
dffe188991
Install new pub/priv/export rules as defaults, old rules accessible under #[legacy_exports];
2012-09-21 18:11:43 -07:00
Brian Anderson
f5be40384f
Revert "syntax: Make attributes sendable for rustdoc's benefit"
...
This reverts commit 90e3665fa7
.
2012-09-20 18:15:39 -07:00
Brian Anderson
90e3665fa7
syntax: Make attributes sendable for rustdoc's benefit
2012-09-20 17:37:21 -07:00
Patrick Walton
9117dcb968
rustc: De-mode all overloaded operators
2012-09-20 09:48:05 -07:00
Brian Anderson
1397dca2dd
core: Move TLS to task::local_data
2012-09-19 19:08:32 -07:00
Niko Matsakis
cfed923600
demode the each() method on vec and other iterables.
2012-09-19 17:03:01 -07:00
Graydon Hoare
1ffd90edbc
Remove redundant hashmap constructor functions.
2012-09-19 15:51:44 -07:00
Brian Anderson
0c82c00dc4
libsyntax: Remove the restricted keyword concept
2012-09-19 11:44:05 -07:00
Brian Anderson
76f8cfb26c
libsyntax: Move 'unsafe' to the strict keywords list
2012-09-19 11:44:05 -07:00
Niko Matsakis
9cf271fe96
De-mode vec::each() and many of the str iteration routines
...
Note that the method foo.each() is not de-moded, nor the other
vec routines.
2012-09-19 10:52:59 -07:00
Niko Matsakis
8d4928f780
Revert "replace explicit calls to vec::each with vec::each_ref, partially demode str"
...
This reverts commit 1be24f0758
.
Not quite ready.
2012-09-18 21:41:13 -07:00
Niko Matsakis
1be24f0758
replace explicit calls to vec::each with vec::each_ref, partially demode str
2012-09-18 21:31:00 -07:00
Brian Anderson
2906f2de31
core: Rename 'unsafe' mod to 'cast'
2012-09-18 19:36:25 -07:00
Patrick Walton
e653d493fb
rustc: Remove legacy mode inference, unless #[legacy_modes] is used
2012-09-18 15:53:04 -07:00
Erick Tryzelaar
d0d68c6036
libcore: make a copyless io::BytesWriter
2012-09-18 12:56:57 -07:00
Brian Anderson
2d11a04e74
libsyntax: Remove 'unchecked_blk' from AST
2012-09-18 11:51:17 -07:00
Brian Anderson
d0d8b7fe64
Remove 'unchecked' keyword
2012-09-18 11:31:58 -07:00
Niko Matsakis
efa6675f1d
make filetype() include the "." ( fixes #3412 )
2012-09-18 11:29:53 -07:00
Brian Anderson
859a892eb0
Add allow(non_camel_case_types) to unconverted crates
2012-09-18 11:21:07 -07:00
Niko Matsakis
7107b4eff5
Have parser recognize static, self region.
...
Fixes a bug in methods that &self couldn't be referenced in the
body. Also fixes #2479 .
2012-09-14 15:22:15 -07:00
Brian Anderson
d71179f410
Promote 'fail' to a strict keyword
2012-09-13 17:10:01 -07:00
Brian Anderson
7568dd4564
Promote 'const', 'copy', 'fn' to strict keywords
2012-09-12 16:00:22 -07:00
Brian Anderson
3057790f4b
Rename 'contextual' keywords to 'temporary'
2012-09-12 15:22:34 -07:00
Brian Anderson
287114a3b9
Remove some transitional code
2012-09-12 15:09:21 -07:00
Niko Matsakis
5d540de769
fixup mutability of vec::each, make iter_bytes pure
...
also, change DVec() to work with imm vectors rather than mut ones
2012-09-12 13:29:31 -07:00
Tim Chevalier
86e02554fd
Make moves in arguments explicit in libsyntax and rustc
2012-09-12 11:33:40 -07:00
Brian Anderson
320331fe35
Use a different strategy for transitioning to camel case extfmt
2012-09-12 11:22:48 -07:00
Niko Matsakis
8a8f200d10
Introduce auto adjustment table to subsume autoderef/autoref/borrowings.
...
Fixes #3261
Fixes #3443
2012-09-11 21:25:01 -07:00
Brian Anderson
2c6c963f61
Convert core::extfmt to camel case
2012-09-11 19:41:07 -07:00
Brian Anderson
be1fdf983f
Promote 'impl' from restricted keyword to strict
2012-09-11 19:28:44 -07:00
Brian Anderson
3d2a74a160
Reserve 'be' as a keyword
2012-09-11 19:26:48 -07:00
Brian Anderson
ea01ee2e9e
Convert 'use' to 'extern mod'. Remove old 'use' syntax
2012-09-11 19:25:43 -07:00
Brian Anderson
fb851242b7
Promote 'pub' and 'priv' from restricted to strict keywords
2012-09-11 18:17:26 -07:00
Brian Anderson
27cc0a36b6
Promote 'struct' from a restricted keyword to a strict keyword
2012-09-11 17:15:33 -07:00
Brian Anderson
1203da3b9d
Remove priv sections from classes. Obsolete the syntax
2012-09-11 15:29:37 -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
Tim Chevalier
f8b3eaae82
Make all moves explicit in libsyntax
2012-09-10 18:28:47 -07:00