hasmer
|
Represents a function header definition in a Hermes bytecode file. More...
Public Member Functions | |
virtual HbcFuncHeader | GetAssemblerHeader () |
Gets the header that should be used for disassembly and decompilation, i.e. the header that contains instructions. HbcSmallFuncHeader objects do not contain bodies, so this returns the large header for such objects. More... | |
string | GetFunctionName (HbcFile source) |
Gets the name of a function, or the autogenerated name of a closure if it's an unnamed closure. More... | |
void | ClearInstructionCache () |
Clears the instructions cache so that a future call to Disassemble will disassemble and re-cache the data from scratch. More... | |
List< HbcInstruction > | Disassemble () |
Disassembles the function, parsing the bytecode into an HbcInstruction object for each instruction. The instructions will be cached. To clear the cache and have this function re-parse the instructions, see ClearInstructionCache. More... | |
Properties | |
uint | FunctionId [get, set] |
The sequential ID of the function. More... | |
uint | Offset [get, set] |
The offset in the HbcFile of the function. More... | |
uint | ParamCount [get, set] |
The amount of parameters that the function takes. More... | |
uint | BytecodeSizeInBytes [get, set] |
The amount of bytes that the function's bytecode takes up. More... | |
uint | FunctionName [get, set] |
The index in the string table of the function's name (i.e. HbcFile.GetStringTableEntry(FunctionName)). More... | |
uint | InfoOffset [get, set] |
The offset in the HbcFile of additional (i.e. debug) information about the function. More... | |
uint | FrameSize [get, set] |
The amount of registers that the function has. More... | |
uint | EnvironmentSize [get, set] |
The amount of symbols that the function has. More... | |
uint | HighestReadCacheIndex [get, set] |
uint | HighestWriteCacheIndex [get, set] |
HbcFuncHeaderFlags | Flags [get, set] |
The flags of the function. More... | |
HbcFile | DeclarationFile [get, set] |
Additional Inherited Members | |
Static Public Member Functions inherited from Hasmer.HbcEncodedItem | |
static void | WriteFromDefinition (HbcWriter writer, JToken def, object value) |
Writes a complex value given the definition and corresponding object. More... | |
static object | ReadFromDefinition (HbcReader reader, JToken def) |
Reads a simple value given its definition. More... | |
static T | Decode< T > (HbcReader reader, JObject obj) |
Reads a complex value from a stream given its definition. More... | |
static void | Encode< T > (HbcWriter writer, JObject obj, T item) |
Encodes a complex value to a stream given its definition. More... | |
Represents a function header definition in a Hermes bytecode file.
|
inline |
Clears the instructions cache so that a future call to Disassemble will disassemble and re-cache the data from scratch.
|
inline |
Disassembles the function, parsing the bytecode into an HbcInstruction object for each instruction.
The instructions will be cached. To clear the cache and have this function re-parse the instructions, see ClearInstructionCache.
|
inlinevirtual |
Gets the header that should be used for disassembly and decompilation, i.e. the header that contains instructions. HbcSmallFuncHeader objects do not contain bodies, so this returns the large header for such objects.
Reimplemented in Hasmer.HbcSmallFuncHeader.
|
inline |
Gets the name of a function, or the autogenerated name of a closure if it's an unnamed closure.
|
getset |
The amount of bytes that the function's bytecode takes up.
|
getset |
The amount of symbols that the function has.
|
getset |
The flags of the function.
|
getset |
The amount of registers that the function has.
|
getset |
The sequential ID of the function.
|
getset |
The index in the string table of the function's name (i.e. HbcFile.GetStringTableEntry(FunctionName)).
|
getset |
The offset in the HbcFile of additional (i.e. debug) information about the function.
|
getset |
The offset in the HbcFile of the function.
|
getset |
The amount of parameters that the function takes.