Brent Royal-Gordon
da88512eda
[NFC] Take DeclNameRef in UnqualifiedLookup and lookupQualified()
2019-12-11 00:55:17 -08:00
David Ungar
87799339c7
Eagerly expand function bodies before type-checking them, which scrambles them.
2019-11-06 10:36:14 -08:00
David Ungar
f162a84e01
Factoring
2019-11-02 20:44:03 -07:00
Brent Royal-Gordon
99faa033fc
[NFC] Standardize dump() methods in frontend
...
By convention, most structs and classes in the Swift compiler include a `dump()` method which prints debugging information. This method is meant to be called only from the debugger, but this means they’re often unused and may be eliminated from optimized binaries. On the other hand, some parts of the compiler call `dump()` methods directly despite them being intended as a pure debugging aid. clang supports attributes which can be used to avoid these problems, but they’re used very inconsistently across the compiler.
This commit adds `SWIFT_DEBUG_DUMP` and `SWIFT_DEBUG_DUMPER(<name>(<params>))` macros to declare `dump()` methods with the appropriate set of attributes and adopts this macro throughout the frontend. It does not pervasively adopt this macro in SILGen, SILOptimizer, or IRGen; these components use `dump()` methods in a different way where they’re frequently called from debugging code. Nor does it adopt it in runtime components like swiftRuntime and swiftReflection, because I’m a bit worried about size.
Despite the large number of files and lines affected, this change is NFC.
2019-10-31 18:37:42 -07:00
Robert Widmann
56b6e53dae
Remove raw references to PatternBindingEntry APIs
...
Switch most callers to explicit indices. The exceptions lie in things that needs to manipulate the parsed output directly including the Parser and components of the ASTScope. These are included as friend class exceptions.
2019-10-17 13:31:14 -07:00
David Ungar
571d815c6a
Remove radar numbers.
2019-10-10 17:39:42 -07:00
David Ungar
a9ab4aa8c2
Use SeparateCaching
2019-10-09 22:33:39 -07:00
David Ungar
86ec6a00da
Remove include order dependency
2019-10-08 14:08:43 -07:00
David Ungar
5908cfc5ba
First cut at ASTScope expansion requestification
2019-10-08 09:05:19 -07:00
David Zarzycki
a033d2b8a2
[AST] Fix debug typo
2019-09-23 11:58:09 +03:00
David Ungar
5144341fe7
Count AST ancestor scopes instead of children when last expanded
2019-09-22 17:59:40 -07:00
David Ungar
b943a3987f
Use separate bool to record expansion
2019-09-22 17:59:40 -07:00
David Ungar
7f834cdb54
renaming to ASTAncestor
2019-09-22 17:59:40 -07:00
David Ungar
10583f89c6
Ensure that reexpansion does not lose scopes.
2019-09-22 17:59:40 -07:00
David Ungar
5ca14099a1
Add comment
2019-09-22 17:59:40 -07:00
David Ungar
3c891f9532
Fully eager for printing, just eager enough for type-checking.
2019-09-22 17:59:40 -07:00
David Ungar
c17d9ae7bc
Radar tagging
2019-09-22 17:59:40 -07:00
David Ungar
683310eb74
Ever expansion detection. WIP
2019-09-22 17:59:40 -07:00
David Ungar
c808eb5a27
Don't try to expand ASTSourceFileScope when eagerly building.
2019-09-22 17:59:40 -07:00
David Ungar
f33c4407dc
Push range of extension scope after type, WIP
2019-09-22 17:59:39 -07:00
David Ungar
37b16e8b33
Tag cycles w/ radar
2019-09-22 17:59:39 -07:00
David Ungar
603cc05289
WIP lazy whole scopes
2019-09-22 17:59:39 -07:00
David Ungar
e3f7760154
Add explanations to all asserts.
2019-09-17 16:30:25 -07:00
David Ungar
8ebba23b06
Add ASTScope_unreachable
2019-09-17 16:03:05 -07:00
David Ungar
3966d086a5
When ASTScope assertions fails, direct user to try disabling ASTScopes.
2019-09-17 15:56:33 -07:00
David Ungar
968c5a8282
Eager tree building for primaries
2019-09-13 17:22:50 -07:00
David Ungar
24ef696242
Lazy AbstractFunctionBodyScope creation
2019-09-13 17:02:51 -07:00
David Ungar
0c83088269
Better source-range checking for debugging
2019-09-13 17:01:21 -07:00
David Ungar
7e0d96cb59
Added debugging helpers for range-matching
2019-09-13 16:19:55 -07:00
David Ungar
7992e1c6c4
Lots of cleanups, renamings, etc.
2019-08-26 16:55:18 -07:00
David Ungar
b02b4b00ef
Cleanup and fixes, also 1st cut at lazy.
2019-08-13 17:48:06 -07:00
David Ungar
f64033a2d2
Manual rebase with master
2019-08-06 22:13:20 -07:00
David Ungar
3a3145c0f4
Alternate SelfDC computation, fixes, and cleanups.
...
ASTScopeLookup by default
Create empty fn bodies for IDE tests.
Include initializer source range for property wrappers.
Add -disable-astscope-lookup
2019-06-23 09:17:09 -07:00
David Ungar
44c62485e6
Rm redundant computeSelfDCForParemt
2019-06-12 21:24:54 -07:00
David Ungar
40cd518fd9
Rm doISplitAScope for visitBraceStmt
2019-06-12 16:44:24 -07:00
David Ungar
8988fa9e7f
Added fixmes
2019-06-12 12:04:43 -07:00
David Ungar
3e958442fa
Clean up
2019-06-12 12:00:37 -07:00
David Ungar
72b20967f3
Outer generics
2019-06-12 11:42:11 -07:00
David Ungar
2f2bbfb14c
Better method scope lookup
2019-06-12 10:46:30 -07:00
David Ungar
16ca723b00
Explain source ranges
2019-06-12 10:34:44 -07:00
David Ungar
4122438f86
Outline lookInGenericsAndSelfType
2019-06-12 08:11:27 -07:00
David Ungar
55323bbab8
Typos, etc.
2019-06-12 07:48:05 -07:00
David Ungar
884648d87b
invariant
2019-06-12 07:30:36 -07:00
David Ungar
455b344397
fmt
2019-06-10 15:38:01 -07:00
David Ungar
edc6a5ce6d
unfmt
2019-06-10 15:36:32 -07:00
David Ungar
2b7b7cfec1
Fix unfmt still rm startLocAccordingToCondition
2019-06-10 14:27:24 -07:00
David Ungar
f203509250
fixes, unfmted, rm startLocAccordingToCondition
2019-06-10 14:03:34 -07:00
David Ungar
6a8d91f673
fmt
2019-06-10 13:18:58 -07:00
David Ungar
17bb03112e
new cond use scheme
2019-06-10 13:18:18 -07:00
David Ungar
7d1f024e07
WIP unfmt
2019-06-10 12:10:21 -07:00