Slava Pestov
957427fbfc
Frontend: Rework delayed parsing mode a bit
2017-11-18 11:08:18 -05:00
David Ungar
ad217f7ce6
Fix StringRef parameter declaration.
2017-11-14 20:54:43 -08:00
David Ungar
3f3d784144
Factor code from tools & move input conversion.
2017-11-14 20:48:59 -08:00
David Ungar
a406d3ae3f
Factor common code out of tools into CompilerInvocation::setUpInputForSILTool.
2017-11-14 20:31:53 -08:00
David Ungar
47ee930a50
git-clang-format'ed
2017-10-08 23:56:03 -07:00
David Ungar
c1821755de
NFC: First step (refactoring) towards speeding up compilation by having multiple primary files: Creates new class, FrontendInputs, to encapsulate InputFilenames, InputBuffers, and PrimaryInput, which were formerly in FrontendOptions. Add new instance variable, Inputs, to FrontendOptions in order to hold FrontendInputs.
...
Encapsulate uses of the variables in FrontendInputs with intention-describing functions. Move some code that sets these variables into FrontendInputs and FrontendOptions classes.
Create new FrontendInputs class to encapsulate InputFilenames, InputBuffers and PrimaryInput, which were formerly in Frontend.
Includes one change in SwiftEditor.cpp to resolve a merge conflict.
2017-10-08 10:20:37 -07:00
David Ungar
42b04a8a9b
Merged checkTypesWhileParsingMain into its caller.
2017-09-19 16:57:45 -07:00
David Ungar
fef5551fdb
Added consts to implicitImports refs & fixed dangling new in computeDelayedParsingCallback.
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-19 16:57:45 -07:00
David Ungar
3d2484af28
git-clang-format
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-18 14:02:50 -07:00
David Ungar
4653c92e25
Renamed finishTypeCheckingMainModule to finishTypeChecking
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-18 14:01:57 -07:00
David Ungar
01c54fe13d
git-clang-format
2017-09-14 16:58:06 -07:00
David Ungar
cb80010216
Jordan's comments
...
Use function_ref
Rename generateOutputForTheWholeModule
Constify createRELPFile
Rename typeCheckMainModule
Move shouldImportSwiftOnoneModule
Rename timer in performTypeChecking
2017-09-14 16:58:06 -07:00
David Ungar
ba536b1fc7
format
2017-09-14 16:58:06 -07:00
David Ungar
7b7c62917d
Abstract forEachFileToTypeCheck
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:58:05 -07:00
David Ungar
3839697201
format
2017-09-14 16:56:32 -07:00
David Ungar
da79632eaf
Pull out parseAndCheckTypes
...
They were the only computations using PersistentState and DeclayedCB
2017-09-14 16:56:32 -07:00
David Ungar
e797092dbf
Moved comment, removed & from a StringRef
2017-09-14 16:56:31 -07:00
David Ungar
37215e1bb0
Formatted
2017-09-14 16:56:31 -07:00
David Ungar
33aa6eb066
Change 'typeCheckEveryFileInMainModule' to 'typeCheckEveryFile'
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:56:31 -07:00
David Ungar
042800c6e1
Remove 'const' in 'const OptionSet'
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:55:21 -07:00
David Ungar
356f47c991
delete 'the' from 'parseAndTypeCheckTheMainFile'
2017-09-14 16:54:32 -07:00
David Ungar
a3b023b160
git-clang-formatted
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:54:32 -07:00
David Ungar
e800e57c80
Delete first 'a' from 'parseALibraryFile'
2017-09-14 16:53:17 -07:00
David Ungar
09df5d7ebb
Change "createMainFileWithImportsAndAddToModule" to "addMainFileToModule"
2017-09-14 16:53:17 -07:00
David Ungar
0386e69f13
Make lifetime explicit for delayed parsing callback.
2017-09-14 16:53:17 -07:00
David Ungar
396def8fd0
Shorted "createREPLFileWithImports"
2017-09-14 16:53:17 -07:00
David Ungar
1e238a9226
Make ImplicitImports::ImplicitImports "explicit"
2017-09-14 16:53:17 -07:00
David Ungar
9b2faa03dd
Shorten fillInModulesToImportFromImplicitImportModuleNames
2017-09-14 16:53:16 -07:00
David Ungar
add13798be
Separated out the Onone module handling from stdlib handling
...
Also refactored the Onone module predicate. I believe there is no functional change, but I don't understand the correctness of what was there.
2017-09-14 16:53:16 -07:00
David Ungar
249718e1bd
Consolidate performWholeModuleTypeChecking and finishTypeCheckingMainModule into typeCheckMainModule
2017-09-14 16:53:16 -07:00
David Ungar
266007bee3
Don't pass clangImporter
2017-09-14 16:53:16 -07:00
David Ungar
8099209ddc
Reify generateOutputForTheWholeModule
2017-09-14 16:53:16 -07:00
David Ungar
7fe7191a54
delete redundant "OnMainModule" from performWholeModuleTypeCheckingOnMainModule
2017-09-14 16:53:16 -07:00
David Ungar
2c08429e27
split up typeCheckTopLevelInputsExcludingMain
...
because the old name and code were just confusing to me
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:53:16 -07:00
David Ungar
e3a7857d77
Move comment to function declaration and renamed parseMainAndTypeCheckTopLevelFiles
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:50:55 -07:00
David Ungar
10b42c26b8
Addressing review suggestions
...
- Replaced RecursiveSharedTimer w/ SharedTimer in performTypeChecking
- Sorted includes by library name within top-level group
- Removed timer from addAdditionalImportsTo
- Changed comment to doc comment
- Unlinked computation of ImplicitModuleImportKind from creation of SIL module
- Renamed supplyREPLFileWithImports to createREPLFileWIthImports
- Reified tuple of ImplicitImports
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:49:39 -07:00
David Ungar
4c96b89b87
Fix a bug with DelayedCB
2017-09-14 16:46:37 -07:00
David Ungar
768586b3a0
Bug fix: loadStdlibAndMaybeSwiftOnoneSupport needs to be able to abort the compilation
2017-09-14 16:46:37 -07:00
David Ungar
50e0db551d
Ran my changes through git-clang-format.
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:44:28 -07:00
David Ungar
210cb3c9c1
Pull out supplyREPLFileWithImports.
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:40:17 -07:00
David Ungar
39771feaef
Pulled out parsePartialModulesAndLibraryFiles.
2017-09-14 16:37:44 -07:00
David Ungar
f63cb71196
Pull out parseMainAndTypeCheckTopLevelFiles.
2017-09-14 16:37:44 -07:00
David Ungar
4cc16f4590
Finish replacing “underlying” with “objCModuleUnderlyingMixedFramework”
2017-09-14 16:37:44 -07:00
David Ungar
bff485856b
Replace modImpKind w/ implicitModuleImportKind
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:37:43 -07:00
David Ungar
91bb47e068
Exploit constancy of FrontendOptions and InputFileKind
...
# Conflicts:
# lib/Frontend/Frontend.cpp
2017-09-14 16:33:34 -07:00
David Ungar
2b5bfa65fe
Pull out loadStdlibAndMaybeSwiftOnoneSupport.
2017-09-14 16:25:10 -07:00
David Ungar
d673df3473
Pull out importUnderlyingModule.
2017-09-14 16:25:10 -07:00
David Ungar
a27a5d9e28
Simplify interface to fillInModulesToImportFromImplicitImportModuleNames.
2017-09-14 16:25:10 -07:00
David Ungar
706c7a336a
Pull out importBridgingHeader.
2017-09-14 16:25:10 -07:00
David Ungar
d77f1b2ede
Pull out fillInModulesToImportFromImplicitImportModuleNames.
2017-09-14 16:25:09 -07:00