Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQmlJSCompilePass::State Struct Reference

#include <qqmljscompilepass_p.h>

+ Inheritance diagram for QQmlJSCompilePass::State:
+ Collaboration diagram for QQmlJSCompilePass::State:

Public Member Functions

const QQmlJSRegisterContentaccumulatorIn () const
 The accumulatorIn is the input register of the current instruction.
 
const QQmlJSRegisterContentaccumulatorOut () const
 The accumulatorOut is the output register of the current instruction.
 
void setRegister (int registerIndex, QQmlJSRegisterContent content)
 
void clearChangedRegister ()
 
int changedRegisterIndex () const
 
const QQmlJSRegisterContentchangedRegister () const
 
void addReadRegister (int registerIndex, const QQmlJSRegisterContent &reg)
 
void addReadAccumulator (const QQmlJSRegisterContent &reg)
 
VirtualRegisters takeReadRegisters () const
 
void setReadRegisters (VirtualRegisters readReagisters)
 
QQmlJSRegisterContent readRegister (int registerIndex) const
 
bool canMoveReadRegister (int registerIndex) const
 
bool isRegisterAffectedBySideEffects (int registerIndex) const
 
QQmlJSRegisterContent readAccumulator () const
 The readAccumulator is the register content expected by the current instruction.
 
bool readsRegister (int registerIndex) const
 
bool hasSideEffects () const
 
void markSideEffects (bool hasSideEffects)
 
void applySideEffects (bool hasSideEffects)
 
void setHasSideEffects (bool hasSideEffects)
 
bool isRename () const
 
void setIsRename (bool isRename)
 
int renameSourceRegisterIndex () const
 

Public Attributes

VirtualRegisters registers
 
VirtualRegisters lookups
 

Detailed Description

Definition at line 120 of file qqmljscompilepass_p.h.

Member Function Documentation

◆ accumulatorIn()

const QQmlJSRegisterContent & QQmlJSCompilePass::State::accumulatorIn ( ) const
inline

The accumulatorIn is the input register of the current instruction.

It holds a content, a type that content is acctually stored in, and an enclosing type of the stored type called the scope. Note that passes after the original type propagation may change the type of this register to a different type that the original one can be coerced to. Therefore, when analyzing the same instruction in a later pass, the type may differ from what was seen or requested ealier. See \l {readAccumulator()}. The input type may then need to be converted to the expected type.

Definition at line 136 of file qqmljscompilepass_p.h.

References QQmlJSCompilePass::Accumulator, QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::end(), QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::find(), it, Q_ASSERT, and registers.

Referenced by QQmlJSCodeGenerator::generate_As(), QQmlJSTypePropagator::generate_As(), QQmlJSTypePropagator::generate_CmpEqInt(), QQmlJSTypePropagator::generate_CmpNeInt(), QQmlJSTypePropagator::generate_DeadTemporalZoneCheck(), QQmlJSCodeGenerator::generate_Exp(), QQmlJSCodeGenerator::generate_GetIterator(), QQmlJSTypePropagator::generate_GetIterator(), QQmlJSCodeGenerator::generate_GetOptionalLookup(), QQmlJSCodeGenerator::generate_IteratorNext(), QQmlJSTypePropagator::generate_IteratorNext(), QQmlJSCodeGenerator::generate_JumpFalse(), QQmlJSTypePropagator::generate_JumpFalse(), QQmlJSCodeGenerator::generate_JumpTrue(), QQmlJSTypePropagator::generate_JumpTrue(), QQmlJSCodeGenerator::generate_LoadElement(), QQmlJSTypePropagator::generate_LoadElement(), QQmlJSCodeGenerator::generate_Mod(), QQmlJSCodeGenerator::generate_Ret(), QQmlJSTypePropagator::generate_Ret(), QQmlJSCodeGenerator::generate_SetLookup(), QQmlJSCodeGenerator::generate_StoreElement(), QQmlJSTypePropagator::generate_StoreNameCommon(), QQmlJSCodeGenerator::generate_StoreNameSloppy(), QQmlJSTypePropagator::generate_StoreProperty(), QQmlJSCodeGenerator::generate_StoreReg(), QQmlJSTypePropagator::generate_StoreReg(), and QQmlJSCodeGenerator::generate_ThrowException().

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

◆ accumulatorOut()

◆ addReadAccumulator()

void QQmlJSCompilePass::State::addReadAccumulator ( const QQmlJSRegisterContent & reg)
inline

Definition at line 182 of file qqmljscompilepass_p.h.

References QQmlJSCompilePass::Accumulator, and addReadRegister().

Referenced by QQmlJSTypePropagator::generate_StoreReg().

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

◆ addReadRegister()

void QQmlJSCompilePass::State::addReadRegister ( int registerIndex,
const QQmlJSRegisterContent & reg )
inline

Definition at line 172 of file qqmljscompilepass_p.h.

References isRename(), Q_ASSERT, and registers.

Referenced by addReadAccumulator(), QQmlJSTypePropagator::generate_LoadReg(), and QQmlJSTypePropagator::generate_MoveReg().

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

◆ applySideEffects()

void QQmlJSCompilePass::State::applySideEffects ( bool hasSideEffects)
inline

Definition at line 231 of file qqmljscompilepass_p.h.

References QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::begin(), QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::end(), hasSideEffects(), it, lookups, and registers.

Referenced by setHasSideEffects().

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

◆ canMoveReadRegister()

bool QQmlJSCompilePass::State::canMoveReadRegister ( int registerIndex) const
inline

Definition at line 199 of file qqmljscompilepass_p.h.

References QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::end(), QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::find(), and it.

Referenced by QQmlJSCodeGenerator::shouldMoveRegister().

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

◆ changedRegister()

◆ changedRegisterIndex()

int QQmlJSCompilePass::State::changedRegisterIndex ( ) const
inline

◆ clearChangedRegister()

void QQmlJSCompilePass::State::clearChangedRegister ( )
inline

Definition at line 163 of file qqmljscompilepass_p.h.

References QQmlJSCompilePass::InvalidRegister.

Referenced by QQmlJSTypePropagator::endInstruction().

+ Here is the caller graph for this function:

◆ hasSideEffects()

bool QQmlJSCompilePass::State::hasSideEffects ( ) const
inline

Definition at line 228 of file qqmljscompilepass_p.h.

Referenced by applySideEffects(), QQmlJSTypePropagator::endInstruction(), markSideEffects(), QQmlJSCompilePass::nextStateFromAnnotations(), setHasSideEffects(), QQmlJSCodeGenerator::startInstruction(), and QQmlJSShadowCheck::startInstruction().

+ Here is the caller graph for this function:

◆ isRegisterAffectedBySideEffects()

bool QQmlJSCompilePass::State::isRegisterAffectedBySideEffects ( int registerIndex) const
inline

Definition at line 205 of file qqmljscompilepass_p.h.

References QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::end(), QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::find(), and it.

Referenced by QQmlJSTypePropagator::endInstruction(), QQmlJSCodeGenerator::generate_LoadElement(), and QQmlJSCodeGenerator::generate_StoreElement().

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

◆ isRename()

bool QQmlJSCompilePass::State::isRename ( ) const
inline

Definition at line 248 of file qqmljscompilepass_p.h.

Referenced by addReadRegister(), QQmlJSTypePropagator::endInstruction(), and setIsRename().

+ Here is the caller graph for this function:

◆ markSideEffects()

void QQmlJSCompilePass::State::markSideEffects ( bool hasSideEffects)
inline

Definition at line 230 of file qqmljscompilepass_p.h.

References hasSideEffects().

Referenced by setHasSideEffects().

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

◆ readAccumulator()

QQmlJSRegisterContent QQmlJSCompilePass::State::readAccumulator ( ) const
inline

The readAccumulator is the register content expected by the current instruction.

It may differ from the actual input type of the accumulatorIn register and usage of the value may require a conversion.

Definition at line 218 of file qqmljscompilepass_p.h.

References QQmlJSCompilePass::Accumulator, and readRegister().

Referenced by QQmlJSCodeGenerator::generate_Exp(), and QQmlJSCodeGenerator::generate_SetLookup().

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

◆ readRegister()

QQmlJSRegisterContent QQmlJSCompilePass::State::readRegister ( int registerIndex) const
inline

Definition at line 193 of file qqmljscompilepass_p.h.

References QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::contains(), and Q_ASSERT.

Referenced by QQmlJSCodeGenerator::generate_As(), QQmlJSCodeGenerator::generate_Construct(), QQmlJSCodeGenerator::generate_DefineObjectLiteral(), QQmlJSCodeGenerator::generate_Exp(), readAccumulator(), and QQmlJSCodeGenerator::shouldMoveRegister().

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

◆ readsRegister()

bool QQmlJSCompilePass::State::readsRegister ( int registerIndex) const
inline

Definition at line 223 of file qqmljscompilepass_p.h.

References QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::contains().

Referenced by QQmlJSShadowCheck::generate_GetLookup(), and QQmlJSShadowCheck::generate_LoadProperty().

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

◆ renameSourceRegisterIndex()

int QQmlJSCompilePass::State::renameSourceRegisterIndex ( ) const
inline

Definition at line 251 of file qqmljscompilepass_p.h.

References QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::begin(), Q_ASSERT, and QFlatMap< Key, T, Compare, KeyContainer, MappedContainer >::size().

Referenced by QQmlJSTypePropagator::endInstruction().

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

◆ setHasSideEffects()

void QQmlJSCompilePass::State::setHasSideEffects ( bool hasSideEffects)
inline

Definition at line 243 of file qqmljscompilepass_p.h.

References applySideEffects(), hasSideEffects(), and markSideEffects().

Referenced by QQmlJSTypePropagator::endInstruction(), QQmlJSTypePropagator::generate_CallPossiblyDirectEval(), QQmlJSTypePropagator::generate_CallProperty(), QQmlJSTypePropagator::generate_CallValue(), QQmlJSTypePropagator::generate_CallWithReceiver(), QQmlJSTypePropagator::generate_CallWithSpread(), QQmlJSTypePropagator::generate_CheckException(), QQmlJSTypePropagator::generate_CloneBlockContext(), QQmlJSTypePropagator::generate_Construct(), QQmlJSTypePropagator::generate_ConstructWithSpread(), QQmlJSTypePropagator::generate_CreateCallContext(), QQmlJSTypePropagator::generate_IteratorNext(), QQmlJSTypePropagator::generate_Jump(), QQmlJSTypePropagator::generate_JumpFalse(), QQmlJSTypePropagator::generate_JumpNoException(), QQmlJSTypePropagator::generate_JumpTrue(), QQmlJSTypePropagator::generate_PopContext(), QQmlJSTypePropagator::generate_PopScriptContext(), QQmlJSTypePropagator::generate_PushBlockContext(), QQmlJSTypePropagator::generate_PushCatchContext(), QQmlJSTypePropagator::generate_PushScriptContext(), QQmlJSTypePropagator::generate_PushWithContext(), QQmlJSTypePropagator::generate_Ret(), QQmlJSTypePropagator::generate_SetException(), QQmlJSTypePropagator::generate_SetUnwindHandler(), QQmlJSTypePropagator::generate_StoreElement(), QQmlJSTypePropagator::generate_StoreNameCommon(), QQmlJSTypePropagator::generate_StoreProperty(), QQmlJSTypePropagator::generate_TailCall(), QQmlJSTypePropagator::generate_ThrowException(), QQmlJSTypePropagator::generate_UnwindDispatch(), and QQmlJSTypePropagator::generate_UnwindToLabel().

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

◆ setIsRename()

void QQmlJSCompilePass::State::setIsRename ( bool isRename)
inline

Definition at line 249 of file qqmljscompilepass_p.h.

References isRename().

Referenced by QQmlJSTypePropagator::endInstruction(), QQmlJSTypePropagator::generate_LoadReg(), QQmlJSTypePropagator::generate_MoveReg(), and QQmlJSTypePropagator::generate_StoreReg().

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

◆ setReadRegisters()

void QQmlJSCompilePass::State::setReadRegisters ( VirtualRegisters readReagisters)
inline

Definition at line 188 of file qqmljscompilepass_p.h.

Referenced by QQmlJSTypePropagator::endInstruction().

+ Here is the caller graph for this function:

◆ setRegister()

void QQmlJSCompilePass::State::setRegister ( int registerIndex,
QQmlJSRegisterContent content )
inline

Definition at line 153 of file qqmljscompilepass_p.h.

References QQmlJSRegisterContent::InvalidLookupIndex, lookups, and QQmlJSRegisterContent::resultLookupIndex().

Referenced by QQmlJSTypePropagator::generate_LoadReg(), QQmlJSTypePropagator::generate_MoveReg(), and QQmlJSTypePropagator::generate_StoreReg().

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

◆ takeReadRegisters()

VirtualRegisters QQmlJSCompilePass::State::takeReadRegisters ( ) const
inline

Definition at line 187 of file qqmljscompilepass_p.h.

Referenced by QQmlJSTypePropagator::endInstruction().

+ Here is the caller graph for this function:

Member Data Documentation

◆ lookups

◆ registers


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