aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-03-28 10:55:25 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-03-30 08:40:39 +0000
commita295dae1bc2e2f2d1d1a2c53a9d5faffeeac68c5 (patch)
tree8b08dcfe4a5b183df1514a2029e392defb383984 /src
parent44900962268c50aa1f9823e71d5b75cfa9e7ea4f (diff)
Fix value type encoding constant usage when cross-compiling
Our two value encodings use different masks for the upper 4 bytes. Depending on the target architecture we must use different values when generating code that uses these masks. This patch replaces the #ifdef'ed ValueTypeInternal_* enum values with two C++11 scoped enums that allows for the co-existence of both throughout the code base as well as selective use in the code generators. Change-Id: I380c8c28b84df2874cca521b78bfe7f9388ed228 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jit/qv4assembler.cpp2
-rw-r--r--src/qml/jit/qv4assembler_p.h29
-rw-r--r--src/qml/jit/qv4isel_masm.cpp23
-rw-r--r--src/qml/jsruntime/qv4engine.cpp2
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h2
-rw-r--r--src/qml/jsruntime/qv4value_p.h58
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp26
7 files changed, 80 insertions, 62 deletions
diff --git a/src/qml/jit/qv4assembler.cpp b/src/qml/jit/qv4assembler.cpp
index d239ed9907..daa732810b 100644
--- a/src/qml/jit/qv4assembler.cpp
+++ b/src/qml/jit/qv4assembler.cpp
@@ -437,7 +437,7 @@ typename Assembler<TargetConfiguration>::Jump Assembler<TargetConfiguration>::ge
// check if it's an int32:
Assembler::Jump isNoInt = branch32(Assembler::NotEqual, Assembler::ScratchRegister,
- Assembler::TrustedImm32(Value::Integer_Type_Internal));
+ Assembler::TrustedImm32(quint32(ValueTypeInternal::Integer)));
convertInt32ToDouble(toInt32Register(src, Assembler::ScratchRegister), dest);
Assembler::Jump intDone = jump();
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h
index 3e3aab9452..ad6c29dd49 100644
--- a/src/qml/jit/qv4assembler_p.h
+++ b/src/qml/jit/qv4assembler_p.h
@@ -153,6 +153,8 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
using Jump = typename JITAssembler::Jump;
using Label = typename JITAssembler::Label;
+ using ValueTypeInternal = Value::ValueTypeInternal_32;
+
static void loadDouble(JITAssembler *as, Address addr, FPRegisterID dest)
{
as->MacroAssembler::loadDouble(addr, dest);
@@ -219,16 +221,16 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
Jump done = as->jump();
intRange.link(as);
as->move(srcReg, lowReg);
- as->move(TrustedImm32(QV4::Value::Integer_Type_Internal), highReg);
+ as->move(TrustedImm32(quint32(QV4::Value::ValueTypeInternal_32::Integer)), highReg);
done.link(as);
} break;
case IR::SInt32Type:
as->move((RegisterID) t->index, lowReg);
- as->move(TrustedImm32(QV4::Value::Integer_Type_Internal), highReg);
+ as->move(TrustedImm32(quint32(QV4::Value::ValueTypeInternal_32::Integer)), highReg);
break;
case IR::BoolType:
as->move((RegisterID) t->index, lowReg);
- as->move(TrustedImm32(QV4::Value::Boolean_Type_Internal), highReg);
+ as->move(TrustedImm32(quint32(QV4::Value::ValueTypeInternal_32::Boolean)), highReg);
break;
default:
Q_UNREACHABLE();
@@ -319,14 +321,14 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
// check if it's an int32:
Jump fallback = as->branch32(RelationalCondition::NotEqual, TargetPlatform::ReturnValueRegister,
- TrustedImm32(Value::Integer_Type_Internal));
+ TrustedImm32(quint32(Value::ValueTypeInternal_32::Integer)));
IR::Temp *targetTemp = target->asTemp();
if (!targetTemp || targetTemp->kind == IR::Temp::StackSlot) {
as->load32(addr, TargetPlatform::ReturnValueRegister);
Pointer targetAddr = as->loadAddress(TargetPlatform::ScratchRegister, target);
as->store32(TargetPlatform::ReturnValueRegister, targetAddr);
targetAddr.offset += 4;
- as->store32(TrustedImm32(Value::Integer_Type_Internal), targetAddr);
+ as->store32(TrustedImm32(quint32(Value::ValueTypeInternal_32::Integer)), targetAddr);
} else {
as->load32(addr, (RegisterID) targetTemp->index);
}
@@ -384,6 +386,8 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
using Jump = typename JITAssembler::Jump;
using Label = typename JITAssembler::Label;
+ using ValueTypeInternal = Value::ValueTypeInternal_64;
+
static void loadDouble(JITAssembler *as, Address addr, FPRegisterID dest)
{
as->load64(addr, TargetPlatform::ReturnValueRegister);
@@ -433,7 +437,7 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
Jump done = as->jump();
intRange.link(as);
as->zeroExtend32ToPtr(srcReg, TargetPlatform::ReturnValueRegister);
- quint64 tag = QV4::Value::Integer_Type_Internal;
+ quint64 tag = quint64(QV4::Value::ValueTypeInternal_64::Integer);
as->or64(TrustedImm64(tag << 32),
TargetPlatform::ReturnValueRegister);
done.link(as);
@@ -442,10 +446,10 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
quint64 tag;
switch (t->type) {
case IR::SInt32Type:
- tag = QV4::Value::Integer_Type_Internal;
+ tag = quint64(QV4::Value::ValueTypeInternal_64::Integer);
break;
case IR::BoolType:
- tag = QV4::Value::Boolean_Type_Internal;
+ tag = quint64(QV4::Value::ValueTypeInternal_64::Boolean);
break;
default:
tag = 31337; // bogus value
@@ -623,7 +627,7 @@ struct RegisterSizeDependentAssembler<JITAssembler, MacroAssembler, TargetPlatfo
Pointer targetAddr = as->loadAddress(TargetPlatform::ScratchRegister, target);
as->store32(TargetPlatform::ReturnValueRegister, targetAddr);
targetAddr.offset += 4;
- as->store32(TrustedImm32(Value::Integer_Type_Internal), targetAddr);
+ as->store32(TrustedImm32(quint32(Value::ValueTypeInternal_64::Integer)), targetAddr);
} else {
as->storeInt32(TargetPlatform::ReturnValueRegister, target);
}
@@ -719,8 +723,6 @@ public:
return (hostOffset * RegisterSize) / QT_POINTER_SIZE;
}
- using RegisterSizeDependentOps = RegisterSizeDependentAssembler<Assembler<TargetConfiguration>, MacroAssembler, JITTargetPlatform, RegisterSize>;
-
struct LookupCall {
Address addr;
uint getterSetterOffset;
@@ -751,6 +753,9 @@ public:
{}
};
+ using RegisterSizeDependentOps = RegisterSizeDependentAssembler<Assembler<TargetConfiguration>, MacroAssembler, JITTargetPlatform, RegisterSize>;
+ using ValueTypeInternal = typename RegisterSizeDependentOps::ValueTypeInternal;
+
// V4 uses two stacks: one stack with QV4::Value items, which is checked by the garbage
// collector, and one stack used by the native C/C++/ABI code. This C++ stack is not scanned
// by the garbage collector, so if any JS object needs to be retained, it should be put on the
@@ -1586,7 +1591,7 @@ public:
Pointer tagAddr = addr;
tagAddr.offset += 4;
load32(tagAddr, scratchReg);
- Jump inIntRange = branch32(RelationalCondition::Equal, scratchReg, TrustedImm32(QV4::Value::Integer_Type_Internal));
+ Jump inIntRange = branch32(RelationalCondition::Equal, scratchReg, TrustedImm32(quint32(ValueTypeInternal::Integer)));
// it's not in signed int range, so load it as a double, and truncate it down
loadDouble(addr, FPGpr0);
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index 4a222e20f4..126fb4382b 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -774,10 +774,10 @@ void InstructionSelection<JITAssembler>::swapValues(IR::Expr *source, IR::Expr *
quint32 tag;
switch (regTemp->type) {
case IR::BoolType:
- tag = QV4::Value::Boolean_Type_Internal;
+ tag = quint32(JITAssembler::ValueTypeInternal::Boolean);
break;
case IR::SInt32Type:
- tag = QV4::Value::Integer_Type_Internal;
+ tag = quint32(JITAssembler::ValueTypeInternal::Integer);
break;
default:
tag = 31337; // bogus value
@@ -925,7 +925,7 @@ void InstructionSelection<JITAssembler>::convertTypeToDouble(IR::Expr *source, I
// check if it's an int32:
Jump isNoInt = _as->branch32(RelationalCondition::NotEqual, JITTargetPlatform::ScratchRegister,
- TrustedImm32(Value::Integer_Type_Internal));
+ TrustedImm32(quint32(JITAssembler::ValueTypeInternal::Integer)));
convertIntToDouble(source, target);
Jump intDone = _as->jump();
@@ -1003,13 +1003,13 @@ void InstructionSelection<JITAssembler>::convertTypeToBool(IR::Expr *source, IR:
// checkif it's a bool:
Jump notBool = _as->branch32(RelationalCondition::NotEqual, JITTargetPlatform::ReturnValueRegister,
- TrustedImm32(Value::Boolean_Type_Internal));
+ TrustedImm32(quint32(JITAssembler::ValueTypeInternal::Boolean)));
_as->load32(addr, JITTargetPlatform::ReturnValueRegister);
Jump boolDone = _as->jump();
// check if it's an int32:
notBool.link(_as);
Jump fallback = _as->branch32(RelationalCondition::NotEqual, JITTargetPlatform::ReturnValueRegister,
- TrustedImm32(Value::Integer_Type_Internal));
+ TrustedImm32(quint32(JITAssembler::ValueTypeInternal::Integer)));
_as->load32(addr, JITTargetPlatform::ReturnValueRegister);
Jump isZero = _as->branch32(RelationalCondition::Equal, JITTargetPlatform::ReturnValueRegister,
TrustedImm32(0));
@@ -1079,7 +1079,7 @@ void InstructionSelection<JITAssembler>::convertTypeToUInt32(IR::Expr *source, I
// check if it's an int32:
Jump isNoInt = _as->branch32(RelationalCondition::NotEqual, JITTargetPlatform::ScratchRegister,
- TrustedImm32(Value::Integer_Type_Internal));
+ TrustedImm32(quint32(JITAssembler::ValueTypeInternal::Integer)));
Pointer addr = _as->loadAddress(JITTargetPlatform::ScratchRegister, source);
_as->storeUInt32(_as->toInt32Register(addr, JITTargetPlatform::ScratchRegister), target);
Jump intDone = _as->jump();
@@ -1195,7 +1195,8 @@ void InstructionSelection<JITAssembler>::visitCJump(IR::CJump *s)
Address temp = _as->loadAddress(JITTargetPlatform::ScratchRegister, s->cond);
Address tag = temp;
tag.offset += QV4::Value::tagOffset();
- Jump booleanConversion = _as->branch32(RelationalCondition::NotEqual, tag, TrustedImm32(QV4::Value::Boolean_Type_Internal));
+ Jump booleanConversion = _as->branch32(RelationalCondition::NotEqual, tag,
+ TrustedImm32(quint32(JITAssembler::ValueTypeInternal::Boolean)));
Address data = temp;
data.offset += QV4::Value::valueOffset();
@@ -1314,7 +1315,7 @@ int InstructionSelection<JITAssembler>::prepareCallData(IR::ExprList* args, IR::
}
Pointer p = _as->stackLayout().callDataAddress(offsetof(CallData, tag));
- _as->store32(TrustedImm32(QV4::Value::Integer_Type_Internal), p);
+ _as->store32(TrustedImm32(quint32(JITAssembler::ValueTypeInternal::Integer)), p);
p = _as->stackLayout().callDataAddress(offsetof(CallData, argc));
_as->store32(TrustedImm32(argc), p);
p = _as->stackLayout().callDataAddress(offsetof(CallData, thisObject));
@@ -1456,7 +1457,7 @@ bool InstructionSelection<JITAssembler>::visitCJumpStrictNull(IR::Binop *binop,
RelationalCondition cond = binop->op == IR::OpStrictEqual ? RelationalCondition::Equal
: RelationalCondition::NotEqual;
- const TrustedImm32 tag(QV4::Value::Null_Type_Internal);
+ const TrustedImm32 tag{quint32(JITAssembler::ValueTypeInternal::Null)};
_as->generateCJumpOnCompare(cond, tagReg, tag, _block, trueBlock, falseBlock);
return true;
}
@@ -1538,7 +1539,7 @@ bool InstructionSelection<JITAssembler>::visitCJumpStrictBool(IR::Binop *binop,
// check if the tag of the var operand is indicates 'boolean'
_as->load32(otherAddr, JITTargetPlatform::ScratchRegister);
Jump noBool = _as->branch32(RelationalCondition::NotEqual, JITTargetPlatform::ScratchRegister,
- TrustedImm32(QV4::Value::Boolean_Type_Internal));
+ TrustedImm32(quint32(JITAssembler::ValueTypeInternal::Boolean)));
if (binop->op == IR::OpStrictEqual)
_as->addPatch(falseBlock, noBool);
else
@@ -1588,7 +1589,7 @@ bool InstructionSelection<JITAssembler>::visitCJumpNullUndefined(IR::Type nullOr
if (binop->op == IR::OpNotEqual)
qSwap(trueBlock, falseBlock);
- Jump isNull = _as->branch32(RelationalCondition::Equal, tagReg, TrustedImm32(int(QV4::Value::Null_Type_Internal)));
+ Jump isNull = _as->branch32(RelationalCondition::Equal, tagReg, TrustedImm32(quint32(JITAssembler::ValueTypeInternal::Null)));
Jump isNotUndefinedTag = _as->branch32(RelationalCondition::NotEqual, tagReg, TrustedImm32(int(QV4::Value::Managed_Type_Internal)));
tagAddr.offset -= 4;
_as->load32(tagAddr, tagReg);
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 83b00f0356..b5d4e6909b 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -498,7 +498,7 @@ void ExecutionEngine::initRootContext()
sizeof(GlobalContext::Data) + sizeof(CallData)));
r->d_unchecked()->init(this);
r->d()->callData = reinterpret_cast<CallData *>(r->d() + 1);
- r->d()->callData->tag = QV4::Value::Integer_Type_Internal;
+ r->d()->callData->tag = quint32(Value::ValueTypeInternal::Integer);
r->d()->callData->argc = 0;
r->d()->callData->thisObject = globalObject;
r->d()->callData->args[0] = Encode::undefined();
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 894434be16..e9dcc9172f 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -368,7 +368,7 @@ struct ScopedCallData {
{
int size = qMax(argc, QV4::Global::ReservedArgumentCount + int(offsetof(QV4::CallData, args)/sizeof(QV4::Value)));
ptr = reinterpret_cast<CallData *>(scope.alloc(size));
- ptr->tag = QV4::Value::Integer_Type_Internal;
+ ptr->tag = quint32(QV4::Value::ValueTypeInternal::Integer);
ptr->argc = argc;
}
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index 5662432f0d..9adad881a1 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -207,23 +207,23 @@ public:
}
QML_NEARLY_ALWAYS_INLINE void setInt_32(int i)
{
- setTagValue(Integer_Type_Internal, quint32(i));
+ setTagValue(quint32(ValueTypeInternal::Integer), quint32(i));
}
QML_NEARLY_ALWAYS_INLINE uint uint_32() const { return value(); }
QML_NEARLY_ALWAYS_INLINE void setEmpty()
{
- setTagValue(Empty_Type_Internal, value());
+ setTagValue(quint32(ValueTypeInternal::Empty), value());
}
QML_NEARLY_ALWAYS_INLINE void setEmpty(int i)
{
- setTagValue(Empty_Type_Internal, quint32(i));
+ setTagValue(quint32(ValueTypeInternal::Empty), quint32(i));
}
QML_NEARLY_ALWAYS_INLINE void setEmpty(quint32 i)
{
- setTagValue(Empty_Type_Internal, i);
+ setTagValue(quint32(ValueTypeInternal::Empty), i);
}
QML_NEARLY_ALWAYS_INLINE quint32 emptyValue()
@@ -266,8 +266,17 @@ public:
IsDoubleTag_Shift = IsDouble_Shift - Tag_Shift,
Managed_Type_Internal_64 = 0
};
+
static const quint64 Immediate_Mask_64 = 0x00020000u; // bit 49
+ enum class ValueTypeInternal_64 {
+ Empty = Immediate_Mask_64| 0,
+ ConvertibleToInt = Immediate_Mask_64| 0x10000u, // bit 48
+ Null = ConvertibleToInt | 0x08000u,
+ Boolean = ConvertibleToInt | 0x04000u,
+ Integer = ConvertibleToInt | 0x02000u
+ };
+
// Used only by 32-bit encoding
enum Masks {
SilentNaNBit = 0x00040000,
@@ -275,6 +284,14 @@ public:
};
static const quint64 Immediate_Mask_32 = NotDouble_Mask | 0x00020000u | SilentNaNBit;
+ enum class ValueTypeInternal_32 {
+ Empty = Immediate_Mask_32| 0,
+ ConvertibleToInt = Immediate_Mask_32| 0x10000u, // bit 48
+ Null = ConvertibleToInt | 0x08000u,
+ Boolean = ConvertibleToInt | 0x04000u,
+ Integer = ConvertibleToInt | 0x02000u
+ };
+
enum {
Managed_Type_Internal_32 = NotDouble_Mask
};
@@ -284,28 +301,23 @@ public:
Managed_Type_Internal = Managed_Type_Internal_64
};
static const quint64 Immediate_Mask = Immediate_Mask_64;
+ using ValueTypeInternal = ValueTypeInternal_64;
#else
enum {
Managed_Type_Internal = Managed_Type_Internal_32
};
static const quint64 Immediate_Mask = Immediate_Mask_32;
+ using ValueTypeInternal = ValueTypeInternal_32;
#endif
enum {
NaN_Mask = 0x7ff80000,
};
- enum ValueTypeInternal {
- Empty_Type_Internal = Immediate_Mask | 0,
- ConvertibleToInt = Immediate_Mask | 0x10000u, // bit 48
- Null_Type_Internal = ConvertibleToInt | 0x08000u,
- Boolean_Type_Internal = ConvertibleToInt | 0x04000u,
- Integer_Type_Internal = ConvertibleToInt | 0x02000u
- };
// used internally in property
- inline bool isEmpty() const { return tag() == Empty_Type_Internal; }
- inline bool isNull() const { return tag() == Null_Type_Internal; }
- inline bool isBoolean() const { return tag() == Boolean_Type_Internal; }
- inline bool isInteger() const { return tag() == Integer_Type_Internal; }
+ inline bool isEmpty() const { return tag() == quint32(ValueTypeInternal::Empty); }
+ inline bool isNull() const { return tag() == quint32(ValueTypeInternal::Null); }
+ inline bool isBoolean() const { return tag() == quint32(ValueTypeInternal::Boolean); }
+ inline bool isInteger() const { return tag() == quint32(ValueTypeInternal::Integer); }
inline bool isNullOrUndefined() const { return isNull() || isUndefined(); }
inline bool isNumber() const { return isDouble() || isInteger(); }
@@ -330,9 +342,9 @@ public:
inline bool isDouble() const { return (tag() & NotDouble_Mask) != NotDouble_Mask; }
inline bool isManaged() const { return tag() == Managed_Type_Internal && !isUndefined(); }
inline bool isManagedOrUndefined() const { return tag() == Managed_Type_Internal; }
- inline bool integerCompatible() const { return (tag() & ConvertibleToInt) == ConvertibleToInt; }
+ inline bool integerCompatible() const { return (tag() & quint32(ValueTypeInternal::ConvertibleToInt)) == quint32(ValueTypeInternal::ConvertibleToInt); }
static inline bool integerCompatible(Value a, Value b) {
- return ((a.tag() & b.tag()) & ConvertibleToInt) == ConvertibleToInt;
+ return ((a.tag() & b.tag()) & quint32(ValueTypeInternal::ConvertibleToInt)) == quint32(ValueTypeInternal::ConvertibleToInt);
}
static inline bool bothDouble(Value a, Value b) {
return ((a.tag() | b.tag()) & NotDouble_Mask) != NotDouble_Mask;
@@ -359,7 +371,7 @@ public:
inline bool isString() const;
inline bool isObject() const;
inline bool isInt32() {
- if (tag() == Integer_Type_Internal)
+ if (tag() == quint32(ValueTypeInternal::Integer))
return true;
if (isDouble()) {
double d = doubleValue();
@@ -372,7 +384,7 @@ public:
return false;
}
double asDouble() const {
- if (tag() == Integer_Type_Internal)
+ if (tag() == quint32(ValueTypeInternal::Integer))
return int_32();
return doubleValue();
}
@@ -427,7 +439,7 @@ public:
inline bool tryIntegerConversion() {
bool b = integerCompatible();
if (b)
- setTagValue(Integer_Type_Internal, value());
+ setTagValue(quint32(ValueTypeInternal::Integer), value());
return b;
}
@@ -610,14 +622,14 @@ inline Primitive Primitive::emptyValue(uint e)
inline Primitive Primitive::nullValue()
{
Primitive v;
- v.setTagValue(Null_Type_Internal, 0);
+ v.setTagValue(quint32(ValueTypeInternal::Null), 0);
return v;
}
inline Primitive Primitive::fromBoolean(bool b)
{
Primitive v;
- v.setTagValue(Boolean_Type_Internal, b);
+ v.setTagValue(quint32(ValueTypeInternal::Boolean), b);
return v;
}
@@ -639,7 +651,7 @@ inline Primitive Primitive::fromUInt32(uint i)
{
Primitive v;
if (i < INT_MAX) {
- v.setTagValue(Integer_Type_Internal, i);
+ v.setTagValue(quint32(ValueTypeInternal::Integer), i);
} else {
v.setDouble(i);
}
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 075a9a4a5d..c9b249011b 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -573,7 +573,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
#endif // DO_TRACE_INSTR
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = QV4::Primitive::undefinedValue();
STOREVALUE(instr.result, Runtime::method_callValue(engine, VALUE(instr.dest), callData));
@@ -583,7 +583,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
TRACE(property name, "%s, args=%u, argc=%u, this=%s", qPrintable(runtimeStrings[instr.name]->toQString()), instr.callData, instr.argc, (VALUE(instr.base)).toString(context)->toQString().toUtf8().constData());
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = VALUE(instr.base);
STOREVALUE(instr.result, Runtime::method_callProperty(engine, instr.name, callData));
@@ -592,7 +592,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(CallPropertyLookup)
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = VALUE(instr.base);
STOREVALUE(instr.result, Runtime::method_callPropertyLookup(engine, instr.lookupIndex, callData));
@@ -602,7 +602,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
TRACE(property name, "%s, args=%u, argc=%u, this=%s", qPrintable(runtimeStrings[instr.name]->toQString()), instr.callData, instr.argc, (VALUE(instr.base)).toString(context)->toQString().toUtf8().constData());
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = VALUE(instr.base);
STOREVALUE(instr.result, Runtime::method_callQmlScopeObjectProperty(engine, instr.index, callData));
@@ -612,7 +612,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
TRACE(property name, "%s, args=%u, argc=%u, this=%s", qPrintable(runtimeStrings[instr.name]->toQString()), instr.callData, instr.argc, (VALUE(instr.base)).toString(context)->toQString().toUtf8().constData());
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = VALUE(instr.base);
STOREVALUE(instr.result, Runtime::method_callQmlContextObjectProperty(engine, instr.index, callData));
@@ -621,7 +621,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(CallElement)
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = VALUE(instr.base);
STOREVALUE(instr.result, Runtime::method_callElement(engine, VALUE(instr.index), callData));
@@ -630,7 +630,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(CallActivationProperty)
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = QV4::Primitive::undefinedValue();
STOREVALUE(instr.result, Runtime::method_callActivationProperty(engine, instr.name, callData));
@@ -639,7 +639,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(CallGlobalLookup)
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = QV4::Primitive::undefinedValue();
STOREVALUE(instr.result, Runtime::method_callGlobalLookup(engine, instr.index, callData));
@@ -745,7 +745,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(CreateValue)
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = QV4::Primitive::undefinedValue();
STOREVALUE(instr.result, Runtime::method_constructValue(engine, VALUE(instr.func), callData));
@@ -754,7 +754,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(CreateProperty)
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = VALUE(instr.base);
STOREVALUE(instr.result, Runtime::method_constructProperty(engine, instr.name, callData));
@@ -763,7 +763,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(ConstructPropertyLookup)
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = VALUE(instr.base);
STOREVALUE(instr.result, Runtime::method_constructPropertyLookup(engine, instr.index, callData));
@@ -772,7 +772,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(CreateActivationProperty)
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = QV4::Primitive::undefinedValue();
STOREVALUE(instr.result, Runtime::method_constructActivationProperty(engine, instr.name, callData));
@@ -781,7 +781,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(ConstructGlobalLookup)
Q_ASSERT(instr.callData + instr.argc + offsetof(QV4::CallData, args)/sizeof(QV4::Value) <= stackSize);
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData);
- callData->tag = QV4::Value::Integer_Type_Internal;
+ callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = QV4::Primitive::undefinedValue();
STOREVALUE(instr.result, Runtime::method_constructGlobalLookup(engine, instr.index, callData));