Skip to content

Commit

Permalink
Merge pull request #32653 from mkouba/qute-assignability-perf-imp
Browse files Browse the repository at this point in the history
Qute build steps - refactoring and performance improvements
  • Loading branch information
gastaldi authored Apr 16, 2023
2 parents 8e81b1e + 4d3a543 commit f85e7d4
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 185 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@
import io.quarkus.qute.deployment.QuteProcessor.JavaMemberLookupConfig;
import io.quarkus.qute.deployment.QuteProcessor.MatchResult;
import io.quarkus.qute.deployment.TemplatesAnalysisBuildItem.TemplateAnalysis;
import io.quarkus.qute.deployment.Types.AssignableInfo;
import io.quarkus.qute.deployment.Types.HierarchyIndexer;
import io.quarkus.qute.deployment.Types.AssignabilityCheck;
import io.quarkus.qute.generator.Descriptors;
import io.quarkus.qute.generator.ValueResolverGenerator;
import io.quarkus.qute.i18n.Localized;
Expand Down Expand Up @@ -455,8 +454,7 @@ public String apply(String id) {

JavaMemberLookupConfig lookupConfig = new QuteProcessor.FixedJavaMemberLookupConfig(index,
QuteProcessor.initDefaultMembersFilter(), false);
Map<DotName, AssignableInfo> assignableCache = new HashMap<>();
HierarchyIndexer hierarchyIndexer = new HierarchyIndexer(index);
AssignabilityCheck assignabilityCheck = new AssignabilityCheck(index);

// bundle name -> (key -> method)
Map<String, Map<String, MethodInfo>> bundleToMethods = new HashMap<>();
Expand Down Expand Up @@ -576,10 +574,10 @@ public String apply(String id) {
implicitClassToMembersUsed, templateIdToPathFun, generatedIdsToMatches,
extensionMethodExcludes, checkedTemplate, lookupConfig, namedBeans,
namespaceTemplateData, regularExtensionMethods, namespaceExtensionMethods,
assignableCache, hierarchyIndexer);
assignabilityCheck);
MatchResult match = results.get(param.toOriginalString());
if (match != null && !match.isEmpty() && !Types.isAssignableFrom(match.type(),
methodParams.get(idx), index, assignableCache)) {
if (match != null && !match.isEmpty() && !assignabilityCheck.isAssignableFrom(match.type(),
methodParams.get(idx))) {
incorrectExpressions
.produce(new IncorrectExpressionBuildItem(expression.toOriginalString(),
"Message bundle method " + method.declaringClass().name() + "#" +
Expand Down
Loading

0 comments on commit f85e7d4

Please sign in to comment.