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
qv4instr_moth.cpp File Reference

(fa23aa04c4ffac98b954bd9ec14a0adbe57a1fb6)

#include "qv4instr_moth_p.h"
#include <private/qv4compileddata_p.h>
#include <private/qv4calldata_p.h>
#include <QtCore/qdebug.h>
+ Include dependency graph for qv4instr_moth.cpp:

Go to the source code of this file.

Namespaces

namespace  QV4
 
namespace  QV4::Moth
 

Macros

#define MOTH_RETURN_INSTR_SIZE(I)   case Instr::Type::I: case Instr::Type::I##_Wide: return InstrMeta<int(Instr::Type::I)>::Size;
 
#define ABSOLUTE_OFFSET()    (code + beginOffset - start + offset)
 
#define MOTH_BEGIN_INSTR(instr)
 
#define MOTH_END_INSTR(instr)
 

Functions

static QByteArray alignedNumber (int n)
 
static QByteArray alignedLineNumber (int line)
 
static QByteArray rawBytes (const char *data, int n)
 
QString QV4::Moth::dumpRegister (int reg, int nFormals)
 
QString QV4::Moth::dumpArguments (int argc, int argv, int nFormals)
 
QString QV4::Moth::dumpBytecode (const char *code, int len, int nLocals, int nFormals, int, const QVector< CompiledData::CodeOffsetToLineAndStatement > &lineAndStatementNumberMapping)
 
QString QV4::Moth::dumpBytecode (const char *code, int len, int nLocals, int nFormals, int beginOffset, int endOffset, const QVector< CompiledData::CodeOffsetToLineAndStatement > &lineAndStatementNumberMapping)
 

Macro Definition Documentation

◆ ABSOLUTE_OFFSET

#define ABSOLUTE_OFFSET ( )     (code + beginOffset - start + offset)

Definition at line 50 of file qv4instr_moth.cpp.

Referenced by QV4::Moth::dumpBytecode().

◆ MOTH_BEGIN_INSTR

#define MOTH_BEGIN_INSTR ( instr)
Value:
{ \
INSTR_##instr(MOTH_DECODE_WITH_BASE) \
if (static_cast<int>(Instr::Type::instr) >= 0x100) \
--base_ptr; \
s << alignedLineNumber(line) << alignedNumber(beginOffset + codeOffset).constData() << ": " \
<< rawBytes(base_ptr, int(code - base_ptr)) << #instr << " ";
GLdouble s
[6]
Definition qopenglext.h:235
static QByteArray rawBytes(const char *data, int n)
static QByteArray alignedLineNumber(int line)
static QByteArray alignedNumber(int n)

Definition at line 53 of file qv4instr_moth.cpp.

Referenced by QV4::Moth::dumpBytecode(), and QV4::Moth::VME::interpret().

◆ MOTH_END_INSTR

#define MOTH_END_INSTR ( instr)
Value:
s << "\n"; \
continue; \
}

Definition at line 61 of file qv4instr_moth.cpp.

Referenced by QV4::Moth::dumpBytecode(), and QV4::Moth::VME::interpret().

◆ MOTH_RETURN_INSTR_SIZE

#define MOTH_RETURN_INSTR_SIZE ( I)    case Instr::Type::I: case Instr::Type::I##_Wide: return InstrMeta<int(Instr::Type::I)>::Size;

Function Documentation

◆ alignedLineNumber()

static QByteArray alignedLineNumber ( int line)
static

Definition at line 28 of file qv4instr_moth.cpp.

References alignedNumber(), line, and QByteArray().

+ Here is the call graph for this function:

◆ alignedNumber()

static QByteArray alignedNumber ( int n)
static

Definition at line 23 of file qv4instr_moth.cpp.

References number, and QByteArray::number().

Referenced by alignedLineNumber().

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

◆ rawBytes()

static QByteArray rawBytes ( const char * data,
int n )
static

Definition at line 34 of file qv4instr_moth.cpp.

References ba, QByteArray::number(), and QByteArray::size().

+ Here is the call graph for this function: