AndreiDiaconu1
1e4b3fafb6
Updated expected for crement ops
2019-08-28 12:25:13 +01:00
AndreiDiaconu1
940ba694d2
Arithmetic increment and decrement expressions
...
Correct code is now produced for increment and decrement expressions
Modified producesExprResult() and TTranslatedLoad() so that no loads are done from outside the crement exprs and that the VariableAddress generated from the access of the operator variable is recognized as an expr that produces result.
2019-08-28 12:25:13 +01:00
AndreiDiaconu1
3bc6456572
Work on throw statements, bug fixes, small refactor.
...
Throw statements now give correct code, apart from the case of rethrows: need to make explicit the fact that a finally block is executed even if stack unwinding happens.
Added 2 new classes to TranslatedStmt.qll, one for throws that have an exception, one for rethrows.
Fixed a bug in TranslatedDeclarationEntry.qll where some local declaration would be missed.
Changed toString into getQualifiedName for more clarity when generating the instructions in Instruction.qll.
Some general refactoring in TranslatedExpr.qll and TranslatedStmt.qll.
2019-08-28 12:25:13 +01:00
AndreiDiaconu1
b90bc96cb5
Objects tests and fix in PrintIR
...
Added tests to showcase the instructions generated for object creation and object initialization
Updated raw_ir.expected
PrintIR now uses the qualified name (with types) when printing the IR for more clarity
2019-08-28 12:25:13 +01:00
Andrei Diaconu
8661074fc3
Object creation and initialization + refactoring
...
Correct code is now generated from ObjectCreation exprs and ObjectInitializer exprs.
Removed TranslatedFieldInitialization and its subclasses and further refactored TranslatedInitialization
2019-08-28 12:25:13 +01:00
Andrei Diaconu
dae37e5472
Fixed bugs, updated tests
...
Fixed a bug in TranslatedExpr: decl + init where the rhs is a reference now work as expected
Uncommented the code for the switch statement
2019-08-28 12:25:13 +01:00
Andrei Diaconu
be01b031b0
Fixed and refactored code for arrays
...
Introduced 2 new tags to support multidimensional arrays
Multidimensional arrays produce correct code
All types of initializations for arrays work correctly
2019-08-28 12:25:13 +01:00
Andrei Diaconu
35b028e626
Initial work for objects and statements
...
Objects now work, although I will refactor the code quite a bit for clarity
If and while statements now produce good code
Began work on try statements
2019-08-28 12:25:13 +01:00
Andrei Diaconu
4462babc0b
Added support for switch stmt (CS 6.0 style)
2019-08-28 12:25:13 +01:00
AndreiDiaconu1
de6f547088
Synced more files
2019-08-28 12:25:13 +01:00
AndreiDiaconu1
49777636aa
Applied the review comments
2019-08-28 12:25:13 +01:00
AndreiDiaconu1
ffb22bfff8
Locatable -> Language::AST
2019-08-28 12:25:13 +01:00
Andrei Diaconu
9105641741
Update csharp/ql/src/semmle/code/csharp/ir/IRSanity.ql
...
Co-Authored-By: Dave Bartolomeo <42150477+dave-bartolomeo@users.noreply.github.com >
2019-08-28 12:25:13 +01:00
Andrei Diaconu
81d8905a0f
Update csharp/ql/src/semmle/code/csharp/ir/PrintIR.ql
...
Co-Authored-By: Dave Bartolomeo <42150477+dave-bartolomeo@users.noreply.github.com >
2019-08-28 12:25:13 +01:00
Andrei Diaconu
ce06bd8af3
Update csharp/ql/src/semmle/code/csharp/ir/implementation/raw/IRSanity.ql
...
Co-Authored-By: Dave Bartolomeo <42150477+dave-bartolomeo@users.noreply.github.com >
2019-08-28 12:25:13 +01:00
Andrei Diaconu
d8f8b47605
Update csharp/ql/src/semmle/code/csharp/ir/implementation/raw/PrintIR.ql
...
Co-Authored-By: Dave Bartolomeo <42150477+dave-bartolomeo@users.noreply.github.com >
2019-08-28 12:25:13 +01:00
Dave Bartolomeo
073812b6f1
Rename Cpp -> CSharp
2019-08-28 12:25:13 +01:00
Dave Bartolomeo
609ca034c0
C#/C++: Share IR implementation
2019-08-28 12:25:13 +01:00
Andrei Diaconu
50ba4d1fda
Deleted folder
2019-08-28 12:25:13 +01:00
Andrei Diaconu
45455a12d6
Fixed function calls
...
Function calls now produce correct code.
Added 2 test cases to showcase this.
2019-08-28 12:25:13 +01:00
Andrei Diaconu
26bf7e116d
Arrays fixed, simple variable initialization fixed.
...
Correct code is now generated for array initialization and element access.
Created a new binary Opcode, `IndexedElementAddress`, used to get the address of an array element, similar to how CIL does it.
Fixed simple variable initialization.
2019-08-28 12:25:13 +01:00
Andrei Diaconu
2a41e7b5c0
Fixed issues mentioned in the PR comments
...
Modified _.getCallable() to _.getFunction()
Deleted both *ssa folders from ir/implementation
Deleted the ValueCategory.qll file
2019-08-28 12:25:13 +01:00
Andrei Diaconu
aea0356994
Fixed var addressing and other changes
...
Now variables addressing correctly gets translated
Added a new test case to showcase this
Changed VoidType to ObjectType for the type of the 2 instructions
generated by as the prelude of a translated function
(UnmodeledDefinition and AliasedDefinition)
2019-08-28 12:25:13 +01:00
Andrei Diaconu
7ef9bf6eea
Fixed whitespace errors in PR
2019-08-28 12:25:13 +01:00
Andrei Diaconu
025d68f07a
General tidy up and refactor
...
Refactored the C++ specific names
Tidied the code
Updated TODOs
2019-08-28 12:25:13 +01:00
Andrei Diaconu
c733bc0ae9
Functional basic porting
...
Ported basic functionalities from the C++ IR
Added a simple test that passes the IR sanity check and produces
sensible IR (together with the .expected files) to the C# test folder
2019-08-28 12:25:13 +01:00
Andrei Diaconu
fc69c1201d
Initial copy of C++ IR with some modifications
2019-08-28 12:25:13 +01:00
Jonas Jensen
2c253f360a
C++: Support x-macros that are #undef'ed in header
...
This fixes a false positive on https://github.com/zduka/tpp .
2019-08-28 13:03:16 +02:00
Jonas Jensen
e7dfb3e61b
C++: Test for x-macro FP observed in the wild
2019-08-28 13:03:09 +02:00
Mark Shannon
1c8ce418d9
Python: Add test to confirm #1212 is fixed.
2019-08-28 12:01:04 +01:00
Max Schaefer
78ce290de3
JavaScript: Fix DomMethodCallExpr.interpretsArgumentsAsHTML.
2019-08-28 11:22:03 +01:00
Jonas Jensen
8c610e4f68
C++: Don't use deprecated interface in test
2019-08-28 08:31:05 +02:00
Jonas Jensen
b98d6379e9
C++: Restore and deprecate getPosInBasicBlock
...
This predicte was still used in a test, so it might be used in external
code too.
2019-08-28 08:29:06 +02:00
Pavel Avgustinov
1bd0c69f0e
Merge pull request #1831 from jbj/existsCompleteWithName-perf
...
C++: Performance fix for existsCompleteWithName
v1.22.0
2019-08-27 16:30:40 +01:00
Jonas Jensen
3700a631a6
C++: Performance fix for existsCompleteWithName
2019-08-27 16:28:57 +02:00
Mark Shannon
dafed6b93e
Python docs: remove confusing reference to SSA as 'dataflow' and add a reference to the taint-tracking library from the library overview page.
2019-08-27 14:45:33 +01:00
Nick Rolfe
45a3dcd770
Merge pull request #1829 from jf205/update-cpp-lang-support
...
docs: mention clang-ci support
2019-08-27 14:45:18 +01:00
Mark Shannon
562f4ef604
Python docs: Remove all references to ClassExpr and FunctionExpr; we want to remove them eventually.
2019-08-27 14:20:08 +01:00
Mark Shannon
6edf9efe1b
Python docs: Replace remaining references to old 'Object' API are replaced by new 'Value' API.
2019-08-27 14:15:27 +01:00
james
be5b5e1617
docs: clang-ci support
2019-08-27 14:04:05 +01:00
Luke Cartey
8d33f31b0d
Merge pull request #1725 from jf205/add-rst-slide/sd-3717
...
docs: add rst files for C/C++ training and a few styling improvements
2019-08-27 11:43:44 +01:00
Pavel Avgustinov
b3081154fa
Merge pull request #1823 from markshannon/python-dont-prune-in-ql
...
Python: removing pruning in QL.
2019-08-27 11:32:23 +01:00
Jonas Jensen
4cae5917cb
C++: Remove one nomagic and explain the other
2019-08-26 21:48:18 +02:00
Jonas Jensen
2332dada1a
C++: s/pos/index/ in SubBasicBlocks
2019-08-26 21:35:58 +02:00
Jonas Jensen
92c354e8e8
C++: Simplify SubBasicBlock::getNumberOfNodes
2019-08-26 21:11:42 +02:00
jf205
baeb1d549e
Merge pull request #1826 from felicity-semmle/ql-support/updates
...
QL docs: Update global variables
2019-08-26 15:21:57 +01:00
Jonas Jensen
2b94bb9eda
C++: Use the word "rank" to denote a rank
...
Previously, the word "position" was used ambiguously in this library.
2019-08-26 16:13:08 +02:00
Jonas Jensen
17ee3f555c
C++: Sync the two copies of SubBasicBlocks.qll
...
These files are now added to `identical-files.json` so they will remain
in sync.
2019-08-26 16:01:36 +02:00
semmle-qlci
f123916f53
Merge pull request #1825 from asger-semmle/js-change-notes
...
Approved by xiemaisi
2019-08-26 14:00:32 +01:00
Esben Sparre Andreasen
43ede52e29
Merge pull request #1670 from sjvs/patch-2
...
Remove reference to internal emacs tooling from public repository
2019-08-26 14:54:07 +02:00