File: decompiler-notes.txt

package info (click to toggle)
cecil-flowanalysis 0.1~svn.128879-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,048 kB
  • ctags: 1,368
  • sloc: cs: 5,512; makefile: 86; sh: 45; ansic: 7; php: 1
file content (50 lines) | stat: -rw-r--r-- 1,104 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Code Structure Decoding
***********************

Basic Flow Analysis
===================

* input: raw instruction list

* output: instruction block list

* a instruction block is defined by a start instruction and a finishing instruction +
a list of successor blocks

* split bytecode into multiple instruction blocks:
	* the first instruction of a method starts a block
	* the target of a branch instruction start a block
	* a branch instruction finishes a block
	* the instruction after a branch instruction starts a block
	* the last instruction of a method finishes a block

Action/Low-level statement Delimitation
=============================

* input: control flow graph

* output: action flow graph

1) ASSIGN EXPRESSION
2) INVOKE EXPRESSION+
3) BRANCH
4) COND_BRANCH EXPRESSION
5) RETURN

1) stloc, starg, stfld, stsfld
3) call, callvirt
3) br.s, br
4) ble, beq, ...
5) ret

Deoptimization
==============

* replace ret instructions in leaves by a connection to a single
ret block from both leaves

Expression Aggregation
======================

Simple Copy Propagation
=======================