Commit Graph

1961 Commits

Author SHA1 Message Date
Arthur Baars
bd19661b60 Address comments 2024-10-24 16:40:19 +02:00
Arthur Baars
a7628e7f4e Rust: revert unnecessary changes to VariableImpl.qll 2024-10-24 15:19:01 +02:00
Arthur Baars
bad9262f12 Rust: create locations for Format and FormatArgument 2024-10-24 15:14:11 +02:00
Arthur Baars
017d492348 Rust: implement synthesized Locations 2024-10-24 15:14:10 +02:00
Arthur Baars
110d2ea775 Rust: avoid classes with multiple getAPrimaryQLClass result 2024-10-24 15:14:09 +02:00
Arthur Baars
ca469f6d5c Rust: introduce PathExprBase class 2024-10-24 15:14:07 +02:00
Arthur Baars
2b65e78674 Rust: fix bad join order 2024-10-24 15:13:27 +02:00
Arthur Baars
a3b903f13a Rust: simplify synth constructors 2024-10-24 15:13:25 +02:00
Arthur Baars
8843a7c389 Rust: rename {Implicit,FormatTemplate}VariableAccess 2024-10-24 15:13:24 +02:00
Arthur Baars
fc4ac9bcf8 Rust: implement Format and FormatArgument classes 2024-10-24 15:13:23 +02:00
Arthur Baars
58dfe6c667 Rust: run codegen 2024-10-24 15:13:22 +02:00
Arthur Baars
8d2236b6d6 Rust: define Format and FormatArgument in schema 2024-10-24 15:13:21 +02:00
Arthur Baars
d4b2dc3711 Apply suggestion 2024-10-24 15:13:20 +02:00
Arthur Baars
be41ca5d4e Rust: update expected output 2024-10-24 15:13:19 +02:00
Arthur Baars
11396ef7cb Rust: avoid multiple PrimaryQLClass warnings
Fixes things like:
```
multiplePrimaryQlClasses
| x | PathExpr,VariableAccess |
```
2024-10-24 15:13:17 +02:00
Arthur Baars
e1c315b288 Rust: make ImplicitVariableAccess instance of VariableAccess 2024-10-24 15:13:14 +02:00
Arthur Baars
1b7b24ecb8 Rust: add Locatable::hasLocationInfo 2024-10-24 15:11:02 +02:00
Arthur Baars
f213a2d640 Rust: CFG for ImplicitVariableAccess 2024-10-24 15:11:01 +02:00
Arthur Baars
8a5fa9b72f Rust: add ImplicitVariableAccess class 2024-10-24 15:11:00 +02:00
Arthur Baars
8f2c7c1239 Rust: parse formatting templates 2024-10-24 15:10:59 +02:00
Tom Hvitved
09c3ac6f81 Rust: Collapse cached CFG logic into one stage 2024-10-24 14:58:19 +02:00
Paolo Tranquilli
3f8d438851 Rust: move qltest to rust code, add options with cargo check 2024-10-24 12:55:23 +02:00
Tom Hvitved
a3d8b8eb14 Rust: Run codegen 2024-10-23 15:31:08 +02:00
Tom Hvitved
df19281b9f Rust: Introduce AstNode.getEnclosingCallable 2024-10-23 15:31:07 +02:00
Tom Hvitved
086e0c61fc Merge pull request #17817 from hvitved/rust/cfg-scope-callable
Rust: Use `Callable` to define `CfgScope`
2024-10-23 15:24:13 +02:00
Tom Hvitved
60c205ff37 Merge pull request #17818 from hvitved/rust/summary-stats-perf
Rust: Speedup `SummaryStats.ql`
2024-10-22 10:15:56 +02:00
Arthur Baars
490f81437b Merge pull request #17804 from github/aibaars/local-defs-1
Rust: add ide-contextual-queries/localDefinitions.ql
2024-10-21 15:30:44 +02:00
Tom Hvitved
f72af4f1f3 Rust: Use Callable to define CfgScope 2024-10-21 15:22:04 +02:00
Tom Hvitved
c4c936d6fa Rust: Speedup SummaryStats.ql 2024-10-21 15:21:13 +02:00
Tom Hvitved
e9adbf231f Merge pull request #17816 from hvitved/rust/expr-trees-module
Rust: Move all expression CFG trees inside an `ExprTrees` module
2024-10-21 15:12:51 +02:00
Tom Hvitved
d2623cf4c3 Merge pull request #17814 from hvitved/rust/fix-bad-join
Rust: Fix bad join
2024-10-21 15:01:31 +02:00
Tom Hvitved
a6a68ef8be Apply suggestions from code review
Co-authored-by: Simon Friis Vindum <paldepind@github.com>
2024-10-21 14:43:22 +02:00
Tom Hvitved
1f5e02f539 Rust: Move all expression CFG trees inside an ExprTrees module 2024-10-21 13:41:11 +02:00
Simon Friis Vindum
85e59c9920 Merge branch 'main' into rust-saa-additions 2024-10-21 13:30:02 +02:00
Cornelius Riemenschneider
ce53964edf Merge pull request #17812 from github/redsun82/rust-move-integration-tests
Rust: move integration tests to where other languages have them
2024-10-21 11:41:16 +02:00
Tom Hvitved
7e82595cae Rust: Fix bad join
Before
```
Evaluated relational algebra for predicate MatchExprImpl::Impl::MatchExpr.getLastArm/0#dispred#24e5f4cf@9cf607tl with tuple counts:
            660677  ~0%    {4} r1 = SCAN `MatchExprImpl::Impl::MatchExpr.getArm/1#dispred#817de8a3` OUTPUT _, In.0, In.2, In.1
            660677  ~0%    {3}    | REWRITE WITH Tmp.0 := 1, Out.0 := (Tmp.0 + In.3) KEEPING 3
        5342095756  ~0%    {3}    | JOIN WITH `MatchArmList::Generated::MatchArmList.getNumberOfArms/0#dispred#9ad72f08_10#join_rhs` ON FIRST 1 OUTPUT Lhs.1, Rhs.1, Lhs.2
             96597  ~3%    {2}    | JOIN WITH `MatchExpr::Generated::MatchExpr.getMatchArmList/0#dispred#11f1a73e` ON FIRST 2 OUTPUT Lhs.0, Lhs.2
                           return r1
```

After
```
Evaluated relational algebra for predicate MatchExprImpl::Impl::MatchExpr.getLastArm/0#dispred#24e5f4cf@9d7a92pu with tuple counts:
        660677   ~0%    {5} r1 = JOIN `MatchExprImpl::Impl::MatchExpr.getArm/1#344daffc` WITH `MatchExprImpl::Impl::MatchExpr.getNumberOfArms/0#ab0d8732` ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Lhs.2, _, Rhs.1
                        {4}    | REWRITE WITH Tmp.3 := 1, Out.3 := (In.4 - Tmp.3), TEST Out.3 = InOut.1 KEEPING 4
         96597   ~3%    {2}    | SCAN OUTPUT In.0, In.2
                        return r1
```
2024-10-21 11:40:13 +02:00
Simon Friis Vindum
a1ebf98552 Merge branch 'main' into rust-cfg-fixes 2024-10-21 10:12:07 +02:00
Simon Friis Vindum
3ae04752c4 Rust: Accept less CFG inconsistencies 2024-10-21 10:07:11 +02:00
Simon Friis Vindum
9c172f62a4 Rust: Fix dead end in CFG for match expressions with no arms 2024-10-21 09:59:23 +02:00
Paolo Tranquilli
7b870d30a4 Rust: move integration tests to where other languages have them 2024-10-21 09:29:37 +02:00
Simon Friis Vindum
381f061e7f Rust: Add CFG test for match with no arms 2024-10-21 09:29:28 +02:00
Arthur Baars
4a5a48a5b6 Rust: move PrintCfg to ide-contextual-queries 2024-10-18 16:11:18 +02:00
Arthur Baars
c9372b91f8 Rust: move ide-contextual-queries to the library pack 2024-10-18 16:11:17 +02:00
Arthur Baars
53744407ad Rust: add localDefinitions.ql 2024-10-18 16:11:08 +02:00
Simon Friis Vindum
4ddc7a4592 Rust: Update unused value expected results 2024-10-18 15:49:52 +02:00
Simon Friis Vindum
b665f45ffa Merge branch 'main' into unreachable2 2024-10-18 15:13:40 +02:00
Simon Friis Vindum
b1e85d1ad8 Rust: Refactor BreakExprTree to use StandardPostOrderTree 2024-10-18 13:30:36 +02:00
Simon Friis Vindum
28f111b7c0 Rust: Remove erroneous CFG edge from return to break 2024-10-18 13:26:11 +02:00
Simon Friis Vindum
4ca6b0eceb Rust: Add a CFG test for a return within a break 2024-10-18 13:22:39 +02:00
Simon Friis Vindum
6568eb80a2 Rust: Refactor CFG pattern tree implementation 2024-10-18 12:52:56 +02:00