Skip to content

Commit affb09d

Browse files
rubmaryfacebook-github-bot
authored andcommitted
Don't store DeclarationUses
Summary: `XRefsViaName` is similar to `DeclarationUses` but instead of storing the declaration, it stores the name. So, to find the predicate we only need to map de `Declaration` to the `Name` and then query `XRefsViaName`. This allows us to compute the predicate efficiently on the fly Reviewed By: iamirzhan Differential Revision: D75604029 fbshipit-source-id: e06ac9a962a586957b1bc329d17dd634a6ab695e
1 parent 78f33f4 commit affb09d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

glean/schema/source/python.angle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ predicate DeclarationUses:
207207
file: src.File,
208208
span: src.ByteSpan,
209209
}
210-
stored {Decl, File, Span} where
210+
{Decl, File, Span} where
211+
DeclarationToName Decl -> Name;
211212
XRefsViaName { Name, File, Span };
212-
DeclarationWithName {Name, Decl};
213213

214214
predicate DirectXRefsByFile:
215215
{

0 commit comments

Comments
 (0)