Commit Graph

5184 Commits

Author SHA1 Message Date
Ian Lynagh
90eccc634b Kotlin: Refactor locations
Amongst other tidyups, we now generate correct "unknown location"s
2022-05-10 18:45:56 +01:00
Ian Lynagh
5c06ffae69 Kotlin: Use a TrapWriter for the invocation TRAP
We'll probably want to shuffle some more stuff from FileTrapWriter to
TrapWriter, but for now at least we are using the generated TRAP-writing
functions rather than writing raw TRAP.
2022-05-10 18:45:56 +01:00
Ian Lynagh
651847d202 Java/Kotlin: Enhance 'compilations' support 2022-05-10 18:45:56 +01:00
Tamas Vajk
9e4614e574 Add gitignore 2022-05-10 18:45:56 +01:00
Ian Lynagh
059d6798bb Kotlin: Tweak the definition of "eqwuivalent TRAP file"
TRAP files that only differ in their comments are equivalent
2022-05-10 18:45:55 +01:00
Ian Lynagh
c3dd35d98b Kotlin: Put temporary TRAP files in the correct directory 2022-05-10 18:45:55 +01:00
Ian Lynagh
774616450b Kotlin: Don't give stack traces for fake labels
There might be a significant performance hit for it.
2022-05-10 18:45:55 +01:00
Ian Lynagh
9bd0391c04 Kotlin: Don't fail if a file already exists in the source archive 2022-05-10 18:45:55 +01:00
Ian Lynagh
19ff50d0a6 Kotlin: Add a comment to each TRAP file linking to its invocation TRAP file 2022-05-10 18:45:55 +01:00
Ian Lynagh
4bc326ef82 Kotlin: Fix extraction when 2 invocations produce the same TRAP file
The second invocation was failing with a "file already exists" error.

I've also added a checkTrapIdentical flag, which is enabled for now.
This means that if 2 invocations write the same TRAP file, we will awrn
if they are not identical. It may be that this produces false positives,
but we can look at that if it happens.
2022-05-10 18:45:55 +01:00
Ian Lynagh
3e8f9f52a6 Kotlin: Start using invocation TRAP files 2022-05-10 18:45:55 +01:00
Ian Lynagh
71c3a64ff5 Kotlin: Simplify location extraction 2022-05-10 18:45:55 +01:00
Ian Lynagh
330727678a Kotlin: Add some location information to a warning 2022-05-10 18:45:55 +01:00
Ian Lynagh
486cff5df1 Kotlin: Add support for interfaces 2022-05-10 18:45:55 +01:00
Ian Lynagh
14e970044a Kotlin: Add some flushes
This will make it easier to see where we are if we get crashes in the
future.
2022-05-10 18:45:55 +01:00
Ian Lynagh
dbc3f29426 Kotlin: Put diagnostics in a TRAP file
Currently we just put everything in as severe with no location.
2022-05-10 18:45:55 +01:00
Ian Lynagh
a40ebd2520 Kotlin: Add support for supertypes 2022-05-10 18:45:55 +01:00
Ian Lynagh
d10024e7e9 Kotlin: Don't make a *Kt class unless we need one 2022-05-10 18:45:54 +01:00
Chris Smowton
c6deabd6a3 Update path to Java dbscheme
This changed when the Java tree was restructured for packaging
2022-05-10 18:45:54 +01:00
Ian Lynagh
f29a45ea98 Kotlin: Add getAPrimaryQlClass.ql consistenty check 2022-05-10 18:45:54 +01:00
Ian Lynagh
4837e4e46a Kotlin: More top-level stuff 2022-05-10 18:45:54 +01:00
Ian Lynagh
f0e2de1fa9 Kotlin: Add file classes
Kotlin invents a class for each file that has a top-level
functionp/property, so that Java can use them.
2022-05-10 18:45:54 +01:00
Ian Lynagh
ed2c6e68ea Kotlin: Function calls 2022-05-10 18:45:54 +01:00
Ian Lynagh
94eefbff17 Kotlin: Add IrContainerExpression 2022-05-10 18:45:54 +01:00
Ian Lynagh
e7cabfb965 Kotlin: Add assign exprs 2022-05-10 18:45:54 +01:00
Ian Lynagh
a64fedf764 Kotlin: When expressions 2022-05-10 18:45:54 +01:00
Ian Lynagh
bbb9d013e0 Kotlin: Escape TRAP strings 2022-05-10 18:45:54 +01:00
Ian Lynagh
f85cf27df8 Kotlin: Better logging infrastructure 2022-05-10 18:45:54 +01:00
Ian Lynagh
4ae7d19235 Kotlin: More expressions 2022-05-10 18:45:54 +01:00
Ian Lynagh
bb89b25e91 Kotlin: More expressions 2022-05-10 18:45:54 +01:00
Ian Lynagh
1de12e72d4 Kotlin: More expressions 2022-05-10 18:45:53 +01:00
Ian Lynagh
90161b9e9d Kotlin: Add more expressions 2022-05-10 18:45:53 +01:00
Ian Lynagh
492dc3dfb3 Kotlin: More tests (of unhandled expressions) 2022-05-10 18:45:53 +01:00
Ian Lynagh
b4bc40630f Kotlin: More expressions 2022-05-10 18:45:53 +01:00
Ian Lynagh
14a46b08b5 Kotlin: Variable accesses 2022-05-10 18:45:53 +01:00
Ian Lynagh
4c8ff16552 Kotlin: Fixes 2022-05-10 18:45:53 +01:00
Ian Lynagh
3daec4376f Kotlin: Variable initialisers 2022-05-10 18:45:53 +01:00
Ian Lynagh
f5e2826b9f Kotlin: Accept test changes 2022-05-10 18:45:53 +01:00
Ian Lynagh
4ba13d3663 Kotlin: Extract parameters 2022-05-10 18:45:53 +01:00
Ian Lynagh
799cf64fd2 Kotlin: Local variables 2022-05-10 18:45:53 +01:00
Ian Lynagh
46add88bb5 Kotlin: Add more types 2022-05-10 18:45:53 +01:00
Ian Lynagh
1c39f001e5 Kotlin: Add variables test 2022-05-10 18:45:53 +01:00
Ian Lynagh
b91660a0f0 Kotlin: Extract properties 2022-05-10 18:45:53 +01:00
Ian Lynagh
97722faee9 Kotlin: Add do/while loops 2022-05-10 18:45:52 +01:00
Ian Lynagh
0c429e4f80 Kotlin: Add blocks 2022-05-10 18:45:52 +01:00
Ian Lynagh
a8a6b4c09f Kotlin: Move some expressions to the right place 2022-05-10 18:45:52 +01:00
Ian Lynagh
b25ea03211 Kotlin: Add while statements 2022-05-10 18:45:52 +01:00
Ian Lynagh
00cff5593f Kotlin: Fix the tests
The handling of Unit is very kludgy at the moment. Will need rethinking.
2022-05-10 18:45:52 +01:00
Ian Lynagh
f0903726bf Kotlin: Add some if-stmt support 2022-05-10 18:45:52 +01:00
Ian Lynagh
d48739cc92 Kotlin: Check a call actually is an addition 2022-05-10 18:45:52 +01:00