about summary refs log tree commit diff
path: root/src/comp/util/ppaux.rs
AgeCommit message (Collapse)AuthorLines
2012-03-02Move src/comp to src/rustcGraydon Hoare-165/+0
2012-02-23(core::str) remove len_bytes aliasKevin Cantu-2/+2
2012-02-23(core::str) replace uses of unsafe::slice_bytes; replace find[_from]_bytes ↵Kevin Cantu-1/+1
with find[_from]
2012-02-20Further work on resolving and typechecking classesTim Chevalier-1/+1
Class tests aren't working yet, but they fail a little later :-) Also, make the parser correctly set a constructor's result type to its enclosing class type.
2012-02-15make mut a keyword synonymous with mutableNiko Matsakis-6/+5
first step towards issue #1273
2012-02-12(core::str) rename byte_len -> len_bytes and rename char_len -> lenKevin Cantu-1/+1
2012-02-10use absolute names when pretty-printing typesNiko Matsakis-19/+25
2012-02-10put serializer into the build and encode full item pathsNiko Matsakis-0/+10
2012-02-09Remove some pointless importsMarijn Haverbeke-2/+0
2012-02-07core: make str::substr use char positions (and replace other uses)Kevin Cantu-2/+2
2012-02-06Make ty::t type self-sufficientMarijn Haverbeke-8/+8
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-05don't fail if inference is not completeNiko Matsakis-5/+12
2012-02-05infer modes rather than overwriting with expected tyNiko Matsakis-20/+6
2012-02-01Remove support for native typesMarijn Haverbeke-1/+0
Issue #1673
2012-01-31Change option::t to optionTim Chevalier-1/+1
Now that core exports "option" as a synonym for option::t, search-and- replace option::t with option. The only place that still refers to option::t are the modules in libcore that use option, because fixing this requires a new snapshot (forthcoming).
2012-01-31Require alts to be exhaustiveTim Chevalier-2/+2
middle::check_alt does the work. Lots of changes to add default cases into alts that were previously inexhaustive.
2012-01-30Change all ternary ops to if/then/elsePaul Woolcock-2/+2
All the files below had at least one instance of the ternary operator present in the source. All have been changed to the equivalent if/then/else expression.
2012-01-27Merge remote-tracking branch 'killerswan/fixing_strings_2'Brian Anderson-1/+1
Conflicts: src/comp/driver/driver.rs src/comp/middle/trans/base.rs src/comp/syntax/parse/lexer.rs
2012-01-26Remove ty_native_fnMarijn Haverbeke-4/+0
It was being used as a clumsy synonym of ty_fn.
2012-01-25Rename tag to enum throughout the compilerMarijn Haverbeke-1/+1
This should reduce confusion of people trying to read the code.
2012-01-25Replacing str::unsafe_from_bytes with str::from_bytes (part 3)Kevin Cantu-1/+1
2012-01-19Remove support for the '.' after a nullary tag in a patternTim Chevalier-1/+1
(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-20/+20
Does what it says on the tin. The next commit will remove support for this syntax.
2012-01-16When pretty-printing fn types, leave off arg modes when they are the defaultMarijn Haverbeke-2/+10
This reduces ++/&& spam in the output to a bare minimum. Issue #1507
2012-01-13Obj system? What obj system?Marijn Haverbeke-5/+0
Removes the obj system from the compiler. Closes #1484
2012-01-04Properly typecheck and compile invocations of generic methods.Marijn Haverbeke-4/+0
Aligning the type parameters of the ifaces, impls, and methods correctly in typeck is almost brain surgery. Seems to work now for everything I threw at it, but might still break in other corner cases. Issue #1227
2012-01-02Add a clause ty_ptr to ppaux::ty_to_strMarijn Haverbeke-0/+1
Closes #1383
2011-12-29split proto from fn_decl, as not all fn_decls know the proto.Niko Matsakis-4/+0
this will address the (crashing) new test added.
2011-12-23Use the same type of record in ty::ty_fn and ty::methodMarijn Haverbeke-4/+5
Removes some more code duplication.
2011-12-19Associate names with types introduced by itemsMarijn Haverbeke-25/+15
Issue #828 This is not a full solution yet. To really get sane error messages, we'll also have to guess the name to apply to literals, which seems non-trivial.
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-2/+2
2011-12-07Change literal representation to not truncateMarijn Haverbeke-52/+53
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-30Box ast::path valuesMarijn Haverbeke-2/+2
It seems inefficient to copy them around. Let's measure whether that's actually > the case
2011-11-23Rollback return-by-referenceMarijn Haverbeke-5/+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-21rustc: Remove abi from ast::native_modHaitao Li-1/+1
2011-11-18Add a pass-by-copy parameter passing conventionMarijn Haverbeke-1/+2
This is intended to solve the problem of how to pass arguments to constructor functions -- you want to move in rvalues, but not have to explicitly copy stuff that is not an rvalue. The by-copy passing convention will ensure the callee gets its own copy of the value. For rvalues, it'll just pass off the value. For lvalues, it'll make a copy. Issue #1177
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-16Replace 'mutable?' with 'const'Brian Anderson-1/+1
2011-11-10Cleanup unused importsHaitao Li-3/+1
2011-11-02Fix printing of parameterized tag types in ppauxMarijn Haverbeke-1/+1
It was printing option::t[int] instead of option::t<int>
2011-10-20Merge ast::proto_shared and ast::proto_closureBrian Anderson-1/+1
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-1/+1
2011-10-07Parse and typecheck by-value and by-ref arg specsMarijn Haverbeke-1/+3
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
2011-09-22Convert ty::ty_uniq to contain a mutable typeBrian Anderson-1/+1
Issue #409
2011-09-15Require the parameter that will be referenced to be notedMarijn Haverbeke-1/+2
Issue #918
2011-09-14Add syntax and representation for return-by-mutably-rooted-refMarijn Haverbeke-4/+6
This will be used in the near future to decide what can safely be done with the returned reference. Issue #918
2011-09-14Make most of the compiler aware of return-by-referenceMarijn Haverbeke-3/+6
tyencode/tydecode still don't know about it. return_ref will be extended to take arguments anyway.
2011-09-14Rename ast::controlflow to ast::ret_styleMarijn Haverbeke-4/+4
It will include information about returning by alias.
2011-09-13Print something when we can't figure out a tag name. Mitigates #876.Michael Sullivan-4/+1
2011-09-12Factor imports mindlessly.Graydon Hoare-15/+5