-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC] Split TypeInference #4814
Conversation
…change Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
…ality change Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
…there. No functionality change Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
17bea39
to
ba1fe5b
Compare
After this change, whenever I run ctest locally, I see 26 tests consistently fail -- all are
Any idea what causes this? Seems like something internal to absl. |
Interesting... What are these tests? And can you try to backtrace to see where emplace is called? |
The failing tests (from LastTestsFailed.log) are:
partial backtrace from gdb with one of the tests:
So the failing emplace is at typeConstraints.h line 42 in an |
If I back out just that change to typeConstraints.h (using |
I think I know what happens and this is due to heterogenous lookup and overall IR structure. We are having: class Type_Var : public Type_Declaration, public virtual ITypeVar So, conversion of Given that we always store Another question is how you had asserts enabled for abseil build. We might want to have these in CI as well. |
Makes sense -- or explicit (static_)cast to ITypeVar * in the emplace call? Either should work, though this is something to watch for flat_map use in the future.
I'm just using a normal |
Yes, though it will be case for standard maps as well, as containers are starting to have heterogenous lookup from C++17 / C++20. In general the map itself is fine, it is just assertion being over-conservative. Let me submit a PR then.
I think tests always should run with assertions enabled, yes. @fruffy Can we enable this? |
typeInference.cpp
is a huge file spanning over 182 Kb (!). This PR splits into a bit more manageable chunks:Some very small cleanup while there. Overall, there are no functionality changes.