Niko Matsakis
a83ad1b9e6
encode variant names and have log print them out.
2012-01-17 10:33:28 -08:00
Tim Chevalier
c3bc8fada8
Allow omission of the '.' after nullary tag patterns
...
This commit allows patterns like:
alt x { some(_) { ... } none { } }
without the '.' after none. The parser suspends judgment about
whether a bare ident is a tag or a new bound variable; instead,
the resolver disambiguates.
This means that any code after resolution that pattern-matches on
patterns needs to call pat_util::normalize_pat, which consults
an environment to do this disambiguation.
In addition, local variables are no longer allowed to shadow
tag names, so this required changing some code (e.g. renaming
variables named "mut", and renaming ast::sub to subtract).
The parser currently accepts patterns with and without the '.'.
Once the compiler and libraries are changed, it will no longer
accept the '.'.
2012-01-17 10:08:16 -08:00
Tim Chevalier
a7bd817017
Fail slightly more gracefully when given an -o filename that doesn't have an extension
2012-01-17 10:08:16 -08:00
Marijn Haverbeke
87418dbc93
Prevent pretty-printer from trying to consume stdin twice
...
Why this didn't fail on my machine, I don't know.
2012-01-17 17:44:38 +01:00
Marijn Haverbeke
54d5a9846f
Try to fix pretty-printer failure
...
I can't reproduce it on my side, unfortunately.
2012-01-17 17:12:58 +01:00
Marijn Haverbeke
08c16b17e9
Fix --pretty normal, reorganize some code in driver.rs
...
There is now only one path doing crate expanding and typechecking,
which should make it less likely for the pretty-printing code to be
broken by changes to the compilation pipeline.
Closes #1536
2012-01-17 16:42:49 +01:00
Marijn Haverbeke
1c7a62c93b
Use a memset upcall to zero things without static alignment
...
This fixes issues #843 and #1546 . The cost of an upcall is
unfortunate, though. I assume there must be a way to simply manually
compute the pointer or size, using something akin to the formula in
`align_to` in `rust_util.h`. I could not get this to work,
unfortunately.
2012-01-17 14:04:55 +01:00
Marijn Haverbeke
e046360e69
Add an std::md4 module
2012-01-17 12:02:04 +01:00
Brian Anderson
d367cdf1d9
rustdoc: Write headers for modules
2012-01-16 23:10:25 -08:00
Brian Anderson
b8840cbee6
rustdoc: Add a pass to prune undocumented items
2012-01-16 22:50:00 -08:00
Brian Anderson
ba41342279
rustdoc: Add gen::subsection for managing header levels
2012-01-16 22:01:25 -08:00
Brian Anderson
ab86642e35
rustdoc: Don't use by copy in fst/snd to work around segv
...
Issue #1546
2012-01-16 21:56:21 -08:00
Brian Anderson
27fe23dcaa
rustdoc: Refactor header writing a bit
2012-01-16 21:37:29 -08:00
Brian Anderson
bd63c3928e
rustc: Move some attribute accessors from rustdoc to rustc
2012-01-16 21:12:36 -08:00
Brian Anderson
4f2ad6b124
rustdoc: Move fst and snd into util mod
2012-01-16 21:12:36 -08:00
Brian Anderson
75dbb0f193
rustdoc: Use attr API in attr_parser
2012-01-16 21:12:36 -08:00
Brian Anderson
29409afe1a
rustdoc: Add a fallthrough path to meta_item search in parse_fn
2012-01-16 21:12:35 -08:00
Brian Anderson
cf40b60b5a
rustdoc: Begin writting the attribute extracting pass
2012-01-16 21:12:35 -08:00
Brian Anderson
a0ed75bc49
rustdoc: Use the parsing method that supports .rc files
2012-01-16 21:12:35 -08:00
Brian Anderson
645035a715
rustdoc: Convert tystr_pass to use astsrv
2012-01-16 21:12:35 -08:00
Brian Anderson
447f1fd4af
rustdoc: Add a pass type and a run_passes function
2012-01-16 21:12:35 -08:00
Brian Anderson
74d4989876
rustdoc: Add extract::from_srv to extract a doc from an astsrv
2012-01-16 21:12:35 -08:00
Brian Anderson
439a28abe0
rustdoc: Add module astsrv to provide access to the (non-sendable) AST
2012-01-16 21:12:35 -08:00
Brian Anderson
d455d46b15
rustdoc: Remove non-attribute related stuff from attr_parser
2012-01-16 21:12:35 -08:00
Brian Anderson
c87b820298
rustdoc: Add attr_pass for extracting attributes
2012-01-16 21:12:35 -08:00
Brian Anderson
b768df4ea3
rustdoc: Remove unused import from extract module
2012-01-16 21:12:35 -08:00
Brian Anderson
22d182acd7
rustdoc: Remove attribute parsing from extract module
2012-01-16 21:12:35 -08:00
Brian Anderson
04294e437b
rustdoc: Cleanup
2012-01-16 21:12:35 -08:00
Brian Anderson
6e0bcb5bd0
rustdoc: Eliminate AST usage in gen module
2012-01-16 21:12:34 -08:00
Brian Anderson
c4de718f37
rustdoc: Add tystr_pass module for extracting type strings
2012-01-16 21:12:34 -08:00
Brian Anderson
497814642f
rustdoc: Make fold polymorphic on a context type
...
This will allow it to be instantiated for non-sendable contexts
2012-01-16 21:12:34 -08:00
Brian Anderson
5457b4d3fb
rustdoc: Add fold module
2012-01-16 21:12:34 -08:00
Brian Anderson
e77b8db707
rustdoc: Convert fn return type to retdoc record
2012-01-16 21:12:34 -08:00
Brian Anderson
63dcc64275
rustdoc: Change fndoc's arg list to a vec from map
2012-01-16 21:12:34 -08:00
Brian Anderson
b6ad840c18
rustdoc: Make gen module exports explicit
2012-01-16 21:12:34 -08:00
Brian Anderson
5f25804f46
rustdoc: Push imports down into submodules
2012-01-16 21:12:34 -08:00
Haitao Li
ef0775fec8
build: Check and set perf --log-fd option
...
Linux perf tool version 3.2 introduced a new option "--log-fd" defaults
to 0, which leads to error "Failed opening logfd: Illegal argument" when
executing perf tests.
Set logfd to stderr to let perf test work.
Issue #1538
2012-01-17 10:48:46 +08:00
Graydon Hoare
293678847b
Convert a bunch of material on items, statements, expressions and typestates.
2012-01-16 18:04:48 -08:00
Graydon Hoare
236b304f19
Convert some material covering items, view-items, types.
2012-01-16 16:13:34 -08:00
Graydon Hoare
e20d906718
Merge pull request #1540 from lht/exclude-stage3-by-default
...
build: Stop building stage3 on normal test cycles
2012-01-16 12:18:45 -08:00
Josh Matthews
ea1e360c15
Ensure library file always has a proper suffix.
2012-01-16 13:35:35 -05:00
Josh Matthews
1223bbc4de
Make str::replace smarter.
2012-01-16 13:35:35 -05:00
Marijn Haverbeke
b3927d6052
Don't write out type names when hashing types
...
I hope this is why my patch made things so much slower...
2012-01-16 17:03:51 +01:00
Marijn Haverbeke
d673f76fdf
Remove misguided indirect return in trans_closure
...
Closes #1528
2012-01-16 14:27:41 +01:00
Haitao Li
394a80cfd8
build: Stop building stage3 on normal test cycles
...
Issue #1419
2012-01-16 20:30:39 +08:00
Marijn Haverbeke
498ad91d06
Upgrade CodeMirror mode used to highlight the tutorial code
2012-01-16 13:07:16 +01:00
Marijn Haverbeke
936c933fd8
Move emacs mode into tree
2012-01-16 12:44:24 +01:00
Marijn Haverbeke
1375b31c1c
Store type names in crate metadata
...
Improves type error messages referring to external types.
Issue #1507
2012-01-16 12:08:00 +01:00
Marijn Haverbeke
c2fe7b6398
When pretty-printing fn types, leave off arg modes when they are the default
...
This reduces ++/&& spam in the output to a bare minimum.
Issue #1507
2012-01-16 12:08:00 +01:00
Kevin Atkinson
e1c50c4410
Don't evaluate discriminator value constants when parsing.
...
Remove disr_val from ast::variant_ and always use ty::variant_info
when the value is needed. Move what was done during parsing into
other passes, primary typeck.rs. This move also correctly type checks
the disr. value expression; thus, fixing rustc --pretty=typed when
disr. values are used.
2012-01-16 11:19:33 +01:00