In parseSILDeclRef, when searching for the first component of the
fully-qualified name, we use UnqualifiedLookup to look through the imports.
Before this commit, only the current module is searched.
Testing cases are generated from a simple swift program using NSObject.
Swift SVN r6871
Added types when printing these args in the SIL printer.
As a side effect, I've removed the assertions that check
that we have the correct number of arguments in the Branch instruction
creation routines. The reason is that we do not have a complete block when
parsing and creating the branch instruction and it is possible to add
arguments to a basic block after creation. The assertion will be checked
by the SIL verifier.
Swift SVN r6818
Modules can be in either 'Raw' or 'Canonical' form, with different invariants on each. We don't actually distinguish those invariants yet, but this patch adds the field to SILModule and adds a "sil_stage" declaration to SIL printer/parser syntax.
Swift SVN r6793
We haven't fully updated references to union cases, and enums still are not
their own thing yet, but "oneof" is gone. Long live "union"!
Swift SVN r6783
This way we don't need to deal with the inaccuracy of decimal float literals. While we're here, modify the in-memory representation of IntegerLiteralInst and FloatLiteralInst to save the word array of the APInt instead of round-tripping through plain text.
Swift SVN r6676
"SILConstant" doesn't really describe its role in SIL anymore, which is to provide a reference to a Swift declaration in a SIL instruction, such as a method or nominal type field.
Swift SVN r6559
- Add the attribute to AnyFunctionType::ExtInfo.
- Propagate the attributes from DeclAttributes to AnyFunctionType for
FuncDecls in TypeCheckDecl.cpp.
- Make sure the new attribute is serialized.
The main missing pieces are checking the applicability of the type attributes
on the FuncDecl and teaching typechecker about conversions on types with
noreturn.
Swift SVN r6359
The testing case has a global variable defined in .sil: "var x: Int = 0".
When parsing the .sil file, there was an assertion failure where the type of
ValueDecl for x is null. To fix the problem, we set DelayCheckingPattern to
false for SIL in visitPatternBindingDecl.
Swift SVN r6348
-Refactor Parser to stop creating types
-Refactor TypeChecker to create types by resolving TypeReprs.
-Remove "validation" bit from the type system.
We don't need to "validate" every type that gets created but there's still a validation bit in TypeLoc,
necessary because of generic substitutions.
Swift SVN r6326
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
sil_type: '$' '*'? attribute-list (generic-params)? type
Refactor parseTypeAnnotation to separate applyAttributeToType which can be
used from SILParser.
Swift SVN r6209
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