Ruby: Remove CFG dependency from AST stage

Commit 028ef6f27f had the unintended side-effect
that the AST and CFG stages got merged, because the AST stage's `isCapturedAccess`
now depends on `getCfgScopeImpl`, which belongs to the CFG stage.

The fix is to remove `getCfgScopeImpl` from the CFG stage, and instead let it
be part of the AST stage.
This commit is contained in:
Tom Hvitved
2021-11-17 13:15:55 +01:00
parent 08c778241d
commit 9ff63b00d6

View File

@@ -1041,6 +1041,9 @@ private Scope parent(Scope n) {
not n instanceof CfgScope::Range_
}
cached
private CfgScope getCfgScopeImpl(AstNode n) { result = parent*(scopeOfInclSynth(n)) }
/** Gets the CFG scope of node `n`. */
pragma[inline]
CfgScope getCfgScope(AstNode n) {
@@ -1052,13 +1055,6 @@ CfgScope getCfgScope(AstNode n) {
cached
private module Cached {
/** Gets the CFG scope of node `n`. */
cached
CfgScope getCfgScopeImpl(AstNode n) {
forceCachingInSameStage() and
result = parent*(scopeOfInclSynth(n))
}
cached
newtype TSuccessorType =
TSuccessorSuccessor() or