aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-01-11 14:02:35 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-01-11 14:04:37 -0800
commit573807d4e9d1b7a8b6956278773dfc53b544093f (patch)
treece89c3a760afbb113f78621a2b1ef0cbb9cef5e5 /src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
parent42623f59fdd3bfbdfc21490c69f21537fa32011c (diff)
Convert ActionLookupKey implementations to directly implement SkyKey, removing the layer of indirection of getting SkyKey out of ActionLookupKey, which uses more memory for no reason.
PiperOrigin-RevId: 181658615
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
index f3d47e3763..56599c1ab8 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/AspectFunction.java
@@ -20,7 +20,6 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.actions.ActionKeyContext;
-import com.google.devtools.build.lib.actions.ActionLookupValue;
import com.google.devtools.build.lib.analysis.AliasProvider;
import com.google.devtools.build.lib.analysis.AspectResolver;
import com.google.devtools.build.lib.analysis.CachingAnalysisEnvironment;
@@ -408,8 +407,7 @@ public final class AspectFunction implements SkyFunction {
throws DuplicateException {
ArrayList<ConfiguredAspect> aspectValues = new ArrayList<>();
for (AspectKey aspectKey : aspectKeys) {
- SkyKey skyAspectKey = aspectKey.getSkyKey();
- AspectValue aspectValue = (AspectValue) values.get(skyAspectKey);
+ AspectValue aspectValue = (AspectValue) values.get(aspectKey);
ConfiguredAspect configuredAspect = aspectValue.getConfiguredAspect();
aspectValues.add(configuredAspect);
}
@@ -438,14 +436,13 @@ public final class AspectFunction implements SkyFunction {
return;
}
ImmutableList<AspectKey> baseKeys = key.getBaseKeys();
- SkyKey skyKey = key.getSkyKey();
- result.put(key.getAspectDescriptor(), skyKey);
+ result.put(key.getAspectDescriptor(), key);
for (AspectKey baseKey : baseKeys) {
buildSkyKeys(baseKey, result, aspectPathBuilder);
}
// Post-order list of aspect SkyKeys gives the order of propagating aspects:
// the aspect comes after all aspects it transitively sees.
- aspectPathBuilder.add(skyKey);
+ aspectPathBuilder.add(key);
}
private SkyValue createAliasAspect(
@@ -462,7 +459,7 @@ public final class AspectFunction implements SkyFunction {
// the real configured target.
Label aliasLabel = aliasChain.size() > 1 ? aliasChain.get(1) : configuredTarget.getLabel();
- SkyKey depKey = ActionLookupValue.key(originalKey.withLabel(aliasLabel));
+ SkyKey depKey = originalKey.withLabel(aliasLabel);
// Compute the AspectValue of the target the alias refers to (which can itself be either an
// alias or a real target)