Commit Graph

16 Commits

Author SHA1 Message Date
Meghana Gupta
f458d9b490 Fix unnecessary one-time recompile of stdlib with -enable-ossa-flag (#39516)
* Fix unnecessary one-time recompile of stdlib with -enable-ossa-flag

This includes a bit in the module format to represent if the module was
compiled with -enable-ossa-modules flag. When compiling a client module
with -enable-ossa-modules flag, all dependent modules are checked for this bit,
if not on, recompilation is triggered with -enable-ossa-modules.

* Updated tests
2021-10-04 18:46:40 -07:00
zoecarver
d706863a52 [cxx-interop][nfc] Add a ClangImporter request zone.
This is just the boilerplate for adding a request zone. I haven't actually added any requrests in this commit.
2021-09-28 17:08:48 -07:00
Victoria Mitchell
ff766fce37 add ASTContext symbol-graph arg in unit tests 2021-07-01 09:05:02 -06:00
Pavel Yaskevich
d310f37ffc [CSBindings] Infer transitive protocols only for unresolved member base
Nothing besides static member refs on protocols feature is currently
using transitive protocols, so instead of trying to infer them on every
step let's do that only for base type of a dot-syntax reference when
there are no other bindings for it.
2021-03-30 13:39:24 -07:00
Pavel Yaskevich
1817ddcc5e [CSBindings] Always finalize binding set unless explicitly asked not to 2021-02-24 10:38:31 -08:00
Pavel Yaskevich
fbc11f410a [ConstraintSystem] Implement incremental binding computation 2021-02-24 10:37:20 -08:00
Pavel Yaskevich
df7af0078f [CSBindings] Separate inference storage from final product usable by the solver
`PotentialBindings` lost most of its responsibilities,
and are no longer comparable. Their main purpose now
is binding and metadata tracking (introduction/retraction).

New `BindingSet` type is something that represents a set
of bindings at the current step of the solver.
2021-02-24 10:37:20 -08:00
Pavel Yaskevich
72888ca29b [ConstraintSystem] NFC: Extract PotentialBindings and auxiliary struct from ConstraintSystem
This opens up a posibility of using `PotentialBindings`
in `ConstraintGraphNode` and other places in `ConstraintGraph`.
2021-01-15 15:03:54 -08:00
Pavel Yaskevich
03b6b41774 [CSBindings] NFC: Don't pass constraint system as an argument to infer* methods
`PotentialBindings` already reference the constraint system they
belong to, so there is no need to pass it as an argument to inference
methods.
2021-01-12 00:53:46 -08:00
Frederick Kellison-Linn
6b0f5da001 [Unit tests] Add unit tests for optional lookup behavior 2020-12-04 12:11:10 -05:00
Pavel Yaskevich
a3c3981a68 [unittest/Sema] NFC: Add a way to create a protocol with a given name and parent type 2020-10-15 16:27:36 -07:00
Pavel Yaskevich
1aecea17e4 [unittest/Sema] Add a helper method to infer bindings for a given type variable
This mimics what `determineBestBindings` does but without sorting.
2020-10-15 16:27:35 -07:00
Pavel Yaskevich
6e470f5fcd [unittest/Sema] NFC: Switch to use AttributedImport instead of deprecated ImportedModuleDesc 2020-10-13 00:12:09 -07:00
Pavel Yaskevich
b2c31c394b [unittests/Sema] Add an ability to retrieve stdlib types by name 2020-10-12 18:57:20 -07:00
Pavel Yaskevich
0b22d91c94 [unittests] Extend Sema testing fixture to load stdlib (+ shims)
Setup module importers, load stdlib, establish separate testing
module and load a single main file there which imports standard
library.
2020-10-12 18:57:20 -07:00
Pavel Yaskevich
9239692d00 [unittests] Add a fixture for Sema unit tests 2020-10-12 18:57:20 -07:00