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::Compiler::ControlFlow Struct Reference

#include <qv4compilercontrolflow_p.h>

Inheritance diagram for QV4::Compiler::ControlFlow:
Collaboration diagram for QV4::Compiler::ControlFlow:

Classes

struct  UnwindTarget

Public Types

enum  Type {
  Loop , With , Block , Finally ,
  Catch
}
enum  UnwindType { Break , Continue , Return }
using Reference = Codegen::Reference
using BytecodeGenerator = Moth::BytecodeGenerator
using Instruction = Moth::Instruction

Public Member Functions

 ControlFlow (Codegen *cg, Type type)
virtual ~ControlFlow ()
UnwindTarget unwindTarget (UnwindType type, const QString &label=QString())
virtual QString label () const
bool hasLoop () const
BytecodeGenerator::ExceptionHandlerparentUnwindHandler ()
virtual BytecodeGenerator::ExceptionHandlerunwindHandler ()

Public Attributes

Codegencg
ControlFlowparent
Type type

Protected Member Functions

virtual BytecodeGenerator::Label getUnwindTarget (UnwindType, const QString &=QString())
virtual bool requiresUnwind ()
QString loopLabel () const
BytecodeGeneratorgenerator () const

Detailed Description

Definition at line 27 of file qv4compilercontrolflow_p.h.

Member Typedef Documentation

◆ BytecodeGenerator

◆ Instruction

◆ Reference

Member Enumeration Documentation

◆ Type

Enumerator
Loop 
With 
Block 
Finally 
Catch 

Definition at line 32 of file qv4compilercontrolflow_p.h.

◆ UnwindType

Enumerator
Break 
Continue 
Return 

Definition at line 40 of file qv4compilercontrolflow_p.h.

Constructor & Destructor Documentation

◆ ControlFlow()

QV4::Compiler::ControlFlow::ControlFlow ( Codegen * cg,
Type type )
inline

Definition at line 55 of file qv4compilercontrolflow_p.h.

References ControlFlow(), parent, and type.

Referenced by ControlFlow().

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

◆ ~ControlFlow()

virtual QV4::Compiler::ControlFlow::~ControlFlow ( )
inlinevirtual

Definition at line 61 of file qv4compilercontrolflow_p.h.

Member Function Documentation

◆ generator()

BytecodeGenerator * QV4::Compiler::ControlFlow::generator ( ) const
inlineprotected

Definition at line 122 of file qv4compilercontrolflow_p.h.

◆ getUnwindTarget()

virtual BytecodeGenerator::Label QV4::Compiler::ControlFlow::getUnwindTarget ( UnwindType ,
const QString & = QString() )
inlineprotectedvirtual

Reimplemented in QV4::Compiler::ControlFlowLoop.

Definition at line 96 of file qv4compilercontrolflow_p.h.

◆ hasLoop()

bool QV4::Compiler::ControlFlow::hasLoop ( ) const
inline

Definition at line 85 of file qv4compilercontrolflow_p.h.

References Loop, parent, and type.

◆ label()

virtual QString QV4::Compiler::ControlFlow::label ( ) const
inlinevirtual

Reimplemented in QV4::Compiler::ControlFlowLoop.

Definition at line 83 of file qv4compilercontrolflow_p.h.

◆ loopLabel()

QString QV4::Compiler::ControlFlow::loopLabel ( ) const
inlineprotected

Definition at line 114 of file qv4compilercontrolflow_p.h.

◆ parentUnwindHandler()

BytecodeGenerator::ExceptionHandler * QV4::Compiler::ControlFlow::parentUnwindHandler ( )
inline

Definition at line 104 of file qv4compilercontrolflow_p.h.

References parent.

◆ requiresUnwind()

virtual bool QV4::Compiler::ControlFlow::requiresUnwind ( )
inlineprotectedvirtual

Reimplemented in QV4::Compiler::ControlFlowBlock, QV4::Compiler::ControlFlowCatch, QV4::Compiler::ControlFlowFinally, QV4::Compiler::ControlFlowUnwindCleanup, and QV4::Compiler::ControlFlowWith.

Definition at line 99 of file qv4compilercontrolflow_p.h.

Referenced by QV4::Compiler::ControlFlowUnwind::emitUnwindHandler(), and unwindTarget().

Here is the caller graph for this function:

◆ unwindHandler()

virtual BytecodeGenerator::ExceptionHandler * QV4::Compiler::ControlFlow::unwindHandler ( )
inlinevirtual

◆ unwindTarget()

UnwindTarget QV4::Compiler::ControlFlow::unwindTarget ( UnwindType type,
const QString & label = QString() )
inline

Definition at line 65 of file qv4compilercontrolflow_p.h.

References Break, Continue, parent, requiresUnwind(), and Return.

Here is the call graph for this function:

Member Data Documentation

◆ cg

Codegen* QV4::Compiler::ControlFlow::cg

Definition at line 51 of file qv4compilercontrolflow_p.h.

◆ parent

ControlFlow* QV4::Compiler::ControlFlow::parent

Definition at line 52 of file qv4compilercontrolflow_p.h.

Referenced by ControlFlow(), hasLoop(), parentUnwindHandler(), and unwindTarget().

◆ type

Type QV4::Compiler::ControlFlow::type

Definition at line 53 of file qv4compilercontrolflow_p.h.

Referenced by ControlFlow(), and hasLoop().


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