Commit graph

52 commits

Author SHA1 Message Date
Brian Anderson
518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00
Marijn Haverbeke
cd440d338e Remove or _-prefix all unused function arguments
This should make the compilation process a bit less noisy.
2011-08-18 10:02:13 +02:00
Erick Tryzelaar
af21a27002 Port the compiler to the expr foo::<T> syntax. 2011-08-16 15:05:56 -07:00
Erick Tryzelaar
e4a0f997fb Port the compiler to the typaram foo<T> syntax. 2011-08-16 15:05:56 -07:00
Brian Anderson
f05a91a0dc Rename std::ivec to std::vec 2011-08-16 10:36:19 -07:00
Lindsey Kuper
f91351aaf6 The wonky for...in... whitespace was bothering me. Sorry! 2011-08-15 22:19:50 -07:00
Paul Stansifer
c48036c0b7 Make spans into stacks (to store expansion backtraces). 2011-08-15 15:35:27 -07:00
Brian Anderson
0fed53921f Remove ebmlivec module 2011-08-12 12:14:06 -07:00
Brian Anderson
7d05da96f7 Rename std::ioivec to std::io 2011-08-12 12:08:27 -07:00
Brian Anderson
119f43e0c7 Rename str::connect_ivec to str::connect 2011-08-12 12:08:27 -07:00
Brian Anderson
740196987e Rename std::str::unsafe_from_bytes_ivec to unsafe_from_bytes 2011-08-12 12:08:27 -07:00
Brian Anderson
2e7e58812b Remove vec version of str::bytes, rename bytes_ivec to str::bytes 2011-08-12 12:08:26 -07:00
Erick Tryzelaar
8b15045224 Port the compiler to the ivec type [T] syntax. 2011-08-09 15:53:26 -07:00
Graydon Hoare
59c441a66a Encode, decode, and thread through typechecking all the param kinds, not just the counts. 2011-07-29 16:40:30 -07:00
Marijn Haverbeke
6e2a7bff7f Fix damage done by the pretty-printer 2011-07-27 15:54:33 +02:00
Marijn Haverbeke
df7f21db09 Reformat for new syntax 2011-07-27 15:54:33 +02:00
Marijn Haverbeke
aea537779e Remove all uses of tuples from the compiler and stdlib 2011-07-26 14:06:02 +02:00
Patrick Walton
917afa4cc9 rustc: Remove a bunch of exterior vectors 2011-07-15 11:38:46 -07:00
Graydon Hoare
49da7da441 Fix long line. 2011-07-14 12:55:17 -07:00
Patrick Walton
be489ee9e2 rustc: Move much of metadata reading over to interior vectors 2011-07-14 12:00:48 -07:00
Brian Anderson
f5d604f0c3 Decode types across multiple crates. Closes #632 2011-07-08 15:07:14 -07:00
Brian Anderson
4319e7a655 Recursively load dependencies of external crates. Issue #632 2011-07-08 14:07:41 -07:00
Brian Anderson
4c0a2ed378 Fix newlines when outputting crate attributes with --ls 2011-07-08 11:34:15 -07:00
Brian Anderson
3070439c00 Encode/decode a crate's externel dependencies. Issue #632
The encoding is very simple right now, just the crate name. Ultimately this
won't be enough for our versioning needs, but it should fill our immediate
need of being able to correlate encoded crate numbers to actual crates.
2011-07-08 11:34:15 -07:00
Brian Anderson
00d54018f1 Cleanup decoding and crate searching 2011-07-08 09:37:01 -07:00
Brian Anderson
06391dda02 Make the interface to metadata::csearch more consistent 2011-07-08 09:37:01 -07:00
Brian Anderson
9ebb60d38b Extract various dependencies from metadata::decoder to metadata::csearch 2011-07-08 09:37:01 -07:00
Brian Anderson
cc2924068f Replace various ints with ast::crate_nums 2011-07-08 09:37:01 -07:00
Brian Anderson
513b2276c2 Remove non-existant export from metadata::decoder 2011-07-08 09:37:00 -07:00
Brian Anderson
82983e5005 Replace the crate cache in session with the one in cstore 2011-07-08 09:37:00 -07:00
Brian Anderson
e29ef1bec2 Refactor a few things in the metadata module
Rename metadata::tags to metadata::common. Move some utility functions from
metadata::encoder to metadata::common.
2011-07-07 13:31:11 -07:00
Brian Anderson
b723082cdb Rename hash_def_id to hash_node_id 2011-07-07 13:31:11 -07:00
Patrick Walton
401b6362d7 rustc: Make meta items into interior vectors 2011-07-06 15:46:03 -07:00
Patrick Walton
0226f56115 rustc: Convert attribute in the AST to interior vectors 2011-07-06 15:15:00 -07:00
Patrick Walton
1d57800236 rustc: Migrate tag variants to interior vectors 2011-07-06 15:13:54 -07:00
Patrick Walton
bbdba21b1f rustc: Revert the conversion to interior vectors due to heap corruption 2011-07-06 11:26:26 -07:00
Patrick Walton
c927d97fa0 rustc: Convert attribute in the AST to interior vectors 2011-07-06 11:09:08 -07:00
Patrick Walton
5703bd1760 rustc: Migrate tag variants to interior vectors 2011-07-06 11:09:07 -07:00
Brian Anderson
2cb129355b Change ast::meta_name_value to accept any literal, not just string
This isn't useful for much of anything yet, since metadata::encoder doesn't
know how to handle the non-string variants.

Issue #611
2011-07-05 17:25:18 -07:00
Marijn Haverbeke
6fd6fdea93 Move everything syntax-related to syntax/, break deps on rest of compiler
src/comp/syntax is currently just a sub-module of rustc, but it will,
in the near future, be its own crate. This includes:

 - The AST data structure
 - The parser
 - The pretty-printer
 - Visit, walk, and fold
 - The syntax extension system
 - Some utility stuff that should be in the stdlib*

*) Stdlib extensions currently require a snapshot before they can be
   used, and the win build is very broken right now. This is temporary
   and will be cleaned up when one of those problems goes away.

A lot of code was moved by this patch, mostly towards a more organized
layout. Some package paths did get longer, and I guess the new layout
will take some getting used to. Sorry about that!

Please try not to re-introduce any dependencies in syntax/ on any of
the other src/comp/ subdirs.
2011-07-05 15:57:21 +02:00
Brian Anderson
70a28dc238 Cleanup attribute code. Issue #487 2011-07-01 10:45:30 -07:00
Tim Chevalier
d8db9a0fe1 Kill unused variables 2011-06-30 12:37:30 -07:00
Marijn Haverbeke
31ec26d46a Make calling resource destructors work cross-crate
Tydescs are currently re-created for each compilation unit (and I
guess for structural types, they have to be, though the duplication
still bothers me). This means a destructor can not be inlined in the
drop glue for a resource type, since other crates don't have access to
the destructor body.

Destructors are now compiled as separate functions with an external
symbol that can be looked up in the crate (under the resource type's
def_id), and called from the drop glue.
2011-06-30 18:36:12 +02:00
Brian Anderson
82a74fcb3f Remove the last traces of the distinction between export / local meta items
Issue #487
2011-06-28 16:55:07 -07:00
Brian Anderson
a83b64d15d Rework how linkage attributes are determined
The meta items within a crate's link attribute are used in linkage:

 #[link(name = "std",
        vers = "1.0",
        custom = "whatever")];

Name and vers are treated specially, and everything else is hashed together
into the crate meta hash.

Issue #487
2011-06-28 15:25:47 -07:00
Brian Anderson
0608e277b6 Add some helper functions for attributes. Issue #487 2011-06-28 15:25:47 -07:00
Brian Anderson
cab73f8897 Write metadata for more meta_item types. Issue #487 2011-06-28 10:12:05 -07:00
Brian Anderson
f53c4f79d7 Write metadata for crate attributes. Issue #487 2011-06-28 10:03:41 -07:00
Brian Anderson
d328c7e03e List crate attributes when running rustc with '--ls' 2011-06-28 10:03:40 -07:00
Brian Anderson
a72481f90b Rename metadata::defs to metadata::tags 2011-06-27 16:43:50 -07:00