| Age | Commit message (Collapse) | Author | Lines |
|
|
|
`with_scope` and `with_cond` can be used to wrap a piece of code in a
scope block, or conditionalize it on a value, without doing all the
context-creation and jumping by hand.
Also renames @block_ctxt to block to reduce noise.
|
|
first step towards issue #1273
|
|
|
|
|
|
Enough to be able to compile librustc with --monomorphize.
Issue #1736
|
|
|
|
Issue #1736
|
|
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).
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
|
|
|
|
Code is still somewhat kludgy because we don't have 32-bit enums.
Issue #1673
|
|
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).
|
|
middle::check_alt does the work. Lots of changes to add default cases
into alts that were previously inexhaustive.
|
|
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.
|
|
|
|
I.e. a set of curly braces, not everything that creates a block
context in the trans pass.
Issue #1694
|
|
time while #1694 is unfixed, and fix stack-exhaustion bug in block parent generation.
|
|
Closes #1304
|
|
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
|
|
|
|
|
|
|
|
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)
|
|
Does what it says on the tin.
The next commit will remove support for this syntax.
|
|
|
|
|
|
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 '.'.
|
|
|
|
|
|
Removes the obj system from the compiler.
Closes #1484
|
|
|
|
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).
|
|
And remove support for the old syntax
|
|
|
|
this will address the (crashing) new test added.
|
|
|
|
|
|
#debug.
|
|
As a preparation to removing some duplication in typeck.
|
|
|
|
|
|
|
|
|
|
|
|
are not conflated. Generate ast_map entries for object members and resource constructors and destructors.
|