Modify SILPrinter to print necessary types for parsing.
Format of copy_addr is changed from
copy_addr Src [take]? to Dst [initialization]?
to
copy_addr [take]? Src to [initialization]? Dst : DstType
to put the attribute in front of the actual value.
It also makes parsing easier since '[' can start an array type.
Swift SVN r6268
Construct ArchetypeType from generic params; Construct a Scope for the SIL
function body so TypeAliasDecl for the generic params can be added to ScopeInfo.
Remove an extra '$' in SILPrinter when printing the lookup type for an
archetype_method.
Swift SVN r6219
New format for SILConstant:
'#' sil-dotted-path sil-constant-kind-and-uncurry-level?
sil-dotted-path:
identifier ('.' identifier)*
sil-constant-kind-and-uncurry-level:
'!' sil-constant-kind ('.' sil-constant-uncurry-level)? ('.objc')?
'!' sil-constant-uncurry-level ('.objc')?
'!objc'
sil-constant-kind:
'func' | 'getter' | 'setter' | 'allocator' | 'initializer' | 'oneofelt' \
| 'destroyer' | 'globalaccessor'
Add helper function printFullContext in SILPrinter to generate the fully
qualified dotted path for a given DeclContext; Add parseSILConstant to
SILParser; Testing cases are updated to reflect the new format.
Swift SVN r6055
the order they are referenced. Fix a testcase to use control flow instead
of producing invalid SSA to test forward refs of values, fixing a FIXME.
Swift SVN r5916
This is terrible in several ways: it doesn't handle forward references, we do a linear scan
of SILFunctions, and diagnostics don't exist. Room for improvement some other time.
Swift SVN r5736
operand, producing something like:
%2 = store %0 to %1 : $*Int64
Enhance the sil parser to be able to parse this. We can now
round trip everything required to handle this function:
func foo(a : Int) -> Int {
return a
}
Swift SVN r5354
- Allow forward references.
- Diagnose redefinitions.
- Diagnose cases where the use/def of a value mismatch type.
While I'm at it, this fixes a bug where tuple parsing wasn't parsing
the separating commas.
Swift SVN r5343
by the SIL parser. Add a test that covers both local types, and types
that require looking through an import decl (Int, from the stdlib).
Swift SVN r5249
"a tuple type specifying the type of a global must explicitly state the type of each tuple element".
This diagnostic doesn't make any sense, and is apparently only generated by the old
type checker. It is also the only thing keeping the "isFirstPass" argument to
TC.validateType() alive, so remove it.
The new type checker does have issues with default values, I filed
rdar://13946171 to track it, but this old approach (which I wrote, *shame*)
seems way too broken to salvage.
Swift SVN r5244
mode for normal .swift files. We basically parse batches of non-sil function
decls, type check them as a batch, then process any SIL functions. This allows
us to have mutually recursive types and other things that are fully sema'd and
that are referenced by SIL functions, without involving SIL functions too
intimately with type checking.
This does mean that SIL functions can't forward reference types, oh well.
Swift SVN r5243
have been simplified. This still isn't ideal, but is a lot better than
what we had, and is waiting for SILFunctionTypeInfo to stop containing
SILTypes.
Swift SVN r5232