Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QV4::Moth::BytecodeGenerator Class Reference

#include <qv4bytecodegenerator_p.h>

+ Collaboration diagram for QV4::Moth::BytecodeGenerator:

Classes

struct  ExceptionHandler
 
struct  Jump
 
struct  Label
 

Public Member Functions

 BytecodeGenerator (int line, bool debug, bool storeSourceLocation=false)
 
Label label ()
 
Label newLabel ()
 
ExceptionHandler newExceptionHandler ()
 
template<int InstrT>
void addInstruction (const InstrData< InstrT > &data)
 
Q_REQUIRED_RESULT Jump jump ()
 
Q_REQUIRED_RESULT Jump jumpTrue ()
 
Q_REQUIRED_RESULT Jump jumpFalse ()
 
Q_REQUIRED_RESULT Jump jumpNotUndefined ()
 
Q_REQUIRED_RESULT Jump jumpNoException ()
 
Q_REQUIRED_RESULT Jump jumpOptionalLookup (int index)
 
Q_REQUIRED_RESULT Jump jumpOptionalProperty (int name)
 
void jumpStrictEqual (const StackSlot &lhs, const Label &target)
 
void jumpStrictNotEqual (const StackSlot &lhs, const Label &target)
 
void checkException ()
 
void setUnwindHandler (ExceptionHandler *handler)
 
void unwindToLabel (int level, const Label &target)
 
void setLocation (const QQmlJS::SourceLocation &loc)
 
void incrementStatement ()
 
ExceptionHandlerexceptionHandler () const
 
int newRegister ()
 
int newRegisterArray (int n)
 
int registerCount () const
 
int currentRegister () const
 
void finalize (Compiler::Context *context)
 
template<int InstrT>
Jump addJumpInstruction (const InstrData< InstrT > &data)
 
void addCJumpInstruction (bool jumpOnFalse, const Label *trueLabel, const Label *falseLabel)
 
void clearLastInstruction ()
 
void addLoopStart (const Label &start)
 

Public Attributes

int currentReg = 0
 

Friends

struct Jump
 
struct Label
 
struct ExceptionHandler
 

Detailed Description

Definition at line 38 of file qv4bytecodegenerator_p.h.

Constructor & Destructor Documentation

◆ BytecodeGenerator()

QV4::Moth::BytecodeGenerator::BytecodeGenerator ( int line,
bool debug,
bool storeSourceLocation = false )
inline

Definition at line 40 of file qv4bytecodegenerator_p.h.

Member Function Documentation

◆ addCJumpInstruction()

void QV4::Moth::BytecodeGenerator::addCJumpInstruction ( bool jumpOnFalse,
const Label * trueLabel,
const Label * falseLabel )
inline

Definition at line 257 of file qv4bytecodegenerator_p.h.

◆ addInstruction()

template<int InstrT>
void QV4::Moth::BytecodeGenerator::addInstruction ( const InstrData< InstrT > & data)
inline

Definition at line 137 of file qv4bytecodegenerator_p.h.

◆ addJumpInstruction()

template<int InstrT>
Jump QV4::Moth::BytecodeGenerator::addJumpInstruction ( const InstrData< InstrT > & data)
inline

Definition at line 250 of file qv4bytecodegenerator_p.h.

◆ addLoopStart()

void QV4::Moth::BytecodeGenerator::addLoopStart ( const Label & start)
inline

Definition at line 270 of file qv4bytecodegenerator_p.h.

◆ checkException()

void QV4::Moth::BytecodeGenerator::checkException ( )
inline

Definition at line 205 of file qv4bytecodegenerator_p.h.

◆ clearLastInstruction()

void QV4::Moth::BytecodeGenerator::clearLastInstruction ( )
inline

Definition at line 265 of file qv4bytecodegenerator_p.h.

Referenced by QV4::Moth::BytecodeGenerator::Label::link().

+ Here is the caller graph for this function:

◆ currentRegister()

int QV4::Moth::BytecodeGenerator::currentRegister ( ) const
inline

Definition at line 245 of file qv4bytecodegenerator_p.h.

References currentReg.

Referenced by QV4::Compiler::Context::setupFunctionIndices().

+ Here is the caller graph for this function:

◆ exceptionHandler()

ExceptionHandler * QV4::Moth::BytecodeGenerator::exceptionHandler ( ) const
inline

Definition at line 238 of file qv4bytecodegenerator_p.h.

◆ finalize()

void BytecodeGenerator::finalize ( Compiler::Context * context)

Definition at line 131 of file qv4bytecodegenerator.cpp.

◆ incrementStatement()

void BytecodeGenerator::incrementStatement ( )

Definition at line 18 of file qv4bytecodegenerator.cpp.

◆ jump()

Q_REQUIRED_RESULT Jump QV4::Moth::BytecodeGenerator::jump ( )
inline

Definition at line 144 of file qv4bytecodegenerator_p.h.

◆ jumpFalse()

Q_REQUIRED_RESULT Jump QV4::Moth::BytecodeGenerator::jumpFalse ( )
inline

Definition at line 158 of file qv4bytecodegenerator_p.h.

◆ jumpNoException()

Q_REQUIRED_RESULT Jump QV4::Moth::BytecodeGenerator::jumpNoException ( )
inline

Definition at line 169 of file qv4bytecodegenerator_p.h.

◆ jumpNotUndefined()

Q_REQUIRED_RESULT Jump QV4::Moth::BytecodeGenerator::jumpNotUndefined ( )
inline

Definition at line 163 of file qv4bytecodegenerator_p.h.

◆ jumpOptionalLookup()

Q_REQUIRED_RESULT Jump QV4::Moth::BytecodeGenerator::jumpOptionalLookup ( int index)
inline

Definition at line 175 of file qv4bytecodegenerator_p.h.

◆ jumpOptionalProperty()

Q_REQUIRED_RESULT Jump QV4::Moth::BytecodeGenerator::jumpOptionalProperty ( int name)
inline

Definition at line 182 of file qv4bytecodegenerator_p.h.

◆ jumpStrictEqual()

void QV4::Moth::BytecodeGenerator::jumpStrictEqual ( const StackSlot & lhs,
const Label & target )
inline

Definition at line 189 of file qv4bytecodegenerator_p.h.

◆ jumpStrictNotEqual()

void QV4::Moth::BytecodeGenerator::jumpStrictNotEqual ( const StackSlot & lhs,
const Label & target )
inline

Definition at line 197 of file qv4bytecodegenerator_p.h.

◆ jumpTrue()

Q_REQUIRED_RESULT Jump QV4::Moth::BytecodeGenerator::jumpTrue ( )
inline

Definition at line 153 of file qv4bytecodegenerator_p.h.

◆ label()

Label QV4::Moth::BytecodeGenerator::label ( )
inline

Definition at line 124 of file qv4bytecodegenerator_p.h.

References QV4::Moth::BytecodeGenerator::Label::Label(), and QV4::Moth::BytecodeGenerator::Label::LinkNow.

Referenced by QV4::Moth::BytecodeGenerator::Jump::link().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newExceptionHandler()

ExceptionHandler QV4::Moth::BytecodeGenerator::newExceptionHandler ( )
inline

Definition at line 132 of file qv4bytecodegenerator_p.h.

References QV4::Moth::BytecodeGenerator::ExceptionHandler::ExceptionHandler().

+ Here is the call graph for this function:

◆ newLabel()

Label QV4::Moth::BytecodeGenerator::newLabel ( )
inline

Definition at line 128 of file qv4bytecodegenerator_p.h.

References QV4::Moth::BytecodeGenerator::Label::Label(), and QV4::Moth::BytecodeGenerator::Label::LinkLater.

+ Here is the call graph for this function:

◆ newRegister()

int BytecodeGenerator::newRegister ( )

Definition at line 23 of file qv4bytecodegenerator.cpp.

Referenced by QV4::Compiler::Context::setupFunctionIndices().

+ Here is the caller graph for this function:

◆ newRegisterArray()

int BytecodeGenerator::newRegisterArray ( int n)

Definition at line 31 of file qv4bytecodegenerator.cpp.

Referenced by QV4::Compiler::Context::setupFunctionIndices().

+ Here is the caller graph for this function:

◆ registerCount()

int QV4::Moth::BytecodeGenerator::registerCount ( ) const
inline

Definition at line 244 of file qv4bytecodegenerator_p.h.

◆ setLocation()

void BytecodeGenerator::setLocation ( const QQmlJS::SourceLocation & loc)

Definition at line 12 of file qv4bytecodegenerator.cpp.

◆ setUnwindHandler()

void QV4::Moth::BytecodeGenerator::setUnwindHandler ( ExceptionHandler * handler)
inline

Definition at line 211 of file qv4bytecodegenerator_p.h.

◆ unwindToLabel()

void QV4::Moth::BytecodeGenerator::unwindToLabel ( int level,
const Label & target )
inline

Definition at line 222 of file qv4bytecodegenerator_p.h.

Friends And Related Symbol Documentation

◆ ExceptionHandler

friend struct ExceptionHandler
friend

Definition at line 278 of file qv4bytecodegenerator_p.h.

◆ Jump

friend struct Jump
friend

Definition at line 276 of file qv4bytecodegenerator_p.h.

◆ Label

friend struct Label
friend

Definition at line 277 of file qv4bytecodegenerator_p.h.

Member Data Documentation

◆ currentReg

int QV4::Moth::BytecodeGenerator::currentReg = 0

Definition at line 302 of file qv4bytecodegenerator_p.h.

Referenced by currentRegister().


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