Commit Graph

  • 5b8b80cc72 Restore loop iterator - move assignment from the end of loop. David Srbecký 2008-01-27 23:13:37 +0000
  • af00ad101a Restore for loop condition. It is a simple pattern match. David Srbecký 2008-01-27 23:05:18 +0000
  • 075c5bebdb Remove empty 'else body' of 'if' statement. David Srbecký 2008-01-27 22:46:07 +0000
  • d086b446e8 Remove flowing redundant jumps at the end of Ast blocks: - Continue at the very end of loop - Empty Return at the very end of method - Goto at the very end of 'if' body, if the goto jumps right after the whole 'if' statement David Srbecký 2008-01-27 22:26:00 +0000
  • 6ebd05c0fe Simplify type names. For example replace "System.Console.WriteLine" with "Console.WriteLine" because we have a "using System;" statement. Replace "Int32" with "int", etc... David Srbecký 2008-01-27 18:30:36 +0000
  • 8643290a4c Remove redundant 'goto' statements in form: goto labelX; labelX: command(); David Srbecký 2008-01-27 17:38:35 +0000
  • ecad71d802 Added custom Ast classes for Goto and Label statements that track the reference count of a label. Added an Ast transform to remove dead labels. (first Ast transform in program, I expect many more to come. Some stuff should be rewritten to use these explicit transforms) David Srbecký 2008-01-27 15:43:40 +0000
  • 45bedc8d1d Try to reconstruct if statements. The following logic is used: Depending on the value of the condition, the control flow will branch to one of two locations - let's call then 'true entry' and 'false entry'. Nodes reachable *only* from the 'true entry' are assumed to be the 'true' body of the if statement. Similarly, nodes reachable only from the 'false entry' are the 'false' body. Nodes reachable from both 'true entry' and 'false entry' and not part of the if statement and are placed after it. David Srbecký 2008-01-27 14:39:14 +0000
  • 356c0b0d2f Completely rewritten the Node tree structure. It became increasingly difficult to maintain the node links (Predecessors, Successors) consistent during transformations. So rather then keeping them consistent I have implemented an algorithm that can calculate the Predecessors or Successors for any given node. There are a few caches on the way so that the calculation does not calculate everything again every time. Affected caches are automatically flushed when a tree structure changes. This is implemented using 'collection with events'. David Srbecký 2008-01-27 10:32:26 +0000
  • 7bf471eec3 Some set operations that will be need for 'if' simplification David Srbecký 2008-01-26 12:22:34 +0000
  • dda481d0fe Maintain node links at all levels, not just at the top one. David Srbecký 2008-01-26 11:44:09 +0000
  • ff56995219 Reduce some 'goto's in loops to 'break' and 'continue'. Do not output 'goto' for simple fall-through to next node. David Srbecký 2008-01-24 23:37:18 +0000
  • 7df6c364c6 Non-conditional branch does not have 'fall-through' node as successor. Add explicit 'goto' statement after each basic black. More GUI debugging options. David Srbecký 2008-01-24 21:28:49 +0000
  • b310187433 GUI debugging controls David Srbecký 2008-01-24 20:07:26 +0000
  • 693bb16488 Generate the initial graph. Output the graph as nested blocks. David Srbecký 2008-01-24 18:22:48 +0000
  • 0bff44d922 Create class for each node type David Srbecký 2008-01-24 16:41:06 +0000
  • faff1bf5a9 Working on graph reduction algorithm. (Graph creation and presentation is still missing) David Srbecký 2008-01-24 00:35:29 +0000
  • aba6b0950c Split method body to basic blocks David Srbecký 2008-01-23 21:23:13 +0000
  • a43af72f9e Bugfix - keep return if it is labelled. David Srbecký 2007-11-12 14:30:24 +0000
  • 22494bde37 Define local variables when value is first assigned to them David Srbecký 2007-11-12 14:23:40 +0000
  • 82d3debe87 Do not output the very last return statement David Srbecký 2007-11-12 13:19:36 +0000
  • 9eb2441490 Test on the compiler optimized version of quicksort David Srbecký 2007-11-12 01:28:06 +0000
  • 29b95cd28c Remove some parenthesis David Srbecký 2007-11-12 01:13:20 +0000
  • acdac3ecf5 Join consecutive expression together if possible David Srbecký 2007-11-12 01:01:29 +0000
  • 37d40932d9 Convert ByteCodeCollection to new data representation: StackExpressionCollection; Modify the generating code to use this data representation David Srbecký 2007-11-11 23:49:36 +0000
  • ed413b7ec3 Move stack analysis to the ByteCode class David Srbecký 2007-11-11 22:49:57 +0000
  • b7486c3221 Move StackBehaviour code to separate file David Srbecký 2007-11-11 21:48:29 +0000
  • 53eed43bf5 Moved typing code to ByteCode.GetType() David Srbecký 2007-11-11 21:42:03 +0000
  • 475eab39cf Move code from Util class to - ByteCode.PopCount - ByteCode.PushCount David Srbecký 2007-11-11 20:46:08 +0000
  • 0fe95f6b0b Use custom data structure to store bytecode sequence David Srbecký 2007-11-11 20:21:59 +0000
  • 9d82c6c55b Remove unnecessary labels David Srbecký 2007-11-11 17:59:59 +0000
  • 970706161a Get type of elements obtained from array David Srbecký 2007-11-11 17:53:56 +0000
  • a9ab824805 Get type for stack slots (partially implemented); Types are stored as Cecil TypeReferences David Srbecký 2007-11-11 17:33:11 +0000
  • ffef73b007 Hack - convert int to bool on == operator David Srbecký 2007-11-09 19:30:05 +0000
  • cfa3ecd70d Get type of new array David Srbecký 2007-11-09 17:28:59 +0000
  • 56ced90f95 Added "using System;"; Do not create namespace with empty name David Srbecký 2007-11-09 17:16:47 +0000
  • 2642e6de19 Output local variables David Srbecký 2007-11-09 17:03:27 +0000
  • 4468b4a3e1 Use stack analysis to figure out basic data flow - use actual inputs instead of the dummy ones David Srbecký 2007-11-09 16:49:32 +0000
  • 238605c831 Initial stack analysis implementation: Verify that the stack sizes are consistent - ie at a given location the stack size is statically known and constant. Keep track of instruction which pushed a given value on the stack. (Not handling the potential problem at control merge points - this problem does not occur in the quick sort algorithm) The state of the stack is outputted as a comment in the source code David Srbecký 2007-11-08 17:01:32 +0000
  • 306b17db33 Started a type checking algorithm David Srbecký 2007-11-04 17:09:03 +0000
  • 466e199cca Assign the result of each instruction to a temporary local variable David Srbecký 2007-11-04 16:08:06 +0000
  • e650e1afe6 Ldelema; Instance method calls David Srbecký 2007-11-04 15:44:33 +0000
  • 5032ab1df0 Implemented 'ret' instruction (function return) David Srbecký 2007-11-04 15:11:39 +0000
  • c57f053f7a Add a label in front of every statement David Srbecký 2007-11-04 14:57:17 +0000
  • 8faee275ed Implemented 'call' instruction David Srbecký 2007-11-04 14:35:23 +0000
  • 8bf08b1e1e Implemented branching operations David Srbecký 2007-11-04 14:15:02 +0000
  • fda3f6e0b5 Implemented comparison operators David Srbecký 2007-11-03 18:31:34 +0000
  • cc2d74dc94 Implemented basic array operations David Srbecký 2007-11-03 18:26:52 +0000
  • 6ee62de047 Finished arithmetic operations David Srbecký 2007-11-03 17:58:46 +0000
  • af3a01cd44 Rename files David Srbecký 2007-11-03 17:09:46 +0000
  • 7753b88bc5 Use NRefactory to create method bodies -> CodeDom not used anymore David Srbecký 2007-11-03 16:23:00 +0000
  • e5500abf75 Output the skeleton code using NRefactory instead of CodeDom David Srbecký 2007-11-03 15:37:41 +0000
  • 801a31f8d1 Generate code for some arithmetic operations (some operations are unsupported by CodeDom) David Srbecký 2007-10-31 19:28:48 +0000
  • 35fcc443e6 Tweaks in the format of the output (place an empty line between commands) David Srbecký 2007-10-29 19:57:39 +0000
  • a38d4f49c0 Group some op-codes: Arithmetic, Arrays, Branching, Comparison, Conversions, Indirect David Srbecký 2007-10-29 18:33:07 +0000
  • 0410750716 Generate code for some basic commands; Generate code for integer conversions David Srbecký 2007-10-29 18:02:25 +0000
  • 831739c4a7 Sort op-codes alphabetically David Srbecký 2007-10-29 17:18:25 +0000
  • f0640bb4ef Moved some code into separate file; Added a list of non-macro opcodes David Srbecký 2007-10-28 22:01:57 +0000
  • 3f3885d92e Disassemble the CIL bytecode and write it into the methods as comments David Srbecký 2007-10-28 20:22:10 +0000
  • ce43dec65f Recreate members of classes (no method bodies yet) David Srbecký 2007-10-28 19:00:49 +0000
  • a605c5b5a3 Types have proper access modifiers and are properly nested David Srbecký 2007-10-28 14:57:37 +0000
  • d43bf783ba Load the assembly and create a skeleton for each type (just 'public class' now) David Srbecký 2007-10-28 13:56:15 +0000
  • c3368ce842 Added reference to the Mono.Cecil library David Srbecký 2007-10-27 21:30:49 +0000
  • a6ff8910b4 Started the decompiler project - just a form with a text box where the generated source code will go David Srbecký 2007-10-27 21:26:11 +0000
  • 9d470dff4e Project Proposal David Srbecký 2007-10-17 23:04:46 +0000
  • 9e5fc484c7 Added a QuickSort program David Srbecký 2007-10-17 19:19:46 +0000
  • 534b155fd7 Adding Cecil 0.6 library David Srbecký 2007-10-06 13:44:15 +0000
  • 10651d0145 Remove the ContextMenu field member. Eusebiu Marcu 2011-02-08 21:30:01 +0200
  • 7d7216ecbf Move creation of the menuitem in GetContextMenu and remove the ContextMenu field member. Eusebiu Marcu 2011-02-08 21:24:04 +0200
  • e3431d762e Revert "Generalize the work with the tree-nodes context menu." Eusebiu Marcu 2011-02-08 20:55:31 +0200
  • 7ce12211ec Fix hyperlinks at the end of lines. (VisualLine.GetVisualColumnFloor bugfix: for positions after the end of the line; return the line's end column) Daniel Grunwald 2011-02-08 19:25:56 +0100
  • b2c532bfe9 Generalize the work with the tree-nodes context menu. Eusebiu Marcu 2011-02-08 15:22:21 +0200
  • e07577f079 Notes added by 'git notes add' Build Server 2011-02-08 13:58:52 +0100
  • 7be3277a1b Add "Remove assembly" item in AssemblyTreeNode context menu. Eusebiu Marcu 2011-02-08 11:23:46 +0200
  • 044714fe29 Use a simpler loop detection for the disassembler. Daniel Grunwald 2011-02-08 00:06:09 +0100
  • 16a4c73b1f Merge commit '0513c24aafa0504ba6bd04fcb825ef5def83996a' Daniel Grunwald 2011-02-07 22:12:47 +0100
  • 0513c24aaf Squashed 'AvalonEdit/' changes from 58e2044..307ad08 Daniel Grunwald 2011-02-07 22:12:47 +0100
  • 6498fe4705 Notes added by 'git notes add' Build Server 2011-02-07 20:37:36 +0100
  • 48dd3c0fd1 Code cleanup. Daniel Grunwald 2011-02-07 20:36:43 +0100
  • d557ff290f Notes added by 'git notes add' Build Server 2011-02-07 20:32:08 +0100
  • c0e39ae490 Automatic check for updates. Daniel Grunwald 2011-02-07 20:29:23 +0100
  • 8e83ecc944 Save the splitter position. Daniel Grunwald 2011-02-07 18:50:43 +0100
  • 20c0542768 Implemented check for updates. Daniel Grunwald 2011-02-07 17:46:51 +0100
  • f02108e55a Notes added by 'git notes add' Build Server 2011-02-07 20:22:38 +0100
  • df71f32ffa Add SearchBox with icons. Eusebiu Marcu 2011-02-07 21:21:20 +0200
  • 6b3a6c357f Notes added by 'git notes add' Build Server 2011-02-07 15:12:49 +0100
  • 2e0b6bab0e Fix WindowBounds saving code. Daniel Grunwald 2011-02-07 15:11:34 +0100
  • 945d837926 Notes added by 'git notes add' Daniel Grunwald 2011-02-07 13:20:52 +0100
  • 2b55a46d4b Replace AboutDialog with AboutPage. Daniel Grunwald 2011-02-06 21:50:26 +0100
  • 3d28650309 ControlFlowGraphBuilder bugfix: "try { try {} finally {} } catch {}" Daniel Grunwald 2011-02-06 20:02:50 +0100
  • 3d2459c6a4 Make all nodes display something in the output view. Daniel Grunwald 2011-02-06 18:51:06 +0100
  • 1787a9c478 View/Save embedded resources. Daniel Grunwald 2011-02-06 18:13:17 +0100
  • af44dcb4c6 Add button for reloading all assemblies. Daniel Grunwald 2011-02-06 16:58:36 +0100
  • 1093ba83df Code cleanup. Daniel Grunwald 2011-02-06 16:38:22 +0100
  • 3a6574e27d Fixed InvalidOperationException when deleting nodes. Daniel Grunwald 2011-02-06 14:26:18 +0100
  • 614bce445a Add length limit to AvalonEdit output; added support for decompiling directly to disk. Daniel Grunwald 2011-02-06 14:25:54 +0100
  • b338c41e15 Preparations for highlighting the search match. Daniel Grunwald 2011-02-06 12:42:17 +0100
  • c8ab6a1e05 Handle failed assembly loads. Daniel Grunwald 2011-02-06 12:27:13 +0100
  • a4af0a46f2 Move assembly loading from constructor to Loaded event. Daniel Grunwald 2011-02-06 11:27:39 +0100
  • 8fd9c3c312 Simplify SharpTreeView's CanDelete() calls. Daniel Grunwald 2011-02-06 11:24:33 +0100