| Age | Commit message (Collapse) | Author | Lines |
|
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
|
|
It's less likely to clash with something than 'neg'.
Issue #1520
|
|
Closes #1438
|
|
The methods used to implement operators now simply use
the name of the operator itself, except for unary -, which is called
min to not clash with binary -. Index is called [].
Closes #1520
|
|
Issue #1661
|
|
The method `op_index` (which takes a single argument) is used for
this.
Issue #1520
|
|
When no built-in interpretation is found for one of the operators
mentioned below, the typechecker will try to turn it into a method
call with the name written next to it. For binary operators, the
method will be called on the LHS with the RHS as only parameter.
Binary:
+ op_add
- op_sub
* op_mul
/ op_div
% op_rem
& op_and
| op_or
^ op_xor
<< op_shift_left
>> op_shift_right
>>> op_ashift_right
Unary:
- op_neg
! op_not
Overloading of the indexing ([]) operator isn't finished yet.
Issue #1520
|
|
It was being used as a clumsy synonym of ty_fn.
|
|
LLVM string)
|
|
Closes #1661
|
|
This should reduce confusion of people trying to read the code.
|
|
|
|
|
|
Check that in export foo{}, foo is an enum type, and that in export
foo{bar, quux}, foo is an enum type and bar and quux are variants belonging
to foo.
|
|
variants
See issue 1426 for details. Now, the semantics of "export t;" where t is a tag are
to export all of t's variants as well. "export t{};" exports t but not its
variants, while "export t{a, b, c};" exports only variants a, b, c of t.
To do:
- documentation
- there's currently no checking that a, b, c are actually variants of t in the
above example
- there's also no checking that t is an enum type, in the second two examples above
- change the modules listed in issue 1426 that should have the old export
semantics to use the t{} syntax
I deleted the test export-no-tag-variants since we're doing the opposite now,
and other tests cover the same behavior.
|
|
|
|
create some new (xfail'd) tests looking at tag variant alignment
|
|
|
|
position.
To match the init_fn() and init_fn_mut() changes.
|
|
putting block in final position.
|
|
A crate attribute like `#[lint(no_ctypes)]` can now be used to turn off
ctypes checking.
Issue #1543
|
|
Issue #1501
|
|
Previously, typestate would conclude that this function was
correctly diverging:
fn f() -> ! { ret; fail; }
even though it always returns to the caller. It wasn't handling the
i_diverge and i_return bits correctly in the fail case. Fixed it.
Closes #897
|
|
typestate was using the enclosing function ID for the "this function
returns" constraint, which meant confusion and panic in the case
where a predicate p includes "check p()". Fixed it to use a fresh
ID.
Closes #933
|
|
Close #1428.
|
|
|
|
|
|
The code in Issue 948 was causing typestate to diverge because
it was using the prestate for the whole expression -- not the post-
state for the fields list -- as the prestate for the record base
expression. Fixed.
Closes #948
|
|
If we have log(foo, quux) where foo:_|_, just translate foo and
ignore the rest of the expression.
Closes #1459
|
|
|
|
|
|
Rationale: _|_-typed things diverge, so it's safe to use them in
any context.
Closes #1465
|
|
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.
|
|
The segv fault issue is #1566
|
|
Issue #1543
|
|
This patch starts from move the analysis which checkes of probably
incorrectly usage of `int|uint` in native fn.
Issue #1543
|
|
(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.
|
|
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].
|
|
also, streamline type_is_tup_like() to the cases which
actually work
|
|
|
|
|
|
Issue #1403
|
|
Actually, we don't "fix" #843 so much as close it: as with memmove,
we simply use an alignment of 1 with dynamically sized types.
|
|
|
|
Minor cleanups to custom discriminator code.
|
|
|
|
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 '.'.
|
|
This fixes issues #843 and #1546. The cost of an upcall is
unfortunate, though. I assume there must be a way to simply manually
compute the pointer or size, using something akin to the formula in
`align_to` in `rust_util.h`. I could not get this to work,
unfortunately.
|