about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
2012-02-07core: make str::substr use char positions (and replace other uses)Kevin Cantu-6/+7
2012-02-07String split renaming:Kevin Cantu-5/+6
* Renamed str::split -> str::split_byte * Renamed str::splitn -> str::splitn_byte * Renamed str::split_func -> str::split * Renamed str::split_char -> str::split_char * Renamed str::split_chars_iter -> str::split_char_iter * Added u8::is_ascii * Fixed the behavior of str::split_str, so that it matches split_chars and split (i.e. ["", "XXX", "YYY", ""] == split_str(".XXX.YYY.", ".")) * Fixed str::split_byte and str::splitn_byte so that they handle splitting UTF-8 strings on a given UTF-8/ASCII byte and also handle "" as the others do
2012-02-07Minor class-related tweaks to the ASTTim Chevalier-25/+40
2012-02-07Stop storing cmp glue in tydescsMarijn Haverbeke-45/+5
There's no such thing anymore, we can simply call upcalls.cmp_type.
2012-02-07Reuse monomorphized functions for different box typesMarijn Haverbeke-260/+227
The free glue for opaque boxes will pick the actual tydesc out of the box, and call its glue. Issue #1736
2012-02-06Revert "log to stderr instead of stdout"Brian Anderson-9/+9
This is causing mysterious hangs on windows. Issue #1769. This reverts commit d65eabd5de4c41e4bc93b9c6c03d6278299ceb76.
2012-02-06change gcc_args to cc_args and make win32 use gccJyun-Yan You-30/+35
2012-02-06use cc instead of gccJyun-Yan You-1/+4
2012-02-06Make keyword table in reference reflect reality more closelyMarijn Haverbeke-6/+6
And remove the part about reserved words.
2012-02-06Handle built-in typenames in the resolve pass, rather than in parserMarijn Haverbeke-168/+188
Closes #1728 Comments out a section of debuginfo.rs. This code was already broken (only being called when --xg was passed, and only working on trivial programs).
2012-02-06Make ty::t type self-sufficientMarijn Haverbeke-969/+661
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-06Make sure iface_methods are set before they are accessedMarijn Haverbeke-3/+18
Closes #1761
2012-02-06Removed sendfn from badwords and made the precedence of XOR between that of ↵Ian D. Bollinger-2/+2
OR and AND.
2012-02-06Self types for ifacesMarijn Haverbeke-148/+241
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-06Allow non-semicolon-requiring expressions to be followed by .fieldMarijn Haverbeke-22/+22
There is no valid expression that starts with a dot token (.5 is a number token), so this introduces no ambiguities. Issue #1716
2012-02-05Fix macro backtraces.Kevin Atkinson-59/+72
In addition add information about the macro doing the expansion, and move the printing of the expansion backtrace from codemap::span_to_str to the diagnostic code. The backtrace is now more verbose and includes information on the macro doing the expansion, in addition to the expansion site.
2012-02-05Remove support for $(...) form of quasi-quotes, use #ast{...} instead.Kevin Atkinson-28/+4
2012-02-05Merge remote-tracking branch 'erickt/master'Brian Anderson-4/+4
Conflicts: src/libcore/vec.rs src/libstd/getopts.rs
2012-02-05don't fail if inference is not completeNiko Matsakis-5/+13
2012-02-05resolve some merge failuresNiko Matsakis-9/+5
2012-02-05infer modes rather than overwriting with expected tyNiko Matsakis-166/+309
2012-02-03Beginnings of front-end support for classesTim Chevalier-10/+265
Added class support to the parser, prettyprinter, fold, and visit. (See Issue 1726.) This is WIP -- the test case is xfailed, and attempting to compile it will error out in resolve.
2012-02-03log to stderr instead of stdoutTed Horst-9/+9
includes rustc diagnostics runtest updated to check stderr for errors
2012-02-03Fix various drift issues in the qq branch.Graydon Hoare-29/+27
2012-02-03Implement folding of ast::ty.Kevin Atkinson-3/+30
2012-02-03Fix q-q so that non-expression q-q actually work when there is embed anti-q.Kevin Atkinson-7/+21
2012-02-03Allow anti-quotes to also be ast::ty rather than just ast::expr.Kevin Atkinson-14/+74
2012-02-03Implement quasi-quoting of multiple syntatic categories.Kevin Atkinson-24/+114
2012-02-03Formatting cleanups.Kevin Atkinson-11/+13
2012-02-03Store info about file "substr".Kevin Atkinson-14/+38
That is when a string that is part of a file needs to be parsed for a reason, record that the string is a substr of the file rather than using "<anon>" or "-" as the file name. This will eventually allow pointing to the right location, for now it just uses a more meaningful string for the filename.
2012-02-03Implement quasi-quotes in more macro form: #ast{...}.Kevin Atkinson-5/+38
The #(...) form is still supported for now.
2012-02-03Don't rely on filename to get a file from the filemapKevin Atkinson-21/+23
as there may be more than one filemap with the same filename (in the case of stdin for instance). This involved storing a pointer to the filemap rather than the filename in location info such as codemap::pos.
2012-02-03Bug fix in lookup_byte_offset.Kevin Atkinson-1/+1
2012-02-03Make macro arg optional in syntax, again untested.Kevin Atkinson-14/+41
2012-02-03Add support for recognizing macro body, completely untested.Kevin Atkinson-16/+43
2012-02-03Change the type for the macro body to also store the span.Kevin Atkinson-10/+13
Note: the body is the part of the macro syntax between the {}.
2012-02-03When replacing $(...) with $0 preserve spacing for better error messages.Kevin Atkinson-7/+19
That is: x + $(foo) + y becomes: x + $0 + y not: x + $0 + y
2012-02-03Expand result of quasi-quote.Kevin Atkinson-3/+9
2012-02-03Implement anti-quotes.Kevin Atkinson-12/+93
2012-02-03Implement "replace" function.Kevin Atkinson-1/+23
2012-02-03Implement basic quasi-quoter. No anti-quotes yet.Kevin Atkinson-7/+40
2012-02-03Rename AST builders to use uniform naming scheme. Also add a few more.Kevin Atkinson-46/+68
2012-02-03Add support for parsing quasi-quotes, doesn't do anything useful yet.Kevin Atkinson-1/+72
2012-02-03Move useful ast building functions into their own module.Kevin Atkinson-39/+50
2012-02-03Add function to get a code snippet from a span,Kevin Atkinson-3/+40
and also to get the byte offset within a string from a span chpos.
2012-02-03Fix prefixing of logging paths with crate nameMarijn Haverbeke-3/+4
2012-02-03core: rename str::lteq to str::leTom Lee-1/+1
2012-02-03Clean up and update trans::ty_ctxt type definitionMarijn Haverbeke-66/+37
It had been messed up by the pretty-printer at some point, and was partially out of date.
2012-02-03Start on in-crate monomorphizingMarijn Haverbeke-125/+166
Adds a --monomorpize flag to rustc to turn it on. You probably don't want to use it yet, since it's broken in a whole bunch of ways, but it successfully monomorphizes simple generic functions called from within the crate. Issue #1736
2012-02-03Store item paths in ast_map, get rid of trans::local_ctxtMarijn Haverbeke-380/+363
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.