about summary refs log tree commit diff
path: root/src/rustc/metadata/encoder.rs
AgeCommit message (Collapse)AuthorLines
2012-04-19make nominal types optionally parameterized by a self region.Niko Matsakis-21/+33
Issue #2201.
2012-04-18Stop duplicating non-generic resource destructorsMarijn Haverbeke-0/+3
Closes #2177
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-10Generic classes and generic class methods work cross-crateTim Chevalier-12/+14
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-08Encode crate dependencies' hash and version dataHaitao Li-19/+31
2012-04-06Convert old-style for loops to new-styleMarijn Haverbeke-26/+26
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-03-29rustc: Remove the rustsyntax::attr wrapper in frontBrian Anderson-1/+1
2012-03-28Allow explicit self-calls within classesTim Chevalier-23/+27
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-2/+9
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-13/+13
2012-03-26Enforce privacy declarations for class fields and methodsTim Chevalier-10/+21
2012-03-23Implement new inference algorithm.Niko Matsakis-1/+6
2012-03-23Remove last vestiges of old-style intrinsicsMarijn Haverbeke-5/+1
Closes #2048
2012-03-23Revert removal of intrinsicsMarijn Haverbeke-1/+5
Oops. We can't do this yet until the next snapshot.
2012-03-23Rename builtin back to intrinsicMarijn Haverbeke-1/+1
As per Graydon's request Issue #1981
2012-03-23Remove support for the old-style intrinsicsMarijn Haverbeke-4/+0
Closes #2042 Closes #1981
2012-03-23Implement built-in native modules as an alternative to intrinsicsMarijn Haverbeke-1/+6
Issue #1981
2012-03-22Make cross-crate calls to class methods workTim Chevalier-18/+61
2012-03-21add mut decls to rustc and make them mandatoryNiko Matsakis-12/+12
2012-03-20stdlib: Implement arenasPatrick Walton-2/+2
2012-03-20Class methods WIPTim Chevalier-66/+93
In particular, use the ast::method type to represent a class method, and try to reuse as much iface code as possible. (This makes sense now since I'll be allowing polymorphic class methods.)
2012-03-20Move external-reachability checker to transMarijn Haverbeke-11/+5
Preparation for a fix for issue #2020
2012-03-16Encode both private and public class fields in metadataTim Chevalier-8/+3
This is necessary to calculate the correct offsets for field references. Simple cross-crate class tests (still with fields only) now pass.
2012-03-16Fix encoding of class ctorsTim Chevalier-20/+18
Class tests still fail at runtime
2012-03-16Classes WIPTim Chevalier-6/+122
Cross-crate metadata for classes works well enough that programs with classes in other crates compile successfully, but output wrong results. Checking in work so far to avoid merge hassles. (Tests are xfailed.)
2012-03-15Properly recognize external intrinsicsMarijn Haverbeke-9/+15
2012-03-15Only write metadata for items that actually appear in the root ASTMarijn Haverbeke-31/+39
Not for imported ASTs from inlined items.
2012-03-15Make sure enum and resource constructors are inlined properlyMarijn Haverbeke-11/+6
2012-03-15Make sure resource destructors are properly monomorphizedMarijn Haverbeke-5/+4
2012-03-15Remove a large part of the tydesc-passing codeMarijn Haverbeke-2/+3
2012-03-15Stop generating generic versions of generic functionsMarijn Haverbeke-4/+8
Monomorphic instances are generated on demand.
2012-03-15Fix assumption that monomorphized method's impls are crate-localMarijn Haverbeke-1/+1
2012-03-15Write out the AST for all externally-reachable genericsMarijn Haverbeke-2/+3
2012-03-14rustc: Lift the @ from the type definition of crate_ctxt into its usesPatrick Walton-2/+2
This will make it easier to convert crate_ctxt into a region pointer, since there are functions that return crate contexts. There would be no way to type these functions if crate_ctxt had to be an inferred region pointer.
2012-03-13implement deserialization, rename mk_mem_buffer() to mem_buffer()Niko Matsakis-2/+2
2012-03-13Overhaul constructor naming in libsBrian Anderson-1/+1
2012-03-12Libc/os/run/rand/io reorganization. Close #1373. Close #1638.Graydon Hoare-1/+1
- Move io, run and rand to core. - Remove incorrect ctypes module (use libc). - Remove os-specific modules for os and fs. - Split fs between core::path and core::os.
2012-03-08Explicitly store self_ids use for self locals in methodsMarijn Haverbeke-2/+4
This makes it possible to move them between crates without confusion, and to instantiate them at a point where the monomorphizing substitutions are known. Issue #1944
2012-03-08Drop collect_items pass, create decls on demandMarijn Haverbeke-12/+15
This solves a problem with inlined functions that have inner functions.
2012-03-07stdlib: Stop incurring vtable dispatch costs when hashmaps are usedPatrick Walton-0/+1
This required changing almost all users of hashmaps to import the hashmap interface first. The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07Revert "stdlib: Stop incurring vtable dispatch costs when hashmaps are used"Patrick Walton-1/+0
This reverts commit f0250a23d3fa2f8b4a4a4113ca89e41945a4cfed.
2012-03-07stdlib: Stop incurring vtable dispatch costs when hashmaps are usedPatrick Walton-0/+1
This required changing almost all users of hashmaps to import the hashmap interface first. The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-06Add a reachability checker, only export metadata for reachable itemsMarijn Haverbeke-7/+20
Closes #1934
2012-03-06Track all exports in exp_mapMarijn Haverbeke-3/+8
This is needed because the reachability checker needs to be able to follow exports. Issue #1934
2012-03-05give user control of whether we use inline hint or inline alwaysNiko Matsakis-2/+10
supply inline hints for resource ctors/dtors
2012-03-05set LLVM inline hint for all #[inline] methods, whether CC or localNiko Matsakis-6/+2
2012-03-04Translate simple classesTim Chevalier-2/+2
Programs using classes with fields only (no methods) compile and run, as long as nothing refers to a class in a different crate (todo). Also changed the AST representation of classes to have a separate record for constructor info (instead of inlining the fields in the item_class node), and fixed up spans and pretty-printing for classes.
2012-03-02Move src/comp to src/rustcGraydon Hoare-0/+766