File tree Expand file tree Collapse file tree
src/experimental/dataflow/internal
test/experimental/dataflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,8 +96,13 @@ class DataFlowCall extends CallNode {
9696 this = callable .getACall ( )
9797 }
9898
99+ /** Get the callable to which this call goes. */
100+ DataFlowCallable getCallable ( ) { result = callable }
101+
99102 /** Gets the enclosing callable of this call. */
100- DataFlowCallable getEnclosingCallable ( ) { result = callable }
103+ DataFlowCallable getEnclosingCallable ( ) {
104+ result .getScope ( ) = this .getNode ( ) .getScope ( )
105+ }
101106}
102107
103108/** A data flow node that represents a call argument. */
@@ -119,7 +124,7 @@ class ArgumentNode extends Node {
119124
120125/** Gets a viable run-time target for the call `call`. */
121126DataFlowCallable viableCallable ( DataFlowCall call ) {
122- result = call .getEnclosingCallable ( )
127+ result = call .getCallable ( )
123128}
124129
125130private newtype TReturnKind = TNormalReturnKind ( )
Original file line number Diff line number Diff line change 11| test.py:4:10:4:10 | ControlFlowNode for z | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() |
22| test.py:7:19:7:19 | ControlFlowNode for a | test.py:1:19:1:19 | SSA variable x |
3+ | test.py:7:19:7:19 | ControlFlowNode for a | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() |
Original file line number Diff line number Diff line change 2828| test.py:1:5:1:17 | GSSA Variable obfuscated_id | test.py:7:1:7:1 | GSSA Variable b |
2929| test.py:1:5:1:17 | GSSA Variable obfuscated_id | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id |
3030| test.py:1:5:1:17 | GSSA Variable obfuscated_id | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() |
31- | test.py:1:19:1:19 | ControlFlowNode for x | test.py:1:1:1:21 | Exit node for Function obfuscated_id |
3231| test.py:1:19:1:19 | ControlFlowNode for x | test.py:1:19:1:19 | ControlFlowNode for x |
33- | test.py:1:19:1:19 | ControlFlowNode for x | test.py:1:19:1:19 | SSA variable x |
34- | test.py:1:19:1:19 | ControlFlowNode for x | test.py:2:3:2:3 | SSA variable y |
35- | test.py:1:19:1:19 | ControlFlowNode for x | test.py:2:7:2:7 | ControlFlowNode for x |
36- | test.py:1:19:1:19 | ControlFlowNode for x | test.py:3:3:3:3 | SSA variable z |
37- | test.py:1:19:1:19 | ControlFlowNode for x | test.py:3:7:3:7 | ControlFlowNode for y |
38- | test.py:1:19:1:19 | ControlFlowNode for x | test.py:4:10:4:10 | ControlFlowNode for z |
3932| test.py:1:19:1:19 | SSA variable x | test.py:1:1:1:21 | Exit node for Function obfuscated_id |
4033| test.py:1:19:1:19 | SSA variable x | test.py:1:19:1:19 | SSA variable x |
4134| test.py:1:19:1:19 | SSA variable x | test.py:2:3:2:3 | SSA variable y |
Original file line number Diff line number Diff line change 88| test.py:1:5:1:17 | GSSA Variable obfuscated_id | test.py:0:0:0:0 | Exit node for Module test |
99| test.py:1:5:1:17 | GSSA Variable obfuscated_id | test.py:7:5:7:17 | ControlFlowNode for obfuscated_id |
1010| test.py:1:5:1:17 | GSSA Variable obfuscated_id | test.py:7:5:7:20 | ControlFlowNode for obfuscated_id() |
11- | test.py:1:19:1:19 | ControlFlowNode for x | test.py:1:19:1:19 | SSA variable x |
1211| test.py:1:19:1:19 | SSA variable x | test.py:1:1:1:21 | Exit node for Function obfuscated_id |
1312| test.py:1:19:1:19 | SSA variable x | test.py:2:7:2:7 | ControlFlowNode for x |
1413| test.py:2:3:2:3 | SSA variable y | test.py:1:1:1:21 | Exit node for Function obfuscated_id |
You can’t perform that action at this time.
0 commit comments