about summary refs log tree commit diff
path: root/src/comp/front/creader.rs
AgeCommit message (Collapse)AuthorLines
2011-06-27Rename middle::metadata to metadata::cwriter. Move creader to metadataBrian Anderson-895/+0
Preparation for a lot more metadata refactoring
2011-06-27Record and link with used native libraries.Rafael Ávila de Espíndola-3/+39
2011-06-25Partial implementation of resourcesMarijn Haverbeke-0/+5
Non-copyability is not enforced yet, and something is still flaky with dropping of the internal value, so don't actually use them yet. I'm merging this in so that I don't have to keep merging against new patches.
2011-06-24Remove uses of variable name 'res' from rustcMarijn Haverbeke-8/+7
This in preparation of making 'res' a keyword for defining resources. Please don't introduce too many new ones in the meantime...
2011-06-24Remove def_objMarijn Haverbeke-8/+2
Since obj constructors and types have different def_ids now, their def can simply be a def_fn and a def_ty.
2011-06-22rustc: Limit creader exportsBrian Anderson-0/+7
2011-06-22rustc: Introduce and parse additional meta_item formsBrian Anderson-12/+34
Examples: #[test], #[link(name = "vers")] Issue #487
2011-06-21Serialize constraints in types (literal arguments still not supported)Tim Chevalier-24/+55
This involved, in part, changing the ast::def type so that a def_fn has a "purity" field. This lets the typechecker determine whether functions defined in other crates are pure. It also required updating some error messages in tests. As a test for cross-crate constrained functions, I added a safe_slice function to std::str (slice(), with one of the asserts replaced with a function precondition) and some test cases (various versions of fn-constraint.rs) that call it. Also, I changed "fn" to "pred" for some of the boolean functions in std::uint.
2011-06-20Get rid of def_ids and anns in AST nodes, use single node_idMarijn Haverbeke-5/+5
This reduces some redundancy in the AST data structures and cruft in the code that works with them. To get a def_id from a node_id, apply ast::local_def, which adds the local crate_num to the given node_id. Most code only deals with crate-local node_ids, and won't have to create def_ids at all.
2011-06-20Remember the library files we used in rustc and pass them to the "linker".Rafael Ávila de Espíndola-1/+2
This avoid the hardcoded -lstd, allows programs to use other crates and avoids any differences that may exist in the rustc and ld search logic.
2011-06-16Reformat a bunch of recent churn.Graydon Hoare-2/+1
2011-06-15Refactor data structures representing constraints (again...)Tim Chevalier-4/+4
I added a "resolved" version of the ast::constr type -- ty::constr_def -- that has a def_id field instead of an ann_field. This is more consistent with other types and eliminates some checking. Incidentally, I removed the def_map argument to the top-level function in middle::alias, since the ty::ctxt already has a def_map field.
2011-06-15Reformat source tree (minus a couple tests that are still grumpy).Graydon Hoare-196/+155
2011-06-10Reject programs with unsatisfied predicate constraintsTim Chevalier-1/+5
Generate appropriate constraints for calls to functions with preconditions, and reject calls where those constraints don't hold true in the prestate. ...by which I mean that it works for one test case :-)
2011-06-10Implement meta tag matching in creader. Start using it in rustc.rc. Close ↵Graydon Hoare-2/+48
#459. Close #457.
2011-06-10Encode meta tags in the crate and start sketching enhanced logic for ↵Graydon Hoare-16/+67
resolving crate "use" directives. Now with extra "works on OSX" kludging.
2011-06-10Implement mutable/immutable alias distinction.Marijn Haverbeke-2/+6
Before, all aliases were implicitly mutable, and writing &mutable was the same as writing &. Now, the two are distinguished, and assignments to regular aliases are no longer allowed.
2011-06-10Fix all occurrences of writing to immutable aliasesMarijn Haverbeke-4/+4
You'd be surprised.
2011-06-09Revert "Encode meta tags in the crate and start sketching enhanced logic for ↵Patrick Walton-67/+16
resolving crate "use" directives." due to tree bustage This reverts commit ab3635eebef2b8cf0e19cdbc5b4e8dd7a49a4658.
2011-06-09rustc: Write interior vecs and strings into the metadata and add logic for ↵Patrick Walton-0/+2
them in ty_to_str
2011-06-09Encode meta tags in the crate and start sketching enhanced logic for ↵Graydon Hoare-16/+67
resolving crate "use" directives.
2011-06-09Further support for predicate constraintsTim Chevalier-7/+79
Changed function types to include a list of constraints. Added code for parsing and pretty-printing constraints. This necessitated splitting pprust into two files (pprust and ppaux) to break a circulate dependency, as ty_to_str now needs to print out constraints, which may include literals, but pprust depended on ty.
2011-06-03Parse pointers in metadata.Rafael Ávila de Espíndola-0/+1
2011-05-31Teach the compiler to understand yield and join, as well as using task as a ↵Eric Holk-0/+1
type name.
2011-05-31rustc: Remove unneeded type params from alt patternsBrian Anderson-7/+7
2011-05-26Remove residual uses of fold, and fold itself.Graydon Hoare-28/+33
2011-05-20Make controlflow part of a function typeTim Chevalier-8/+30
Change ty_fn to have a controlflow field. A 'controlflow' is essentially a bit of data that says whether or not this function never returns to the caller (if it never returns, that means it calls "fail" or another "never-returns" function on every control path). Also add syntax for annotating functions that never return: fn foo() -> ! { fail; } for example. Functions marked with ! implicitly have a result type of ty_bot, which is a new type that this commit also adds.
2011-05-19Move the ty_item_table into ty::ctxt.items, move variant_info to ty, and ↵Graydon Hoare-7/+6
start sketching the contains_pointer property on types.
2011-05-17Finally rename std::_xxx to std::xxxMarijn Haverbeke-29/+29
Except for _task, which is still a keyword.
2011-05-16Rewrite everything to use [] instead of vec() in value position.Graydon Hoare-18/+18
2011-05-13Extend crate format to allow multiple definitions for a single nameMarijn Haverbeke-82/+51
The type/value namespace distinction pretty much works now. Module namespace is up next.
2011-05-12Downcase std modules again, move to :: for module dereferencingMarijn Haverbeke-230/+232
This should be a snapshot transition.
2011-05-12Change module dereference syntax from . to ::Marijn Haverbeke-1/+1
This will need to be a snapshot.
2011-05-11Rewrite comp/middle/resolve.rsMarijn Haverbeke-8/+2
* Cleans up the algorithm * Move first pass to walk (second still folds) * Support part of a type/value namespace split (crate metadata and module indices still need to be taught about this) * Remove a few blatant inefficiencies (import tables being recreated for every lookup, most importantly)
2011-05-09Alias-ify fold and its users, remove another 85kb.Graydon Hoare-3/+4
2011-05-09rustc: Alias fix part 1 -- Separate out AST modes from typechecker modes, ↵Patrick Walton-2/+2
and introduce an "either value or alias" mode
2011-05-06Rename std modules to be camelcasedMarijn Haverbeke-101/+101
(Have fun mergining your stuff with this.)
2011-05-05rustc: Add Rust intrinsic support to the crate metadata reader and writerPatrick Walton-3/+4
2011-05-04Add a structure for passing option flags around the compiler, put it in ↵Graydon Hoare-3/+2
session, and use it.
2011-05-02Un-revert "Use different syntax for checks that matter to typestate", fixing ↵Patrick Walton-7/+7
the problem. This reverts commit d08b443fffb1181d8d45ae5d061412f202dd4118.
2011-05-02Revert "Use different syntax for checks that matter to typestate"Graydon Hoare-7/+7
This reverts commit aa25f22f197682de3b18fc4c8ba068d1feda220f. It broke stage2, not sure why yet.
2011-05-02Use different syntax for checks that matter to typestateTim Chevalier-7/+7
This giant commit changes the syntax of Rust to use "assert" for "check" expressions that didn't mean anything to the typestate system, and continue using "check" for checks that are used as part of typestate checking. Most of the changes are just replacing "check" with "assert" in test cases and rustc.
2011-04-29Intern metadata while writing, shrink stage1 from 12mb to 5.7mb.Graydon Hoare-16/+49
2011-04-25rustc: Pass a "type context" around instead of directly passing the type ↵Patrick Walton-45/+43
store; prep for removing type annotations
2011-04-22rustc: Thread the type store through everything that needs to access type ↵Patrick Walton-1/+1
structures
2011-04-22rustc: Switch @ty.t to ty.t so that we can change it to a uintPatrick Walton-6/+6
2011-04-22rustc: Eliminate the direct use of ty.t.structPatrick Walton-1/+1
2011-04-21rustc: Pass a type store around, which does nothing yetPatrick Walton-43/+45
2011-04-20rustc: Remove all manual type construction outside ty.rsPatrick Walton-56/+51
2011-04-19Remove effect system from src.Graydon Hoare-9/+9