Skip to content

Commit 6b2626f

Browse files
committed
Docs: reorder to have python first in multi-lang sections
1 parent fc20358 commit 6b2626f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

docs/dev/bnil-modifying.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Based on your IL of choice, there are a bunch of places you can insert your modi
6060
- An **IL Expression** is a single-operation expression, which may have child expressions or be the child of another expression.
6161
- The `*LevelILInstruction` class represents a single **IL Expression**. The class name may be confusing since **IL Instructions** are a different concept.
6262
- An **Expression Index** points to an **IL Expression** and may be used as an operand of another **IL Expression**.
63-
- An **IL Instruction** is an **IL Expression** that has been added as a top-level instruction to the function with a call to `*LevelILFunction::AddInstruction` (Python: `*LevelILFunction.append()`)
63+
- An **IL Instruction** is an **IL Expression** that has been added as a top-level instruction to the function with a call to `*LevelILFunction.append()` (C++: `*LevelILFunction::AddInstruction`)
6464
- An **Instruction Index** is assigned to an **IL Expression** that is added as an **IL Instruction**. Child expressions of an **IL Instruction** do not inherently have an **Instruction Index**, though the API tries to provide this for you.
6565

6666
## Writing The Plugin
@@ -178,12 +178,12 @@ Replacing exactly one instruction with exactly one other instruction is relative
178178

179179
1. Create the new expression in the function, and note its **Expression Index**
180180
2. Find the instruction you wish to remove, and get its **Expression Index** as well
181-
3. Use `*LevelILFunction::ReplaceExpr` (Python: `*LevelILFunction.replace_expr`), passing the **Expression Index** of the instruction to remove and the **Expression Index** of the replacement
181+
3. Use `*LevelILFunction.replace_expr` (C++: `*LevelILFunction::ReplaceExpr`), passing the **Expression Index** of the instruction to remove and the **Expression Index** of the replacement
182182
4. Now, the backing expression for the target instruction has been replaced by your new expression. There may be dangling expressions no longer referenced by any instructions; this is fine. They will simply be skipped during later stages of lifting.
183-
5. Call `*LevelILFunction::Finalize` (Python: `*LevelILFunction.finalize`) to BFS traverse the function's **IL Instructions** starting with instruction 0, reconstructing the **IL Basic Blocks** of the function
184-
6. Call `*LevelILFunction::GenerateSSAForm` (Python: `*LevelILFunction.generate_ssa_form`) to reconstruct the SSA Form of the function, updating dataflow calculations
183+
5. Call `*LevelILFunction.finalize` (C++: `*LevelILFunction::Finalize`) to BFS traverse the function's **IL Instructions** starting with instruction 0, reconstructing the **IL Basic Blocks** of the function
184+
6. Call `*LevelILFunction.generate_ssa_form` (C++: `*LevelILFunction::GenerateSSAForm`) to reconstruct the SSA Form of the function, updating dataflow calculations
185185

186-
If you wish to replace more than one instruction, or replace an instruction with more than one new instructions, you will need to use the more complicated method described below.
186+
If you wish to replace more than one instruction, or replace an instruction with more than one new instruction, you will need to use the more complicated method described below.
187187

188188
### Adding Instructions and Replacing Multiple Instructions
189189

@@ -358,8 +358,6 @@ For each instruction, determine if you want to insert new instructions before it
358358
```
359359

360360

361-
362-
363361
And finally, regenerate dataflow:
364362

365363
=== "Python"

0 commit comments

Comments
 (0)