David Ungar
16a1299f90
Move provides emitters into a class
2018-06-15 11:12:25 -07:00
David Ungar
5477b3987a
Aggregate the provided declatations into CollectedProvidedDeclarations.
2018-06-15 11:12:25 -07:00
David Ungar
c8130663d5
Move top-level emitting into a class, ReferenceDependenciesEmitter.
2018-06-15 11:12:25 -07:00
David Ungar
ebf8713c08
Break up emitReferenceDependencies to separate the file opening from emitting to a stream.
2018-06-15 11:12:25 -07:00
David Ungar
70005c10e5
Factor out file openning & error handling.
2018-06-15 11:12:25 -07:00
David Ungar
fe8ac4b2b2
Per Jordan, use raw_ostream instead of raw_fd_ostream.
2018-06-15 11:12:25 -07:00
David Ungar
44e5cd3bba
clang-format
2018-06-15 11:12:25 -07:00
David Ungar
abe7544c1a
Subdivide emitting a provides decl.
2018-06-15 11:12:25 -07:00
David Ungar
d53122f03a
clang-format
2018-06-15 11:12:25 -07:00
David Ungar
c4172183f0
Subdivide one more level down.
2018-06-15 11:12:25 -07:00
David Ungar
45c562b8e5
Split up emitReferenceDependencies into 3 steps: provides, depends, interfaceHash.
2018-06-15 11:12:25 -07:00
Slava Pestov
181d7a2eac
FrontendTool: Deterministic order when a normal declname has same spelling as special declname
2018-06-14 20:41:27 -07:00
David Ungar
4866df6dfd
Move SupplementaryOutputs into each InputFile.
2018-02-28 09:41:49 -08:00
David Ungar
488db9fb9b
Fix ReferencedNameTracker in preparation for batch mode.
2018-02-16 22:28:10 -07:00
David Ungar
ba4f2a84b4
Move supplementary outputs to SupplementaryOutputs in FrontendInputsAndOutputs.
2018-02-07 13:55:32 -08:00
Harlan
5e02d2a877
Implement #warning and #error ( #14048 )
...
* Implement #warning and #error
* Fix #warning/#error in switch statements
* Fix AST printing for #warning/#error
* Add to test case
* Add extra handling to ParseDeclPoundDiagnostic
* fix dumping
* Consume the right paren even in the failure case
* Diagnose extra tokens on the same line after a diagnostic directive
2018-02-03 18:07:05 -05:00
David Ungar
4a0a7f2e82
Fix for emit_reference_dependencies_without_primary_file warning required after changes to introduce multiple primary files to CompilerInstance.
...
Revealed by test Frontend/dependencies.swift.
2018-01-17 11:58:11 -08:00
John McCall
7f0f8830cd
Split AccessorDecl out from FuncDecl. NFC.
...
This has three principal advantages:
- It gives some additional type-safety when working
with known accessors.
- It makes it significantly easier to test whether a declaration
is an accessor and encourages the use of a common idiom.
- It saves a small amount of memory in both FuncDecl and its
serialized form.
2018-01-12 14:20:27 -05:00
Jordan Rose
1c651973c3
Excise "Accessibility" from the compiler (2/3)
...
"Accessibility" has a different meaning for app developers, so we've
already deliberately excised it from our diagnostics in favor of terms
like "access control" and "access level". Do the same in the compiler
now that we aren't constantly pulling things into the release branch.
This commit changes the 'Accessibility' enum to be named 'AccessLevel'.
2017-08-28 11:34:44 -07:00
Jordan Rose
5f30eac288
Excise "Accessibility" from the compiler (1/3)
...
"Accessibility" has a different meaning for app developers, so we've
already deliberately excised it from our diagnostics in favor of terms
like "access control" and "access level". Do the same in the compiler
now that we aren't constantly pulling things into the release branch.
This commit changes the names of methods, fields, a few local
variables, and even a swift-ide-test flag. The full list is below.
accessibilityForDiagnostics -> accessLevelForDiagnostics
checkAccessibility -> checkAccess
checkGenericParamAccessibility -> checkGenericParamAccess
checkTypeAccessibility -> checkTypeAccess
checkWitnessAccessibility -> checkWitnessAccessibility
computeAccessibility -> computeAccessLevel
computeDefaultAccessibility -> computeDefaultAccessLevel
fixItAccessibility -> fixItAccess
getAccessibilityString -> getAccessLevelString
getAccessibilityStrictly -> getAccessLevelStrictly
getAccessibilityUID -> getAccessLevelUID
getActualAccessibility -> getActualAccessLevel
getDefaultAccessibility -> getDefaultAccessLevel
getMaxAccessibility -> getMaxAccessLevel
getOverridableAccessibility -> getOverridableAccessLevel
getRawStableAccessibility -> getRawStableAccessLevel
getSetterAccessibility -> getSetterFormalAccess
hasAccessibility -> hasAccess
hasDefaultAccessibility -> hasDefaultAccessLevel
inferAccessibility -> inferAccessLevel
inferDefaultAccessibility -> inferDefaultAccessLevel
inferSetterAccessibility -> inferSetterAccessLevel
overwriteAccessibility -> overwriteAccess
overwriteSetterAccessibility -> overwriteSetterAccess
printAccessibility -> printAccess
requiredAccessibilityForDiagnostics -> requiredAccessForDiagnostics
resolveAccessibility -> resolveAccessControl
setAccessibility -> setAccess
setSetterAccessibility -> setSetterAccess
setDefaultAndMaxAccessibility -> setDefaultAndMaxAccess
validateAccessibility -> validateAccessControl
Accessibility -> AccessLevel
AccessibilityFilter -> AccessFilter
IgnoreAccessibility -> IgnoreAccessControl
NL_IgnoreAccessibility -> NL_IgnoreAccessControl
PrintAccessibility -> PrintAccess
PrintInternalAccessibilityKeyword -> PrintInternalAccessKeyword
SetterAccessibility -> SetterAccessLevel
setterAccessibility -> setterAccess
storedPropertyAccessibility -> storedPropertyAccess
-print-accessibility -> -print-access
2017-08-28 11:11:57 -07:00
Alex Hoppen
949968a182
Adjust printing to take into account special DeclNames
...
Print DeclBaseNames using a new userFacingStr() method to prepare for
DeclBaseNames that are not backed by Identifiers
2017-06-24 11:39:09 +02:00
contraultra
c40efd4154
[SR-4978] Fix compiler crash for malformed ASTs
2017-06-12 12:40:13 -07:00
Jordan Rose
325a96983e
[AST] Preparations for removal of getName on ValueDecl ( #9969 )
...
With the introduction of special decl names, `Identifier getName()` on
`ValueDecl` will be removed and pushed down to nominal declarations
whose name is guaranteed not to be special. Prepare for this by calling
to `DeclBaseName getBaseName()` instead where appropriate.
2017-05-28 19:04:19 -07:00
Alex Hoppen
f302afc97f
Unify approach to printing declaration names ( #9320 )
...
Printing a declaration's name using `<<` and `getBaseName()` is be
independent of the return type of `getBaseName()` which will change in
the future from `Identifier` to `DeclBaseName`
2017-05-28 17:25:20 -07:00
Jordan Rose
4cdb597b23
Rename VTablePlaceholderDecl to MissingMemberDecl.
...
As such, we no longer insert two placeholders for initializers that
need two vtable slots; instead we record that in the
MissingMemberDecl. I can see MissingMemberDecl growing to be something
we'd actually show to users, that can be used for other kinds of
declarations that don't have vtable entries, but for now I'm not going
to worry about any of that.
2017-05-10 11:55:55 -06:00
Jordan Rose
82930033d2
Add VTablePlaceholderDecl (but don't hook it up to anything yet).
2017-05-10 11:55:54 -06:00
Slava Pestov
61e0c558aa
FrontendTool: Remove a usage of getExistentialTypeProtocols()
2017-04-17 17:22:29 -06:00
Slava Pestov
37491e63ac
AST: Refactor existential type accessors on TypeBase and CanType
2017-04-03 23:14:25 -07:00
Graydon Hoare
57b3947891
[Dependencies] Sort external file dependencies by more-stable order.
2017-03-28 18:33:04 -07:00
Erik Eckstein
d70bfc5de2
rename namespace NewMangling -> Mangle
2017-03-20 10:09:30 -07:00
Erik Eckstein
6bbde47fe0
Use new mangling for type USRs used by incremental compilation
2017-02-20 18:04:37 -08:00
Erik Eckstein
8a6a9461d3
Only mangle non-private top-level classes and protocol with the old-style for the ObjC metadata.
...
Only those types can be de-mangled by the ObjC runtime anyway.
Also move this mangling logic into the ASTMangler class. This avoids keeping the old mangler around just for that purpose.
2017-02-16 18:20:05 -08:00
practicalswift
6d1ae2a39c
[gardening] 2016 → 2017
2017-01-06 16:41:22 +01:00
practicalswift
b253b21014
[gardening] Make sure argument names in comments match the actual parameter names
2016-12-21 22:56:01 +01:00
Jordan Rose
ec5502ae36
[Frontend] Make swiftdeps generation deterministic.
...
Daniel has been after me to do this for months; I'm ashamed to see
this was all it took.
rdar://problem/22808243
2016-12-08 16:15:35 -08:00
Jordan Rose
41974682e6
[FrontendTool] Split out swiftdeps generation into its own file.
...
No intended functionality change.
2016-12-08 16:15:35 -08:00