about summary refs log tree commit diff
path: root/src/comp/middle/shape.rs
AgeCommit message (Collapse)AuthorLines
2012-02-15move shape into transNiko Matsakis-811/+0
2012-02-13Make sure simplify_type simplifies all pointer typesMarijn Haverbeke-19/+17
This is needed to prevent infinite recursion when computing the shape of an enum type that contains pointers to itself. Closes #1821
2012-02-10Represent boxed ifaces in a way similar to functionsMarijn Haverbeke-7/+3
They are now a (dictptr, box) pair, where box is a regular boxed representation of the inner type. This cuts down on some special case code. Also removes some code from trans::base that was moved to shape but then somehow restored in trans::base through a bad merge. Starts on issue #1567
2012-02-09Further WIP on classesTim Chevalier-0/+2
Changes to resolve and typeck. Still nothning working yet.
2012-02-09Remove some pointless importsMarijn Haverbeke-2/+0
2012-02-09Increase precedence of as operatorMarijn Haverbeke-1/+1
Closes #1717
2012-02-08deprecate old style box shape stringsNiko Matsakis-8/+3
2012-02-07Reuse monomorphized functions for different box typesMarijn Haverbeke-0/+4
The free glue for opaque boxes will pick the actual tydesc out of the box, and call its glue. Issue #1736
2012-02-06Make ty::t type self-sufficientMarijn Haverbeke-7/+7
It is now no longer needed to have a ty::ctxt to get at the contents of a ty::t. The straight-forward approach of doing this, simply making ty::t a box type, unfortunately killed our compiler performance (~15% slower) through refcounting cost. Thus, this patch now represents ty::t as an unsafe pointer, assuming that the ty::ctxt, which holds these boxes alive, outlives any uses of the ty::t values. In the current compiler this trivially holds, but it is does of course add a new potential pitfall. ty::get takes a ty::t and returns a boxed representation of the type. I've changed calls to ty::struct(X) to do ty::get(X).struct. Type structs are full of vectors, and copying them every time we wanted to access them was a bit of a cost.
2012-02-06Self types for ifacesMarijn Haverbeke-5/+2
This allows a 'Name:' to appear in front of an iface declaration's name, which will cause 'Name' to refer to the self type (with the same number of type parameters as the iface has) in the method signatures of the iface. For example: iface F: functor<A> { fn fmap<B>(f: fn(A) -> B) -> F<B>; } Issue #1718
2012-02-05Merge remote-tracking branch 'erickt/master'Brian Anderson-1/+1
Conflicts: src/libcore/vec.rs src/libstd/getopts.rs
2012-02-03Store item paths in ast_map, get rid of trans::local_ctxtMarijn Haverbeke-9/+0
The direct motivation for this was that the monomorphizer needs to be able to generate sane symbols for random items. The typechecker can probably also use this in the future to provide more useful error messages.
2012-02-01Remove support for native typesMarijn Haverbeke-2/+1
Issue #1673
2012-02-01Get rid of native types in LLVM moduleMarijn Haverbeke-8/+4
Code is still somewhat kludgy because we don't have 32-bit enums. Issue #1673
2012-01-31Require alts to be exhaustiveTim Chevalier-0/+12
middle::check_alt does the work. Lots of changes to add default cases into alts that were previously inexhaustive.
2012-01-28core: rename vec::position* functionsErick Tryzelaar-1/+1
Almost all of the vec functions that predicates don't have a corresponding function that takes a single element, so this commit renames the common fn usecase to be the default.
2012-01-27Move various trans_ modules under a trans:: umbrella moduleMarijn Haverbeke-29/+26
Closes #1304
2012-01-27Stop passing spans to middle::trans functions that don't need themMarijn Haverbeke-12/+8
Removes a bunch of (eventually) unused arguments. Makes span passing to debuginfo explicit, instead of relying on the (usually incorrect) spans held in the contexts. Closes #1439
2012-01-26Remove ty_native_fnMarijn Haverbeke-1/+0
It was being used as a clumsy synonym of ty_fn.
2012-01-25Rename tag to enum throughout the compilerMarijn Haverbeke-36/+37
This should reduce confusion of people trying to read the code.
2012-01-21wrap lineNiko Matsakis-1/+2
2012-01-21unify size_of, align_of into one call (metrics)Niko Matsakis-102/+97
create some new (xfail'd) tests looking at tag variant alignment
2012-01-21migrate size_of() and related funcs from trans into shapeNiko Matsakis-9/+245
2012-01-19rustc: ";" to "," in enumsPatrick Walton-1/+1
2012-01-19rustc: "tag" -> "enum"Patrick Walton-11/+11
2012-01-19treat fn*() as fn&()Niko Matsakis-1/+2
This is not my ideal way of going about things. I'd prefer not to have expressions typed as fn*(), for example, but I couldn't get that to work together with inferring the modes of arguments and other corner cases.
2012-01-19Remove support for the '.' after a nullary tag in a patternTim Chevalier-9/+9
(Commit also includes lots of changes to remove '.'s that a git merge messed up, or else it was monkeys.)
2012-01-18Remove '.' after nullary tags in patternsTim Chevalier-26/+26
Does what it says on the tin. The next commit will remove support for this syntax.
2012-01-18remove align_mode and rewrite GEP_tup_like to align correctlyNiko Matsakis-2/+2
Although the old version of GEP_tup_like was incorrect in some cases, I do not believe we ever used it in an incorrect fashion. In particular, it could go wrong with extended index sequences like [0, 1, 3], but as near as I can tell we only ever use it with short sequences like [0, i].
2012-01-17encode variant names and have log print them out.Niko Matsakis-1/+13
2012-01-13Obj system? What obj system?Marijn Haverbeke-23/+16
Removes the obj system from the compiler. Closes #1484
2012-01-12free uniq data we encounter on the sweep, walk thru them otherwiseNiko Matsakis-5/+29
2012-01-12Make driver::session::session no longer an objectMarijn Haverbeke-3/+3
Rather, it is now a struct where properties like opts are accessed directly, and the error-reporting methods are part of a static impl (with the same name as the type).
2012-01-08First barely-working version of casting to ifaceMarijn Haverbeke-0/+2
Issue #1437
2012-01-06rejigger impl to have an opaque closure ptr rather thanNiko Matsakis-3/+3
opaque closure
2012-01-02Box arrays of parameter boundsMarijn Haverbeke-1/+1
2011-12-28Change representation of type params to handle interface boundsMarijn Haverbeke-1/+1
Issue #1227
2011-12-23Use the same type of record in ty::ty_fn and ty::methodMarijn Haverbeke-1/+1
Removes some more code duplication.
2011-12-16extend with ty_send_type and ty_opaque_closureNiko Matsakis-1/+1
2011-12-15rustc: Box the vectors returned from ty::tag_variantsBrian Anderson-11/+11
2011-12-15massive refactor of how closures workNiko Matsakis-13/+10
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-2/+2
2011-12-07Change literal representation to not truncateMarijn Haverbeke-66/+16
Also shuffles around the organization of numeric literals and types, separating by int/uint/float instead of machine-vs-non-machine types. This simplifies some code. Closes #974 Closes #1252
2011-11-29fix bug in shape concerning size of tag variantNiko Matsakis-2/+7
2011-11-21rustc: Remove abi from ast::native_modHaitao Li-1/+1
2011-11-16fix bug in shape where s_int/s_uint were not customized to platformNiko Matsakis-8/+25
2011-11-10Cleanup unused importsHaitao Li-5/+3
2011-10-12reimplement some of the unsafe stuff which got lostNiko Matsakis-3/+3
- blocks inherit unsafety - remove the --check-unsafe flag - add unsafe annotations where needed to get things to compile
2011-10-12continue to annotate trans functions as unsafe where neccessaryNiko Matsakis-3/+3
2011-09-22rustc: Write raw type parameters instead of linearized type parameters in ↵Patrick Walton-21/+29
object body shapes