webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Types | Public Member Functions | Friends | List of all members
JSC::BytecodeRewriter Class Reference

#include <BytecodeRewriter.h>

Classes

class  Fragment
 
struct  InsertionPoint
 

Public Types

enum  Position : int8_t {
  Position::EntryPoint = -2, Position::Before = -1, Position::LabelPoint = 0, Position::After = 1,
  Position::OriginalBytecodePoint = 2, Position::EntryPoint = -2, Position::Before = -1, Position::LabelPoint = 0,
  Position::After = 1, Position::OriginalBytecodePoint = 2
}
 
enum  IncludeBranch : uint8_t { IncludeBranch::No = 0, IncludeBranch::Yes = 1, IncludeBranch::No = 0, IncludeBranch::Yes = 1 }
 
enum  Position : int8_t {
  Position::EntryPoint = -2, Position::Before = -1, Position::LabelPoint = 0, Position::After = 1,
  Position::OriginalBytecodePoint = 2, Position::EntryPoint = -2, Position::Before = -1, Position::LabelPoint = 0,
  Position::After = 1, Position::OriginalBytecodePoint = 2
}
 
enum  IncludeBranch : uint8_t { IncludeBranch::No = 0, IncludeBranch::Yes = 1, IncludeBranch::No = 0, IncludeBranch::Yes = 1 }
 

Public Member Functions

 BytecodeRewriter (BytecodeGraph< UnlinkedCodeBlock > &graph)
 
template<class Function >
void insertFragmentBefore (unsigned bytecodeOffset, Function function)
 
template<class Function >
void insertFragmentAfter (unsigned bytecodeOffset, Function function)
 
void removeBytecode (unsigned bytecodeOffset)
 
void execute ()
 
BytecodeGraph< UnlinkedCodeBlock > & graph ()
 
int adjustAbsoluteOffset (int absoluteOffset)
 
int adjustJumpTarget (int originalBytecodeOffset, int originalJumpTarget)
 
 BytecodeRewriter (BytecodeGraph< UnlinkedCodeBlock > &graph)
 
template<class Function >
void insertFragmentBefore (unsigned bytecodeOffset, Function function)
 
template<class Function >
void insertFragmentAfter (unsigned bytecodeOffset, Function function)
 
void removeBytecode (unsigned bytecodeOffset)
 
void execute ()
 
BytecodeGraph< UnlinkedCodeBlock > & graph ()
 
int adjustAbsoluteOffset (int absoluteOffset)
 
int adjustJumpTarget (int originalBytecodeOffset, int originalJumpTarget)
 

Friends

class UnlinkedCodeBlock
 

Member Enumeration Documentation

◆ IncludeBranch [1/2]

Enumerator
No 
Yes 
No 
Yes 

◆ IncludeBranch [2/2]

Enumerator
No 
Yes 
No 
Yes 

◆ Position [1/2]

Enumerator
EntryPoint 
Before 
LabelPoint 
After 
OriginalBytecodePoint 
EntryPoint 
Before 
LabelPoint 
After 
OriginalBytecodePoint 

◆ Position [2/2]

Enumerator
EntryPoint 
Before 
LabelPoint 
After 
OriginalBytecodePoint 
EntryPoint 
Before 
LabelPoint 
After 
OriginalBytecodePoint 

Constructor & Destructor Documentation

◆ BytecodeRewriter() [1/2]

JSC::BytecodeRewriter::BytecodeRewriter ( BytecodeGraph< UnlinkedCodeBlock > &  graph)
inline

◆ BytecodeRewriter() [2/2]

JSC::BytecodeRewriter::BytecodeRewriter ( BytecodeGraph< UnlinkedCodeBlock > &  graph)
inline

Member Function Documentation

◆ adjustAbsoluteOffset() [1/2]

int JSC::BytecodeRewriter::adjustAbsoluteOffset ( int  absoluteOffset)
inline

◆ adjustAbsoluteOffset() [2/2]

int JSC::BytecodeRewriter::adjustAbsoluteOffset ( int  absoluteOffset)
inline

◆ adjustJumpTarget() [1/2]

int JSC::BytecodeRewriter::adjustJumpTarget ( int  originalBytecodeOffset,
int  originalJumpTarget 
)
inline

◆ adjustJumpTarget() [2/2]

int JSC::BytecodeRewriter::adjustJumpTarget ( int  originalBytecodeOffset,
int  originalJumpTarget 
)
inline

◆ execute() [1/2]

void JSC::BytecodeRewriter::execute ( )

◆ execute() [2/2]

void JSC::BytecodeRewriter::execute ( )

◆ graph() [1/2]

BytecodeGraph<UnlinkedCodeBlock>& JSC::BytecodeRewriter::graph ( )
inline

◆ graph() [2/2]

BytecodeGraph<UnlinkedCodeBlock>& JSC::BytecodeRewriter::graph ( )
inline

◆ insertFragmentAfter() [1/2]

template<class Function >
void JSC::BytecodeRewriter::insertFragmentAfter ( unsigned  bytecodeOffset,
Function  function 
)
inline

◆ insertFragmentAfter() [2/2]

template<class Function >
void JSC::BytecodeRewriter::insertFragmentAfter ( unsigned  bytecodeOffset,
Function  function 
)
inline

◆ insertFragmentBefore() [1/2]

template<class Function >
void JSC::BytecodeRewriter::insertFragmentBefore ( unsigned  bytecodeOffset,
Function  function 
)
inline

◆ insertFragmentBefore() [2/2]

template<class Function >
void JSC::BytecodeRewriter::insertFragmentBefore ( unsigned  bytecodeOffset,
Function  function 
)
inline

◆ removeBytecode() [1/2]

void JSC::BytecodeRewriter::removeBytecode ( unsigned  bytecodeOffset)
inline

◆ removeBytecode() [2/2]

void JSC::BytecodeRewriter::removeBytecode ( unsigned  bytecodeOffset)
inline

Friends And Related Function Documentation

◆ UnlinkedCodeBlock


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