The completed activities here are the final building blocks to complete the remaining tasks for the first planned milestone. In order to support the size type rules on ArrayIndexExpressions and allow for code such as:
let a; // <?>
a = 1; // <?> = <I?>
let b:u32 = a; // <u32> = <I?>
The LiteralExpression of ‘1’ resolves to an IntegralInferenceVariable which when unified as part of the HM algorithm resolves to a u32 for the chain of references involved. If no type is determined this will default as usual to i32. The PR commit message has a much better explanation of this, which will bootstrap more documentation.
As for constructors for algebraic data types, this test case involving a base reference helped find some general bugs in how we handle returns from functions:
struct Foo {
a: i32,
b: i32,
}
fn foo() -> Foo {
Foo { a: 42, b: 32 }
}
fn main() {
let _f = Foo { a: 10, ..foo() };
}
Thanks to contributions from Thomas Schwinge for fixing some compilation warnings.
Completed Activities
- Compilation warning fixes from Thomas Schwinge PR160 PR159
- Add expressions with parentheses PR156
- Complete all struct constructors with FieldAccessExpr and TupleIndexExpr – PR162 PR163
- Enforce Typing rules on Arithmetic, Comparison, LazyBoolean Expressions PR178 PR165
- Implement Compound Assignment Expressions PR174 PR175
- Implement Unary Negation Expressions PR176
- Add Float and Integer Inference variable PR181
- Add Gimple building block to create QUAL_CONST nodes to enforce mutability PR180
Overall Task Status
Category | Last Week | This Week | Delta |
TODO | 36 | 42 | +6 |
In Progress | 5 | 3 | -2 |
Completed | 35 | 43 | +8 |
Test Cases
Category | Last Week | This Week | Delta |
Passing | 300 | 468 | +168 |
Failed | 0 | 0 | 0 |
Milestones Progress
Milestone | Last Week | This Week | Delta |
Data Structures 1 | 87% | 92% | +5% |
Control Flow 1 | 25% | 25% | – |
Data Structures 2 | 0% | 0% | – |
Data Structures 3 | 0% | 0% | – |
Control Flow 2 | 0% | 0% | – |
Imports | 0% | 0% | – |
Risks
Risk | Impact (1-3) | Likelihood (0-10) | Risk (I * L) | Mitigation |
Copyright assignments | 2 | 5 | 10 | Be up front on all PR’s that the code is destined to be up streamed to FSF |
Planned Activities
- Size Types and enforce them on ArrayIndexExpression
- Enforce mutability rules
- Unit Structs
- Add more Test cases for the milestone on completion
- Documentation on Name and Type Resolver