about summary refs log tree commit diff
path: root/src/rustc/metadata
AgeCommit message (Collapse)AuthorLines
2012-05-08Start parsing pub/priv on regular itemsMarijn Haverbeke-21/+21
Issue #1893
2012-05-07make it illegal to implicitly capture mutable variablesNiko Matsakis-2/+1
this is the final part of #1273
2012-05-02Remove commented-out code and old comments that accidentally snuck inTim Chevalier-44/+4
2012-05-02Encode the ifaces a class implements in metadataTim Chevalier-39/+118
This lets you use class A as if it had type B if A implements B, and A and B are in different crates from your own. Closes #2285
2012-05-01Don't re-export a glob-imported ID when the same ID is defined withinTim Chevalier-1/+1
a module See the test case I added (issue-2316-c) for a concrete example. issue-2316 also contains the originally reported test case. resolve was using bitwise or instead of logical or when checking exports, resulting in excessively eager evaluation. A one-line fix that took six hours to isolate ;-)
2012-04-30Stop inferring bot/static when types/regions are unconstrained.Niko Matsakis-4/+4
Also, some other changes that came up along the way: - add a 'blk' region for the current block. - detect unused type/region variables.
2012-04-25lots of work to make iface/impls parameterized by regionsNiko Matsakis-19/+20
- paths can now take region parameters, replacing the dirty hack I was doing before of abusing vstores. vstores are now a bit of a hack though. - fix various small bugs: - we never checked that iface types were compatible when casting to an iface with `as` - we allowed nonsense like int<int> - and more! (actually that may be it)
2012-04-25More slice use in vec, io, str, ebml, metadata encoder and decoder.Graydon Hoare-29/+29
2012-04-23rustc: Eliminate trans dependency from metadata::tyencodeBrian Anderson-12/+19
2012-04-23Allow classes to be cast to ifaces that are in the same crateTim Chevalier-11/+7
I had to xfail one existing test case (class-implements-int) because, I think, of the same bug described in #2272.
2012-04-23encode the borrowing table, add a simple cross-crate borrowing testNiko Matsakis-1/+15
2012-04-23Move map iface over to more `for`-friendly iteration methodsMarijn Haverbeke-3/+3
2012-04-23Simplify representation of ast::pathMarijn Haverbeke-2/+2
2012-04-20Log decoded inline_items when debug is active.Graydon Hoare-0/+7
2012-04-20Implement tydecode::parse_vstore.Graydon Hoare-1/+14
2012-04-19make nominal types optionally parameterized by a self region.Niko Matsakis-69/+179
Issue #2201.
2012-04-18syntax: Put the main parser interface in mod parseBrian Anderson-4/+4
2012-04-18Stop duplicating non-generic resource destructorsMarijn Haverbeke-0/+3
Closes #2177
2012-04-16rewrite region resolution so it takes place in typeckNiko Matsakis-6/+1
2012-04-16rustc: Resolve external impls defined in yet other crates. Issue #2196Brian Anderson-6/+17
2012-04-15syntax: Cleanup attr module. Closes #1545Brian Anderson-6/+7
2012-04-11Allow classes to implement ifacesTim Chevalier-4/+4
Introduce syntax like: iface animal { ... } class cat implements animal { ... } to allow classes to implement ifaces. Casting classes to ifaces is *not* yet supported. ifaces that a class implements are not yet included in metadata. The syntax is subject to change, and may go away completely if we decide to use duck typing to relate classes with ifaces (see http://smallcultfollowing.com/babysteps/blog/2012/04/10/declared-vs-duckish-typing/ )
2012-04-11Add enough tyencode stuff to stop faulting when we hit error messages.Graydon Hoare-2/+45
2012-04-11Add vstore/evec/estr to compiler.Graydon Hoare-0/+2
2012-04-10Generic classes and generic class methods work cross-crateTim Chevalier-14/+41
Classes can have ty params now. So can methods inside classes. That was probably true before, but now it should still work if you call methods in a class that's defined in a different crate. Yay!
2012-04-09rustc: Add more creader loggingBrian Anderson-0/+17
2012-04-08Check metadata hash when loading transitive dependent cratesHaitao Li-24/+33
Fix issue #2138
2012-04-08Check version when resolving transitive dependent cratesHaitao Li-6/+12
Issue #2138
2012-04-08Encode crate dependencies' hash and version dataHaitao Li-26/+57
2012-04-07Use version and hash in crate_map nameHaitao Li-1/+15
Related issue #2137
2012-04-07Use real crate name in crate_map nameHaitao Li-1/+5
`use` statement may introduce an crate name alias. This patch always uses the link attrbute "name" as the crate's name when building the crate map. Closes #1706
2012-04-06Re-rename option functionsTim Chevalier-15/+15
get_with_default (nee from_maybe) => get_default with_option (nee maybe) => map_default with_option_do (nee may) => iter As per discussion of 21be1379d561b6679a8a2ea47dce88f948c5acca
2012-04-06Convert old-style for loops to new-styleMarijn Haverbeke-65/+61
Most could use the each method, but because of the hack used to disambiguate old- and new-style loops, some had to use vec::each. (This hack will go away soon.) Issue #1619
2012-04-06rustc: Warn when linking to multiple versions of the same crateBrian Anderson-23/+67
This is not something most people want to be doing and may be a source of error.
2012-04-06rustc: Fail when there are multiple matches for 'use'Brian Anderson-6/+28
2012-04-05add static region and also fix regions to be contravariantNiko Matsakis-0/+3
2012-04-05rustc: Don't assume that all crates with the same name are the sameBrian Anderson-21/+59
2012-04-04wip: refactor repr of regionsNiko Matsakis-17/+46
- we now distinguish bound/free parameters (see region-param test case for why this is necessary) - we also track bounds on region variables - also, restructure fold_ty() to have multiple variants without duplication instead of one overloaded folder. This also allows for using block functions.
2012-04-02Rename some core::option functionsTim Chevalier-15/+15
from_maybe => get_with_default maybe => with_option may => with_option_do I know these names are kind of ridiculous, but it's the best I could think of. Feel free to bikeshed. Closes #2081
2012-03-29rustc: Remove the rustsyntax::attr wrapper in frontBrian Anderson-3/+3
2012-03-29rustc: Remove the session dependency from front::attrBrian Anderson-1/+1
2012-03-29Require "self" as base expression for intra-class method or field referencesTim Chevalier-6/+0
All field or method references within a class must begin with "self." now. A bare reference to a field or method in the same class will no longer typecheck.
2012-03-28Allow explicit self-calls within classesTim Chevalier-28/+31
Allow writing self.f() within a class that has a method f. In a future commit, this syntax will be required. For now, you can write either self.f() or f(). I added a "privacy" field to all methods (whether class methods or not), which allowed me to refactor the AST somewhat (getting rid of the class_item type; now there's just class_member).
2012-03-27Enforce mutability declarations in classes; correct shapes for classesTim Chevalier-4/+24
1. Enforce mutability declarations on class fields. Don't allow any mutation of class fields not declared as mutable (except inside the constructor). 2. Handle classes correctly in shape (treat classes like records).
2012-03-26Bulk-edit mutable -> mut.Graydon Hoare-30/+30
2012-03-26rustc: Begin eliminating ext's dependency on the sessionBrian Anderson-9/+6
2012-03-26Enforce privacy declarations for class fields and methodsTim Chevalier-35/+36
2012-03-23Implement new inference algorithm.Niko Matsakis-5/+18
2012-03-23Handle self correctly when translating classesTim Chevalier-1/+1
This change uses the same code for handling the "self" reference for classes as is already used for impls/ifaces. This allows removing the extra maybe_self_id argument (which was just for classes) to trans_closure that I added before. I also rewrote the translation for class ctors so that it doesn't generate new AST nodes (instead translating directly). Also changed visit so that it visits class ctors correctly with visit_fn, and changed typestate to not do return-checking when visiting a class ctor.
2012-03-23rustc: Redo region inference to be a bit less brokenPatrick Walton-10/+10