Commit Graph

84 Commits

Author SHA1 Message Date
Tom Hvitved
249e431e87 C#: Adjust CFG for {Recursive,Positional,Property}PatternExpr 2021-02-01 13:52:18 +01:00
Tamas Vajk
a9c51e7300 Fix missing pattern matching completions 2021-01-29 15:16:30 +01:00
Tamas Vajk
e24e5b13f5 C#: Improve CFG to handle 'and' and 'or' patterns 2021-01-27 11:52:59 +01:00
Tom Hvitved
39977e9a43 Merge pull request #4724 from hvitved/csharp/cfg/not-pattern
C#: Implement CFG for `not` patterns
2021-01-27 10:12:31 +01:00
Tom Hvitved
cd8155c201 C#: Teach CFG about ExceptionDispatchInfo::Throw 2021-01-26 09:16:53 +01:00
Tom Hvitved
07a96c3596 C#: Add CFG tests for ExceptionDispatchInfo::Throw 2021-01-26 09:01:06 +01:00
Tom Hvitved
e0c7f32282 C#: Add relational pattern CFG test 2021-01-25 13:52:17 +01:00
Tom Hvitved
063733ad52 C#: Implement CFG for not patterns 2021-01-25 13:52:17 +01:00
Tom Hvitved
0080357153 C#: Add unary pattern CFG tests 2021-01-25 13:52:17 +01:00
Tamas Vajk
05c858ec2c C#: Fix expanded assignment lookup in finally blocks for CFG 2021-01-14 08:54:10 +01:00
Tamas Vajk
5803a449be Add test case for assign operation in finally 2021-01-14 08:39:46 +01:00
Tamas Vajk
056dbe31d5 C#: Remove throw completion from StringLiteral 2021-01-08 08:14:08 +01:00
Tom Hvitved
3531dde032 C#: Simplify FinallySplit::toString() 2020-12-05 20:16:11 +01:00
Tom Hvitved
9afce31e92 C#: Add one more CFG test for nested finally blocks 2020-12-04 13:26:00 +01:00
Tom Hvitved
d4ee8cdd18 C#: Always create basic blocks for nodes with a conditional predecessor 2020-11-27 15:08:33 +01:00
Tom Hvitved
f3abaa406c C#: Refactor CFG implementation 2020-11-23 11:38:24 +01:00
Tom Hvitved
94deed39a2 C#: Represent all expressions in post-order in the CFG 2020-11-12 20:04:48 +01:00
Tom Hvitved
6723e5b31c C#: Restrict post-dominance to normal execution 2020-10-30 09:14:12 +01:00
Tom Hvitved
ade8ff9593 C#: Add more CFG tests 2020-10-30 09:14:12 +01:00
Tom Hvitved
51f71d4e1d C#: Fix CFG for assertions with multiple assertion arguments 2020-10-29 15:44:13 +01:00
Tom Hvitved
5cd707f17e C#: Add CFG test for assertion with multiple assertion arguments 2020-10-29 15:44:13 +01:00
Tom Hvitved
ca4e5014ae C#: Include compiler-generated array lengths in the CFG 2020-10-08 10:35:50 +02:00
Tom Hvitved
ce8567c64a Merge pull request #4293 from hvitved/csharp/cfg/assertions
C#: Model assertions in the CFG
2020-10-08 10:32:13 +02:00
Tom Hvitved
9c503c1591 C#: Add more data/control-flow tests 2020-10-07 17:10:01 +02:00
Tom Hvitved
f1d6f7cd0c C#: Model assertions in the CFG 2020-10-02 17:56:41 +02:00
Tom Hvitved
17f0ac4b20 C#: Add more CFG assertion tests 2020-10-02 15:35:33 +02:00
Tamas Vajk
48bf6d55aa C#: Add implicit cast from array to pointer 2020-09-23 17:21:38 +02:00
Tom Hvitved
6c716331d9 C#: Skip foreach loop bodies in the CFG when the iteration expression is empty 2020-09-07 15:26:28 +02:00
Tom Hvitved
9e240b7397 C#: Add more CFG loop unrolling tests 2020-09-07 15:26:25 +02:00
Tom Hvitved
c7f776984f C#: Add CFG tests for callables with multiple implementations 2020-09-02 10:52:05 +02:00
Tom Hvitved
527a099a26 C#: Fix CFG for conditional method calls with out parameters 2020-07-02 13:12:53 +02:00
Tom Hvitved
090205d9e9 C#: Add CFG test for conditional call to method with out parameter 2020-07-02 13:09:40 +02:00
Tom Hvitved
7a54a90e61 C#: Fix CFG for C# 6 initializers 2020-05-20 12:01:22 +02:00
Tom Hvitved
36e29e0f75 C#: Add CFG tests for C# 6 initializers 2020-05-20 09:33:51 +02:00
Tom Hvitved
bd075a7de0 C#: Add CFG test 2020-04-23 08:45:11 +02:00
Calum Grant
d696235668 C#: Updated CFG for switch statements - note that the last() predicate is incorrect. 2019-09-20 14:22:31 +01:00
Calum Grant
81110dca0a C#: Add new test for switch statements. 2019-09-20 14:22:31 +01:00
Tom Hvitved
5070270605 C#: Fix CFG for nested finally blocks 2019-09-12 11:44:04 +02:00
Tom Hvitved
b9fa837963 C#: Add new CFG test for try/finally 2019-09-12 11:44:04 +02:00
Tom Hvitved
3d32f3d173 C#: Restructure existing CFG tests for try/finally 2019-09-12 11:44:04 +02:00
Tom Hvitved
170621d1cc C#: Address review comments 2019-09-09 13:38:23 +02:00
Tom Hvitved
1e7ee8ddad C#: Loop unrolling for foreach statements 2019-09-01 10:34:51 +02:00
Tom Hvitved
1bfef706e2 C#: Add loop unrolling tests 2019-09-01 10:34:51 +02:00
Calum Grant
83ab044a73 C#: Update expected test output. 2019-08-29 18:12:58 +01:00
Tom Hvitved
d2f8b0bc20 C#: Handle constructors with member initializers and base() calls in CFG 2019-08-22 10:34:23 +02:00
Tom Hvitved
5d140930d0 C#: Add field initializers to CFG for constructors
This commit adds field initializers to the CFG for non-static constructors. For
example, in

```
class C
{
    int Field1 = 0;
    int Field2 = Field1 + 1;
    int Field3;

    public C()
    {
        Field3 = 2;
    }

    public C(int i)
    {
        Field3 = 3;
    }
}
```

the initializer expressions `Field1 = 0` and `Field2 = Field1 + 1` are added
to the two constructors, mimicking

```
public C()
{
    Field1 = 0;
    Field2 = Field1 + 1;
    Field3 = 2;
}
```

and

```
public C()
{
    Field1 = 0;
    Field2 = Field1 + 1;
    Field3 = 3;
}
```

respectively. This means that we no longer have to synthesize calls, callables,
parameters, and arguments in the data flow library, so much of the work from
d1755500e4 can be simplified.
2019-08-21 16:21:38 +02:00
Tom Hvitved
eb97d7beaa Revert "C#: Generalize CFG entry/exit nodes to include field/property initializers"
This reverts commit b7e732fddb.
2019-08-21 09:55:24 +02:00
Tom Hvitved
b7e732fddb C#: Generalize CFG entry/exit nodes to include field/property initializers 2019-08-16 13:06:51 +02:00
Tom Hvitved
495e5bc628 C#: Extract assignments for field/property initializers 2019-08-15 16:18:23 +02:00
Tom Hvitved
8a35813e1c C#: Unify goto completions 2019-07-05 07:21:34 +02:00