-
Notifications
You must be signed in to change notification settings - Fork 77
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
fixing the superfluous generation of enormous amounts of temporary tuple types with UUIDs for type parameter names. #1872
Conversation
…ple types with UUIDs for type parameter names.
Codecov Report
@@ Coverage Diff @@
## main #1872 +/- ##
=======================================
- Coverage 49% 49% -1%
+ Complexity 6159 6143 -16
=======================================
Files 660 660
Lines 58668 58668
Branches 8543 8543
=======================================
- Hits 28924 28902 -22
- Misses 27556 27577 +21
- Partials 2188 2189 +1
|
@jurgenvinju shall we add a test where |
Yes. I hope that works :-) |
after that is done, I think this is fine to merge. I think this would be nice to pickup before we make a new rascal release. |
actualTypes.match(TypeFactory.getInstance().voidType(), renamings); | ||
|
||
// rename all the bound type parameters | ||
for (Entry<Type,Type> entry : renamings.entrySet()) { | ||
Type key = entry.getKey(); | ||
renamings.put(key, TypeFactory.getInstance().parameterType(key.getName() + ":" + UUID.randomUUID().toString(), key.getBound())); | ||
renamings.put(key, TypeFactory.getInstance().parameterType(key.getName() + ":" + uniquePrefix, key.getBound())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering about the performance impact of this. ISourceLocation::toString
is not the fastest operation to perform. quite some string concats.
Is there an alternative that would be unique enough? perhaps the hashcode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't want to debug the situation where a hash collision blows this up :-) Remember this only happens for generic functions.
it was already one of the tests |
No description provided.