Commit Graph

337 Commits

Author SHA1 Message Date
Arthur Baars
c35283cefb Merge pull request #77 from github/aibaars/global-variables
Add global variables
2020-12-21 12:15:31 +01:00
Arthur Baars
f0ddeaa9f2 Merge pull request #81 from github/aibaars/revert-dup-code
Update ruby.dbscheme.stats
2020-12-21 12:15:10 +01:00
Arthur Baars
ad1782b620 Address comments 2020-12-21 11:01:46 +01:00
Arthur Baars
8469bd3688 Uncomment getAPrimaryQlClass() 2020-12-21 11:01:46 +01:00
Arthur Baars
dc0de9132e Add GlobalVariable 2020-12-21 11:01:46 +01:00
Arthur Baars
1ada9feda7 Make VariableAccess "abstract" 2020-12-21 11:01:46 +01:00
Arthur Baars
ebacec41d5 Update ruby.dbscheme.stats 2020-12-21 10:58:25 +01:00
Nick Rolfe
b1b2815c26 Merge pull request #80 from github/aibaars/revert-dup-code
Updates after CodeQL upgrade to 2.4.1
2020-12-21 09:57:59 +00:00
Arthur Baars
d4874641a3 Revert "Add duplicate code tables to dbscheme"
This reverts commit 4c699fcb32.
2020-12-21 10:45:59 +01:00
Arthur Baars
bf232f0582 Update formatting for CodeQL 2.4.1 2020-12-21 10:45:59 +01:00
Arthur Baars
ff8ea6d44f Merge pull request #79 from github/test_checks
Add all the TRAP check flags in qltest workflow
2020-12-21 10:20:47 +01:00
Nick Rolfe
5a54026bcc Add all the TRAP check flags in qltest workflow 2020-12-18 17:25:28 +00:00
Arthur Baars
dddf0a66d9 Merge pull request #78 from github/typo
fix typo in comment
2020-12-18 13:50:58 +01:00
Nick Rolfe
72319b538f fix typo in comment 2020-12-18 12:47:31 +00:00
Arthur Baars
8f1c916242 Merge pull request #66 from github/aibaars/cfg-2
CFG: make all simple nodes instance of StandardLeftToRight{Pre,Post}Tree
2020-12-18 13:26:05 +01:00
Nick Rolfe
c4ca537574 Merge pull request #75 from github/stmts_exprs
Add AST classes and tests for operations
2020-12-18 10:40:27 +00:00
Nick Rolfe
6c828214f7 Make import private 2020-12-18 10:23:19 +00:00
Nick Rolfe
53fbfc369d Make params test pass for now
- some toString improvements
- comment out getAPrimaryQlClass predicates that cause the test to fail
2020-12-18 10:13:13 +00:00
Nick Rolfe
4718de08b2 Address review feedback 2020-12-18 10:08:45 +00:00
Nick Rolfe
a87fe410af Simplify examples for unary plus/minus 2020-12-17 18:35:01 +00:00
Nick Rolfe
8b7af665b4 Simplify imports 2020-12-17 18:33:49 +00:00
Tom Hvitved
6893f57978 Merge pull request #74 from github/hvitved/cfg/fix-join-order
CFG: Fix bad join-order
2020-12-17 16:58:23 +01:00
Tom Hvitved
07c464b753 CFG: Fix bad join-order
Before:
```
[2020-12-17 11:33:46] (211s) Tuple counts for ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::nestedEnsure_dispred#ff/2@2ea588:
                      11409019   ~0%     {2} r1 = SCAN ControlFlowGraphImpl::getScope#ff AS I OUTPUT I.<1>, I.<0> 'this'
                      3714296409 ~0%     {3} r2 = JOIN r1 WITH ControlFlowGraphImpl::Trees::getAChildInScope#fff_102#join_rhs AS R ON FIRST 1 OUTPUT r1.<1> 'this', R.<1>, R.<2>
                      2359       ~0%     {2} r3 = JOIN r2 WITH ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::getAnEnsureDescendant#ff AS R ON FIRST 2 OUTPUT r2.<2>, r2.<0> 'this'
                      1          ~0%     {2} r4 = JOIN r3 WITH ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::getEnsure_dispred#ff_10#join_rhs AS R ON FIRST 1 OUTPUT r3.<1> 'this', R.<1> 'innerBlock'
                                         return r4
```

After:
```
[2020-12-17 15:20:37] (51s) Tuple counts for ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::nestedEnsure_dispred#ff/2@c4f57d:
                      635      ~1%     {3} r1 = JOIN ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::getEnsure_dispred#ff_10#join_rhs AS L WITH ControlFlowGraphImpl::Trees::getAChildInScope#fff_201#join_rhs AS R ON FIRST 1 OUTPUT R.<1>, L.<1> 'innerBlock', R.<2>
                      1        ~0%     {3} r2 = JOIN r1 WITH ControlFlowGraphImpl::Trees::RescueEnsureBlockTree::getAnEnsureDescendant#ff_10#join_rhs AS R ON FIRST 1 OUTPUT R.<1> 'this', r1.<2>, r1.<1> 'innerBlock'
                      1        ~0%     {2} r3 = JOIN r2 WITH ControlFlowGraphImpl::getScope#ff AS R ON FIRST 2 OUTPUT r2.<0> 'this', r2.<2> 'innerBlock'
                                       return r3
```
2020-12-17 16:46:03 +01:00
Arthur Baars
ff751b97d2 CFG: make all simple nodes instance of StandardLeftToRight{Pre,Post}Tree 2020-12-17 16:39:54 +01:00
Arthur Baars
a15a066414 Merge pull request #72 from github/aibaars/fix-cfg
CFG improvements
2020-12-17 16:39:19 +01:00
Arthur Baars
b676c95218 Address comments 2020-12-17 16:35:51 +01:00
Nick Rolfe
73798312b9 Add classes and tests for operations 2020-12-17 15:16:37 +00:00
Tom Hvitved
46fc17da58 CFG: Fix multiple abnormal successors 2020-12-17 11:15:17 +01:00
Tom Hvitved
1033b8610a CFG: Add more tests 2020-12-17 11:14:10 +01:00
Arthur Baars
91ae237434 Use latest CodeQL for CI 2020-12-17 11:04:57 +01:00
Arthur Baars
dd954ea943 CFG: correct flow for lambda bodies
Lambda bodies are parsed as nested do-blocks or normal blocks.
This is actually incorrect, as the body of a lambda can't have
parameters. However, we can "inline" such blocks to get the
desired control flow.
2020-12-17 10:04:01 +01:00
Arthur Baars
eafec4331b CFG: add nodes for block arguments 2020-12-17 10:04:01 +01:00
Arthur Baars
d016e3cae0 CFG: methods are evaluated before their arguments 2020-12-17 10:04:01 +01:00
Arthur Baars
81c907a87a CFG: fix BEGIN and END blocks 2020-12-17 10:04:01 +01:00
Arthur Baars
f2fd1c7931 CFG: make def nodes visible 2020-12-17 10:04:01 +01:00
Arthur Baars
f2effce786 CFG: improve handling of block and lambda 2020-12-17 10:04:01 +01:00
Arthur Baars
30895e634c CFG: refactor CfgScope 2020-12-17 10:04:01 +01:00
Arthur Baars
bc47338b52 CFG: add test-case for conditional method declarations 2020-12-17 10:04:01 +01:00
Arthur Baars
69de81bdd5 CFG: have alternative flow for the definition and call of methods etc. 2020-12-17 10:04:01 +01:00
Arthur Baars
fd14770542 CFG: drop getObject from flow of singleton method 2020-12-17 09:59:30 +01:00
Arthur Baars
8501e30b6a CFG: fix linking heredoc start to heredoc body 2020-12-17 09:59:30 +01:00
Arthur Baars
edbd997f15 Merge pull request #71 from github/kinds
Create disjoint db types for different operators
2020-12-17 09:58:52 +01:00
Nick Rolfe
282d20d766 Remove redundant field on ChildNode struct 2020-12-16 20:57:06 +00:00
Nick Rolfe
a873cb9f3d Update dbscheme stats 2020-12-16 20:53:41 +00:00
Nick Rolfe
d1a9572b0e Merge remote-tracking branch 'origin/main' into kinds 2020-12-16 17:55:20 +00:00
Nick Rolfe
f5282edfc1 Simplifications based on PR feedback 2020-12-16 17:54:40 +00:00
Arthur Baars
381d6aafaa Merge pull request #73 from github/calls
Update tree-sitter-ruby to pick up improvements to calls
2020-12-16 14:00:53 +01:00
Nick Rolfe
0518d51b51 Update CFG: call receiers are evaluated before arguments 2020-12-16 12:40:57 +00:00
Nick Rolfe
e98a84c8b5 Update CFG to match changes to Call/MethodCall 2020-12-16 12:01:30 +00:00
Nick Rolfe
aa0c1491a6 Update tree-sitter-ruby to pick up improvements to calls 2020-12-16 10:13:45 +00:00