about summary refs log tree commit diff
path: root/src/comp/middle/ty.rs
AgeCommit message (Collapse)AuthorLines
2011-12-18Only look for a matching method when normal field access failsMarijn Haverbeke-10/+8
We should probalby warn when defining a method foo on {foo: int} etc. This should reduce the amount of useless typevars that are allocated. Issue #1227
2011-12-16reorder args to the various vec, option fns so blk comes lastNiko Matsakis-1/+1
2011-12-16Make uses of self in impls compileMarijn Haverbeke-0/+1
Get rid of expr_self_call, introduces def_self. `self` is now, syntactically, simply a variable. A method implicitly brings a `self` binding into scope. Issue #1227
2011-12-16Get very simple impl method calls to compileMarijn Haverbeke-5/+8
Resolution is still dumb, and no self support yet.
2011-12-16Parse and resolve implementations.Marijn Haverbeke-14/+6
Issue #1227
2011-12-15rustc: Box tag variants to avoid copiesBrian Anderson-4/+4
2011-12-15rustc: Box the vectors returned from ty::tag_variantsBrian Anderson-10/+12
2011-12-15rustc: Cache results of ty::tag_variantsBrian Anderson-5/+16
2011-12-15massive refactor of how closures workNiko Matsakis-34/+60
2011-12-14push changes through to get things compiling, if not running.Niko Matsakis-17/+11
2011-12-14define ty and update parser for sendable lambdasNiko Matsakis-0/+1
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-8/+8
2011-12-07Remove stmt_crate_directive, it's vestigial and confusing.Graydon Hoare-4/+0
2011-12-07Change literal representation to not truncateMarijn Haverbeke-177/+94
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-12-07repair more hash functionsNiko Matsakis-15/+15
2011-12-02parse: typeck: enabling trivial casts of tail-call return valuesStefan Plantikow-6/+3
introduces ctypes::m_* machine type aliases for int, uint, float depending on cfg(target_arch) that are used in tests
2011-12-02ty: trans: added support for dropping trivial castsStefan Plantikow-0/+10
2011-12-02ty: added type comparison that subs prim types with targ_cfg machine typesStefan Plantikow-0/+37
2011-12-02Allow literal patterns to contain arbitrary literal expressionsMarijn Haverbeke-0/+5
This removes the need for the unary minus hacks, and allows some other neat things like matching on 1 >> 4. Issue #954
2011-11-30Box ast::path valuesMarijn Haverbeke-1/+1
It seems inefficient to copy them around. Let's measure whether that's actually > the case
2011-11-23Make type_kind properly recognize ty_ptr as sendableMarijn Haverbeke-3/+3
2011-11-23Rollback return-by-referenceMarijn Haverbeke-8/+0
It's proving too inflexible, so I'm ripping out the extra complexity in the hope that regions will, at some point, provide something similar. Closes #918
2011-11-22Make type_needs_drop accurate, get rid of type_has_pointersMarijn Haverbeke-40/+20
Closes #1209
2011-11-22Only warn about unreachable range patterns when appropriateMarijn Haverbeke-1/+3
Also simplifies the literal-munging, and moves it into ast_util Closes #1170
2011-11-21rustc: Remove abi from ast::native_modHaitao Li-31/+21
2011-11-18Properly check kinds in instantiation of genericsMarijn Haverbeke-1/+1
Issue #1177
2011-11-18Prevent alias pass from inserting implicit copies for noncopyable typesMarijn Haverbeke-4/+4
Issue #1177
2011-11-18Overhaul the kind-checking passMarijn Haverbeke-64/+60
Not really useful yet because missing last-use-of-local optimization. Also: instantiation of type parameters needs to be checked. Issue #1177
2011-11-18Make tag, resource and object constructors take their arguments by copyMarijn Haverbeke-6/+0
Doing something like some([1, 2, 3]) will now no longer create a temporary copy of the vector. It will also be easier for the kind checker to see that putting a resource into a data-structure constructor is safe.
2011-11-18Preparation for kind system overhaulMarijn Haverbeke-11/+11
This goes before a snapshot, so that subsequenct patches can make the transition without breaking the build. Disables kind checking pass, makes parser accept both new and old-style kind annotation. Issue #1177
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-13Make various binops not typecheck for unsafe pointers. Closes #1173Brian Anderson-1/+0
2011-11-10Cleanup unused importsHaitao Li-2/+0
2011-11-02Make it possible to cast unsafe pointers with the 'as' operatorMarijn Haverbeke-0/+8
2011-10-28Make shared kind the default only for generic functionsMarijn Haverbeke-1/+1
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-27Remove uint::max/min in favor if math::max/minMatt Brubeck-1/+2
2011-10-21Drop support for iter, put, and for-eachMarijn Haverbeke-9/+1
Closes #1056
2011-10-20Merge ast::proto_shared and ast::proto_closureBrian Anderson-4/+6
Now they are both just proto_shared and proto_shared takes an argument indicating that it is sugared as 'lambda'
2011-10-20Rename ast::proto_fn to ast::proto_sharedBrian Anderson-3/+3
2011-10-20Make fn denote a bare function. Convert fn to fn@ as neededBrian Anderson-6/+7
2011-10-20Tweak typecheck to enforce covariance on higher-order function argumentsBrian Anderson-1/+4
2011-10-20Give subtype relationships to function typesBrian Anderson-2/+57
2011-10-18Immutable and mutable? are covariant on their inner typesBrian Anderson-3/+10
Whereas [mutable T] is invariant with respect to T, [T] and [mutable? T] are covariant with respect to T.
2011-10-17Enforce variance rules for mutable typesBrian Anderson-40/+48
2011-10-17Add a variance transform for calculation of recursive varianceBrian Anderson-14/+53
2011-10-17Introduce covariance, contravariance and invariance to the type unifierBrian Anderson-22/+47
This will be used to resolve some problems with mutable? covariance and also to implement function subtyping
2011-10-17Don't unify from mutable? to immutableBrian Anderson-1/+0
Immutable is supposed to be a subtype of mutable-huh.
2011-10-17Split record_var_binding into methods for expected and actualBrian Anderson-4/+26
This allows unify to maintain the same subtype relationship between expected and actual throughout unify, which we are going to need for mutable? and for function types.
2011-10-12make native functions markable as unsafe and incorporate thatNiko Matsakis-1/+1
into the type check
2011-10-10Make vectors and strings immediates againMarijn Haverbeke-1/+1
There's no good reason to force them to be spilled anymore. Some pieces of trans become more elegant this way, and less stack allocs and load/stores are needed. Issue #1021