summary refs log tree commit diff
path: root/src/comp/middle/ast_map.rs
AgeCommit message (Collapse)AuthorLines
2012-01-19rustc: ";" to "," in enumsPatrick Walton-7/+7
2012-01-19rustc: "tag" -> "enum"Patrick Walton-1/+1
2012-01-17Allow omission of the '.' after nullary tag patternsTim Chevalier-2/+2
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-13Obj system? What obj system?Marijn Haverbeke-29/+0
Removes the obj system from the compiler. Closes #1484
2012-01-11Implement std::map as an iface/impl instead of an objMarijn Haverbeke-77/+3
2012-01-05Switch to new param kind bound syntaxMarijn Haverbeke-3/+3
And remove support for the old syntax
2012-01-05Add more item types to the ast_map so the test suite can build with debug info.Josh Matthews-0/+8
2011-12-29split proto from fn_decl, as not all fn_decls know the proto.Niko Matsakis-3/+3
this will address the (crashing) new test added.
2011-12-23Go back to a single visit_fn function in visit.rsMarijn Haverbeke-3/+3
2011-12-23Parse `iface` items and interface references in `impl` items.Marijn Haverbeke-1/+1
The (temporary) syntax is iface seq<T> { fn len() -> uint; fn iter(f: block(T)); } // The 'blah<T>' can be left of to default the name of the // impl to seq<T>. The 'of seq<T>' can be left off when // not implementing a named interface. impl blah<T> of seq<T> for [T] { fn len() -> uint { vec::len(self) } fn iter(f: block(T)) { for x in self { f(x); } } }
2011-12-22Unify some data structures in syntax::ast that were doing the same thingMarijn Haverbeke-3/+3
As a preparation to removing some duplication in typeck.
2011-12-21Make { || ... } sugar for any type of closure, inferredNiko Matsakis-4/+4
2011-12-19Fix merge error and rebasing changes for debug information.Josh Matthews-0/+1
2011-12-18Remove source line generation craziness. Ensure incorrect subprogram caches ↵Josh Matthews-1/+11
are not conflated. Generate ast_map entries for object members and resource constructors and destructors.
2011-12-16Finish resolving and calling of crate-external implsMarijn Haverbeke-0/+4
Issue #1227
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-1/+2
2011-11-18Update stdlib, compiler, and tests to new kind systemMarijn Haverbeke-4/+4
This involved adding 'copy' to more generics than I hoped, but an experiment with making it implicit showed that that way lies madness -- unless enforced, you will not remember to mark functions that don't copy as not requiring copyable kind. Issue #1177
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-16fix bug in shape where s_int/s_uint were not customized to platformNiko Matsakis-4/+4
2011-11-16temporarily disable these tests b/c they crash rustcNiko Matsakis-4/+4
2011-11-10Cleanup unused importsHaitao Li-1/+0
2011-10-28Make shared kind the default only for generic functionsMarijn Haverbeke-3/+3
You almost never want a function with pinned type params. For types, objects, resources, and tags, pinned types are actually often more sane. For most of these, shared rarely makes sense. Only tricky case is objs -- you'll have to think about the kinds you want there. Issue #1076
2011-10-25Update our code to new type parameter kind syntaxMarijn Haverbeke-5/+5
Closes #1067
2011-10-21Move ast_util::pat_bindings over to new iter system.Marijn Haverbeke-4/+4
Issue #1056
2011-10-21Move hash table iteration over to block-taking functionsMarijn Haverbeke-14/+20
Issue #1056
2011-10-07Parse and typecheck by-value and by-ref arg specsMarijn Haverbeke-1/+1
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
2011-09-15Move local numbering into ast_map.rsMarijn Haverbeke-17/+42
This further simplifies the alias pass, which is sorely needed.
2011-09-14Make ast_map.rs index function args, switch it over to simple_visitorMarijn Haverbeke-12/+16
2011-09-12Factor imports mindlessly.Graydon Hoare-4/+2
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-17/+16
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
2011-09-02Reformat. Issue #855Brian Anderson-3/+3
2011-08-27Convert ast::ident to istr. Issue #855Brian Anderson-3/+3
2011-08-22Move functions from syntax::ast to syntax::ast_utilBrian Anderson-4/+6
This leaves syntax::ast just defining the AST, which strikes me as somewhat nicer
2011-08-20ReformatBrian Anderson-28/+27
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-08-18Remove or _-prefix all unused function argumentsMarijn Haverbeke-1/+1
This should make the compilation process a bit less noisy.
2011-08-16Port the compiler to the expr foo::<T> syntax.Erick Tryzelaar-3/+3
2011-08-16Port the compiler to foo<T> decl syntax.Erick Tryzelaar-5/+5
2011-08-16Port the compiler to the typaram foo<T> syntax.Erick Tryzelaar-10/+10
2011-08-15The wonky for...in... whitespace was bothering me. Sorry!Lindsey Kuper-2/+2
2011-08-15Use span stacks to track macro expansion for less troublesome error messages.Paul Stansifer-4/+4
2011-08-11Add ast_map::node_span functionBrian Anderson-0/+57
2011-07-29Enable kind checking on typarams, fix kind constraints in library and comp.Graydon Hoare-8/+8
2011-07-27Reformat for new syntaxMarijn Haverbeke-44/+41
2011-07-26Remove all uses of tuples from the compiler and stdlibMarijn Haverbeke-4/+4
2011-07-21Add some support for using a map like a set.Michael Sullivan-0/+5
2011-07-11Move visit to newtype-style nominal typeMarijn Haverbeke-1/+1
This makes getting the function fields out of the visitor less cumbersome and more efficient (no take/drop).
2011-07-05Move everything syntax-related to syntax/, break deps on rest of compilerMarijn Haverbeke-1/+2
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-06-28Replace common::new_seq_hash with an adapter around std::smallintmapBrian Anderson-1/+69
It would be better to either convert ast_map to use smallintmap or make smallintmap and hashmap follow the same interface, but I don't feel up to it just now. Closes #585.
2011-06-26Add a very simple map implementation for sequential integer keysBrian Anderson-1/+1
Use it for the ast_map. Cuts 40% off the time spent prior to LLVM.
2011-06-21Move names and ids of native items into their recs, rather than their tagsMarijn Haverbeke-5/+1