- Ensure that the base is always an lvalue, materializing it if necessary
- Give appropriate lvalue qualifiers to the subscript expression
- Make sure to write the converted indices back into the AST
Finally, introduce a verifier for subscript expressions.
Swift SVN r1528
the appropriate slice type and check the bounds. The
first bound must be a literal or a type with a
getArrayBoundValue method, which has the same recursive
nature as getLogicValue (i.e. it can return a type that
has a getArrayBoundValue that returns an integral type,
but that's it; it's capped at one hop). The rest
of the bounds must be empty (meaning a slice) or
constant under the same conditions as fixed-size
array types.
Swift SVN r1501
oneof/struct/protocol within a static method. The lookup is performed
on the metatype (as one would get when using qualified syntax
Type.member). Add tests to verify that this provides proper
overloading behavior.
As a drive-by, actually set the type of the implicit 'this' variable
during name binding for a non-static method.
Swift SVN r1394
Unlike Type, it implements equality operators. It is returned by Type->getCanonicalType().
This adopts it in the minimal places required to get the build to work, it would also be nice
to switch IRGen to canonical types and use it there.
Swift SVN r1298
qualifier, making sure that variables end up so-qualified by
default. Add a RequalifyExpr to capture the act of adding
qualifiers (to form a supertype) to an l-value.
Swift SVN r1236
- introduce the concept of qualifiers on l-value types
- teach overload resolution and coercion how to drop explicitness
- require explicitness on normal [byref] arguments
- make 'this' [byref(implicit)]
- special-case '&' as a unary operator in the parser to make it
produce an expression which type-checks as turning implicit l-values
into explicit ones.
Obvious missing pieces:
- updating LangRef
- we should really complain about ever trying to rvalue-convert an
explicit l-value
- maybe qualification should play a part in overload resolution
- we should diagnose attempts to declare unary '&' operators
- there's a test case in expressions.swift which suggests my logic is
slightly off
But I am out of time, and these will have to wait.
Swift SVN r1119
instead .
1,2d
1i
Change the 'walk' APIs to use virtual dispatch instead of
blocks. This makes it much easier to thread information
through the API, as well to extend the API to handle
recursive visiting of other structures (e.g., Decls
and Patterns).
Swift SVN r1101
unconditionally so that we don't need to handle delegation
in the checkers just to preserve the standard checks.
Verify the invariants of a TupleElementExpr.
Swift SVN r874
statement walk callback functions, where we can stash additional
information without breaking all of the callers.
At present, the only information in the context is the parent
statement or expression.
Swift SVN r860
This will be required until there's some sort of error marking
in the AST, at which point that marking will just turn off
shouldVerify for that subtree.
Swift SVN r732