Commit Graph

36 Commits

Author SHA1 Message Date
Paolo Tranquilli
814218c7a8 Swift: extract variables as children of ForEachStmt 2024-11-28 11:03:46 +01:00
Geoffrey White
83860acdde Swift: Test BuiltinLiteralExpr. 2024-06-10 18:20:25 +01:00
Alex Denisov
bbde709b3f Swift: upgrade to 5.9.1 2023-11-07 13:40:28 +01:00
Alex Denisov
4133284bc8 Swift: skip declarations marked as unavailable 2023-10-11 10:55:49 +02:00
Alex Denisov
743fd902a1 Swift: fix CFG for identity expressions (await, dot_self, parent) 2023-09-12 16:04:45 +02:00
Robert Marsh
7ed520ab54 Swift: update test expectations after hiding InOutExpr 2023-07-28 14:29:24 +00:00
Nora Dimitrijević
8ccbad601b Swift: PrintAst test changes 2023-06-06 16:54:47 +02:00
Paolo Tranquilli
63fb0581c2 Swift: accept inconsistencies for now 2023-05-24 20:09:46 +02:00
Nora Dimitrijević
91a151ec2a Swift: update tests 2023-04-26 15:47:20 +02:00
Geoffrey White
c29dcefcf2 Swift: Fix .expected file. Locations had changed after the formatting fix. 2023-03-03 17:24:07 +00:00
Geoffrey White
b2bcb2d378 Swift: Fix formatting. 2023-03-03 16:32:21 +00:00
Geoffrey White
27ec36298f Swift: Understand binary pointwise operations. 2023-03-02 12:42:34 +00:00
Geoffrey White
ec2c58b416 Swift: Understand overflow binary bitwise operations. 2023-03-02 12:11:25 +00:00
Geoffrey White
1206b73d87 Swift: Understand overflow binary arithmetic operations. 2023-03-02 12:11:15 +00:00
Geoffrey White
c42add2191 Swift: Add test cases for overflow and pointwise binary arithmetic operations. 2023-03-02 11:28:59 +00:00
Geoffrey White
8ef6521cc9 Swift: Undo toString changes. 2023-02-27 12:01:02 +00:00
Geoffrey White
e71c7e7842 Swift: Autoformat. 2023-02-24 19:09:14 +00:00
Geoffrey White
a222757e69 Swift: Add support for pointwise assignment operators. 2023-02-23 16:25:32 +00:00
Geoffrey White
15e3892b03 Swift: Add support for overflow assignment operators. 2023-02-23 16:25:32 +00:00
Geoffrey White
1d4925d7af Swift: Expand assignment operations. 2023-02-23 16:25:31 +00:00
Geoffrey White
71813fa0a7 Swift: Implement full tree of Assignment classes 2023-02-23 13:23:36 +00:00
Geoffrey White
aaa89f7f32 Swift: Add a test for assignment exprs. 2023-02-23 13:15:06 +00:00
Geoffrey White
3038543242 Swift: Add UnaryPlusExpr. 2023-02-20 17:15:20 +00:00
Nora Dimitrijević
d230431006 Swift: extract closure captures (codegen'd part) 2023-02-02 11:35:49 +01:00
Nora Dimitrijević
f3ebb6e03b Swift: MethodLookupExpr.getMethodRef() [codegen'd]
This refactors SelfApplyExpr.getFunction() as MethodLookupExpr().getMethodRef().

This is simpler, because we are not hiding DeclRefExprs or reinventing hidden AST resolution.
2022-12-20 23:09:02 -05:00
Nora Dimitrijević
ea6c69dd34 Swift: fix test with different linux/macos results
`methodlookup.swift` has one more call to `Builtin.zeroInitializer()`
in macOS than it does in Linux.
2022-12-15 11:48:43 -05:00
Nora Dimitrijević
7ea0eada11 Swift: add missing Builtin symbols 2022-12-14 20:03:41 -05:00
Nora Dimitrijević
95d4c304da Swift: Fix .expected tests
Only UnsafeJsEval remains.
2022-12-14 15:02:15 -05:00
Nora Dimitrijević
16a119248d Swift: remove toString() = "call to call to ..." 2022-12-14 14:28:00 -05:00
Nora Dimitrijević
6a0b020573 Swift: move methodlookup test to library-tests 2022-12-14 14:28:00 -05:00
Tony Torralba
4411852e59 Add BitwiseOperation.qll 2022-11-08 11:33:10 +01:00
Paolo Tranquilli
9b50336e47 Swift: synthesize MethodRefExpr
This introduces a `MethodRefExpr` node synthesized out of
`DotSyntaxCallExpr` under the `LookupExpr` hierarchy. This means that
much like
```free_function(1, 2)```
is a `CallExpr` with `getFunction` giving a `DeclRefExpr`,
```foo.method(1, 2)```
is now a `CallExpr` with `getFunction` giving a `MethodRefExpr`.

`ApplyExpr::getStaticTarget` has been made work with it (as well as
`ConstructorRefCallExpr` which for the moment has been left where it
is), a new `MethodApplyExpr` has been introduced deriving from it,
and control and data flow libraries have adapted.

A small but was fixed in `qlgen` where the default constructor for DB
types was not correctly subtracting derived IPA types depending on the
order of definitions in `schema.yml`.

There are still some occurrences of `DotSyntaxCallExpr`, and as already
mentioned the other `SelfApply` class (`ConstructorRefCallExpr`) was
left alone. Their treatment is left for a future PR.
2022-08-19 14:48:36 +02:00
Geoffrey White
2cf65c7d35 Swift: Autoformat tests. 2022-06-29 11:49:21 +01:00
Geoffrey White
8a8a7ead9b Swift: Add tests for ArithmeticOperation.qll. 2022-06-28 15:34:23 +01:00
Geoffrey White
9e0cf62cda Swift: Fix + simplify LogicalOperation.qll. 2022-06-28 15:33:03 +01:00
Geoffrey White
63376da90f Swift: Add tests for LogicalOperaion.qll. 2022-06-28 15:04:47 +01:00