4#ifndef QV4BYTECODEGENERATOR_P_H
5#define QV4BYTECODEGENERATOR_P_H
17#include <private/qv4instr_moth_p.h>
18#include <private/qv4compileddata_p.h>
19#include <private/qv4compilercontext_p.h>
20#include <private/qqmljssourcelocation_p.h>
43 if (storeSourceLocation)
144 Instruction::Jump
data;
161 Instruction::JumpNotUndefined
data{};
167 Instruction::JumpNoException
data{};
173 Instruction::GetOptionalLookup
data{};
180 Instruction::LoadOptionalProperty
data{};
187 Instruction::CmpStrictEqual cmp;
195 Instruction::CmpStrictNotEqual cmp;
203 Instruction::CheckException chk;
209 currentExceptionHandler = handler;
210 Instruction::SetUnwindHandler
data;
221 Instruction::UnwindToLabel unwind;
222 unwind.level =
level;
235 return currentExceptionHandler;
268 _labelInfos.push_back({
start.index });
289 void compressInstructions();
290 void packInstruction(I &
i);
291 void adjustJumpOffsets();
295 ExceptionHandler *currentExceptionHandler =
nullptr;
302 int currentStatement = 0;
304 std::unique_ptr<QV4::Compiler::Context::SourceLocationTable> m_sourceLocationTable;
305 bool debugMode =
false;
307 int lastInstrType = -1;
313 std::vector<LabelInfo> _labelInfos;
Q_REQUIRED_RESULT Jump jumpOptionalLookup(int index)
void jumpStrictNotEqual(const StackSlot &lhs, const Label &target)
Q_REQUIRED_RESULT Jump jumpFalse()
void clearLastInstruction()
Jump addJumpInstruction(const InstrData< InstrT > &data)
BytecodeGenerator(int line, bool debug, bool storeSourceLocation=false)
void setLocation(const QQmlJS::SourceLocation &loc)
void jumpStrictEqual(const StackSlot &lhs, const Label &target)
Q_REQUIRED_RESULT Jump jumpOptionalProperty(int name)
int currentRegister() const
ExceptionHandler newExceptionHandler()
Q_REQUIRED_RESULT Jump jumpTrue()
Q_REQUIRED_RESULT Jump jumpNotUndefined()
ExceptionHandler * exceptionHandler() const
void addInstruction(const InstrData< InstrT > &data)
void setUnwindHandler(ExceptionHandler *handler)
void incrementStatement()
void addLoopStart(const Label &start)
Q_REQUIRED_RESULT Jump jump()
void addCJumpInstruction(bool jumpOnFalse, const Label *trueLabel, const Label *falseLabel)
void finalize(Compiler::Context *context)
int newRegisterArray(int n)
void unwindToLabel(int level, const Label &target)
int registerCount() const
Q_REQUIRED_RESULT Jump jumpNoException()
Combined button and popup list for selecting options.
\qmltype Particle \inqmlmodule QtQuick.Particles
#define QT_WARNING_DISABLE_GCC(text)
#define Q_REQUIRED_RESULT
GLenum GLuint GLint level
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLuint GLenum GLsizei GLsizei GLint GLint GLboolean packed
ExceptionHandler(BytecodeGenerator *generator)
ExceptionHandler()=default
BytecodeGenerator * generator
Jump(BytecodeGenerator *generator, int instruction)
Label(BytecodeGenerator *generator, LinkMode mode=LinkNow)
BytecodeGenerator * generator