Commit 0c381d9
committed
Merge parameter 'arg' node into 'param-init'
Each parameter previously created two additional nodes: an 'arg:i'
node (ReadArgumentInstruction) holding the incoming argument value, and
a 'param-init:i' node (InitParameterInstruction) writing it to the
parameter's SSA variable. The 'arg' node existed only to be the RHS of
the param-init write; the ParameterNode and inter-procedural flow are
already anchored on param-init.
Make InitParameterInstruction its own RHS and drop the 'arg:i' node,
halving the per-parameter node count. DeadStoreOfLocal now excludes
InitParameterInstruction (instead of ReadArgumentInstruction). The
data-flow changes are pure relabelings (arg -> param-init) with no flow
loss.1 parent 27e86d8 commit 0c381d9
10 files changed
Lines changed: 150 additions & 246 deletions
File tree
- go/ql
- lib/semmle/go/controlflow
- src/RedundantCode
- test
- example-tests/snippets
- extractor-tests/go1.17
- library-tests/semmle/go
- controlflow/ControlFlowGraph
- dataflow
- FlowSteps
- SSA
- frameworks/Revel
- query-tests/Security/CWE-601/BadRedirectCheck
Lines changed: 10 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
| 564 | + | |
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
| 569 | + | |
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| |||
1729 | 1729 | | |
1730 | 1730 | | |
1731 | 1731 | | |
1732 | | - | |
1733 | | - | |
| 1732 | + | |
| 1733 | + | |
1734 | 1734 | | |
1735 | 1735 | | |
1736 | 1736 | | |
| |||
1773 | 1773 | | |
1774 | 1774 | | |
1775 | 1775 | | |
1776 | | - | |
1777 | | - | |
| 1776 | + | |
| 1777 | + | |
1778 | 1778 | | |
1779 | | - | |
| 1779 | + | |
1780 | 1780 | | |
1781 | 1781 | | |
1782 | | - | |
| 1782 | + | |
1783 | 1783 | | |
1784 | 1784 | | |
1785 | 1785 | | |
| |||
1792 | 1792 | | |
1793 | 1793 | | |
1794 | 1794 | | |
1795 | | - | |
1796 | | - | |
1797 | | - | |
1798 | | - | |
1799 | | - | |
1800 | | - | |
1801 | | - | |
| 1795 | + | |
1802 | 1796 | | |
1803 | 1797 | | |
1804 | 1798 | | |
1805 | 1799 | | |
1806 | 1800 | | |
1807 | | - | |
| 1801 | + | |
1808 | 1802 | | |
1809 | 1803 | | |
1810 | 1804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
196 | 194 | | |
197 | 195 | | |
198 | 196 | | |
| |||
1026 | 1024 | | |
1027 | 1025 | | |
1028 | 1026 | | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
| 1027 | + | |
1046 | 1028 | | |
1047 | 1029 | | |
1048 | 1030 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
0 commit comments