hasmer
Public Member Functions | Properties | List of all members
Hasmer.Decompiler.DecompilerContext Class Reference

Represents the context of a function as it is being decompiled. More...

Public Member Functions

DecompilerContext GetDeepParent (int depth)
 Gets the parent context at the given depth. The current context is depth 0, the parent context is depth 1, etc. If the parent at the given depth is beyond that of a root function (i.e. a function whose parent is null), then an exception is thrown. Thus, this method can never return null. More...
 
DecompilerContext DeepCopy ()
 Creates a "semi-deep" copy of the current decompiler context, copying the context so that the original context's state is not affected by changes to the copy. More...
 

Properties

HbcDecompiler Decompiler [get, set]
 The decompiler for the Hermes bytecode file. More...
 
HbcFile Source [get]
 The bytecode file containing the function being decompiled. More...
 
List< HbcInstructionInstructions [get, set]
 The instructions in the current code block being decompiled. More...
 
FunctionState State [get, set]
 The state of the function's registers and other information in the current code bock. More...
 
int CurrentInstructionIndex [get, set]
 The index of the instruction currently being analyzed in the Instructions list. More...
 
HbcInstruction Instruction [get]
 The current instruction being analyzed. More...
 
BlockStatement Block [get, set]
 The current source tree code block that is being analyzed. More...
 
DecompilerContext Parent [get, set]
 The decompiler context of the parent function, i.e. if this function is a closure, this will be the decompiler context of the callee. A parent of null means that the function is at the root. More...
 
HbcFuncHeader Function [get, set]
 The header of the function that is being decompiled. More...
 
ControlFlowGraph ControlFlowGraph [get, set]
 The control flow graph of the current function that is being decompiled. More...
 

Detailed Description

Represents the context of a function as it is being decompiled.

Member Function Documentation

◆ DeepCopy()

DecompilerContext Hasmer.Decompiler.DecompilerContext.DeepCopy ( )
inline

Creates a "semi-deep" copy of the current decompiler context, copying the context so that the original context's state is not affected by changes to the copy.

◆ GetDeepParent()

DecompilerContext Hasmer.Decompiler.DecompilerContext.GetDeepParent ( int  depth)
inline

Gets the parent context at the given depth. The current context is depth 0, the parent context is depth 1, etc. If the parent at the given depth is beyond that of a root function (i.e. a function whose parent is null), then an exception is thrown. Thus, this method can never return null.

Property Documentation

◆ Block

BlockStatement Hasmer.Decompiler.DecompilerContext.Block
getset

The current source tree code block that is being analyzed.

◆ ControlFlowGraph

ControlFlowGraph Hasmer.Decompiler.DecompilerContext.ControlFlowGraph
getset

The control flow graph of the current function that is being decompiled.

◆ CurrentInstructionIndex

int Hasmer.Decompiler.DecompilerContext.CurrentInstructionIndex
getset

The index of the instruction currently being analyzed in the Instructions list.

◆ Decompiler

HbcDecompiler Hasmer.Decompiler.DecompilerContext.Decompiler
getset

The decompiler for the Hermes bytecode file.

◆ Function

HbcFuncHeader Hasmer.Decompiler.DecompilerContext.Function
getset

The header of the function that is being decompiled.

◆ Instruction

HbcInstruction Hasmer.Decompiler.DecompilerContext.Instruction
get

The current instruction being analyzed.

◆ Instructions

List<HbcInstruction> Hasmer.Decompiler.DecompilerContext.Instructions
getset

The instructions in the current code block being decompiled.

◆ Parent

DecompilerContext Hasmer.Decompiler.DecompilerContext.Parent
getset

The decompiler context of the parent function, i.e. if this function is a closure, this will be the decompiler context of the callee. A parent of null means that the function is at the root.

◆ Source

HbcFile Hasmer.Decompiler.DecompilerContext.Source
get

The bytecode file containing the function being decompiled.

◆ State

FunctionState Hasmer.Decompiler.DecompilerContext.State
getset

The state of the function's registers and other information in the current code bock.


The documentation for this class was generated from the following file: