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
QV4::StaticValue Struct Reference

#include <qv4staticvalue_p.h>

+ Inheritance diagram for QV4::StaticValue:
+ Collaboration diagram for QV4::StaticValue:

Public Types

enum class  TagBit {
  SpecialNegative = 0b10000000000000000000 << 12 , SpecialQNaN = 0b00000000000010000000 << 12 , Special = 0b00000000000001000000 << 12 , IntCompat = 0b00000000000000100000 << 12 ,
  Unmanaged = 0b00000000000000010000 << 12 , IntOrBool = 0b00000000000000001000 << 12 , Number = 0b00000000000000000100 << 12
}
 
enum  Type {
  Managed_Type = 0 , Double_Type = 1 , Undefined_Type = 2 , Empty_Type = quint32(TagBit::Unmanaged) ,
  Null_Type = Empty_Type | quint32(TagBit::IntCompat) , Boolean_Type = Null_Type | quint32(TagBit::IntOrBool) , Integer_Type = Boolean_Type | quint32(TagBit::Number)
}
 
enum  {
  Tag_Shift = 32 , IsIntegerConvertible_Shift = 48 , IsIntegerConvertible_Value = 3 , IsIntegerOrBool_Shift = 47 ,
  IsIntegerOrBool_Value = 7
}
 
enum class  QuickType : quint32 {
  Managed = Managed_Type , Empty = Empty_Type , Null = Null_Type , Boolean = Boolean_Type ,
  Integer = Integer_Type , PlusInf = quint32(TagBit::Number) | quint32(TagBit::Special) | quint32(TagBit::Unmanaged) , MinusInf = PlusInf | quint32(TagBit::SpecialNegative) , NaN = PlusInf | quint32(TagBit::SpecialQNaN) ,
  MinusNaN = NaN | quint32(TagBit::SpecialNegative)
}
 
enum  {
  QT_Empty = Empty_Type , QT_Null = Null_Type , QT_Bool = Boolean_Type , QT_Int = Integer_Type ,
  QuickType_Shift = Tag_Shift
}
 
using HeapBasePtr = Heap::Base *
 
using ValueTypeInternal = QuickType
 

Public Member Functions

 StaticValue ()=default
 
constexpr StaticValue (quint64 val)
 
StaticValueoperator= (ReturnedValue v)
 
template<typename Value >
StaticValueoperator= (const Value &)
 
template<typename Value >
const ValueasValue () const
 
template<typename Value >
ValueasValue ()
 
QV4_NEARLY_ALWAYS_INLINE constexpr quint64rawValueRef ()
 
QV4_NEARLY_ALWAYS_INLINE constexpr quint64 rawValue () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setRawValue (quint64 raw)
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setTagValue (quint32 tag, quint32 value)
 
QV4_NEARLY_ALWAYS_INLINE constexpr quint32 value () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr quint32 tag () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setTag (quint32 tag)
 
QV4_NEARLY_ALWAYS_INLINE constexpr int int_32 () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setInt_32 (int i)
 
QV4_NEARLY_ALWAYS_INLINE uint uint_32 () const
 
QV4_NEARLY_ALWAYS_INLINE constexpr void setEmpty ()
 
Type type () const
 
quint64 quickType () const
 
bool isEmpty () const
 
bool isNull () const
 
bool isBoolean () const
 
bool isInteger () const
 
bool isNullOrUndefined () const
 
bool isUndefined () const
 
bool isDouble () const
 
bool isNumber () const
 
bool isManagedOrUndefined () const
 
bool isManaged () const
 
bool isIntOrBool () const
 
bool integerCompatible () const
 
bool isNaN () const
 
bool isPositiveInt () const
 
QV4_NEARLY_ALWAYS_INLINE double doubleValue () const
 
QV4_NEARLY_ALWAYS_INLINE void setDouble (double d)
 
bool isInt32 ()
 
double asDouble () const
 
bool booleanValue () const
 
int integerValue () const
 
bool tryIntegerConversion ()
 
bool toBoolean () const
 
int toInt32 () const
 
ReturnedValuedata_ptr ()
 
constexpr ReturnedValue asReturnedValue () const
 
template<>
StaticValueoperator= (const Value &value)
 
template<typename Managed >
StaticValueoperator= (const Managed &m)
 
template<>
ValueasValue ()
 
template<>
const ValueasValue () const
 

Static Public Member Functions

static int valueOffset ()
 
static int tagOffset ()
 
static constexpr quint64 tagValue (quint32 tag, quint32 value)
 
static constexpr quint64 tagBitMask (TagBit bit)
 
static bool integerCompatible (StaticValue a, StaticValue b)
 
static bool bothDouble (StaticValue a, StaticValue b)
 
static QV4_NEARLY_ALWAYS_INLINE bool isInt32 (double d)
 
static constexpr StaticValue fromReturnedValue (ReturnedValue val)
 
static constexpr StaticValue emptyValue ()
 
static constexpr StaticValue fromBoolean (bool b)
 
static constexpr StaticValue fromInt32 (int i)
 
static constexpr StaticValue undefinedValue ()
 
static constexpr StaticValue nullValue ()
 
static StaticValue fromDouble (double d)
 
static StaticValue fromUInt32 (uint i)
 
static double toInteger (double d)
 
static int toInt32 (double d)
 
static unsigned int toUInt32 (double d)
 

Public Attributes

quint64 _val
 

Static Public Attributes

static constexpr quint64 ExponentMask = 0b0111111111110000ull << 48
 
static constexpr quint64 Top1Mask = 0b1000000000000000ull << 48
 
static constexpr quint64 Upper3Mask = 0b0000000000001110ull << 48
 
static constexpr quint64 Lower5Mask = 0b0000000000011111ull
 
static constexpr quint64 ManagedMask = ExponentMask | quint64(TagBit::Unmanaged) << Tag_Shift
 
static constexpr quint64 DoubleMask = ManagedMask | quint64(TagBit::Special) << Tag_Shift
 
static constexpr quint64 NumberMask = ManagedMask | quint64(TagBit::Number) << Tag_Shift
 
static constexpr quint64 IntOrBoolMask = ManagedMask | quint64(TagBit::IntOrBool) << Tag_Shift
 
static constexpr quint64 IntCompatMask = ManagedMask | quint64(TagBit::IntCompat) << Tag_Shift
 
static constexpr quint64 EncodeMask = DoubleMask | NumberMask
 
static constexpr quint64 DoubleDiscriminator = ((quint64(TagBit::Unmanaged) | quint64(TagBit::Special)) << Tag_Shift)
 
static constexpr quint64 NumberDiscriminator = ((quint64(TagBit::Unmanaged) | quint64(TagBit::Number)) << Tag_Shift)
 

Detailed Description

Definition at line 44 of file qv4staticvalue_p.h.

Member Typedef Documentation

◆ HeapBasePtr

Definition at line 46 of file qv4staticvalue_p.h.

◆ ValueTypeInternal

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Tag_Shift 
IsIntegerConvertible_Shift 
IsIntegerConvertible_Value 
IsIntegerOrBool_Shift 
IsIntegerOrBool_Value 

Definition at line 190 of file qv4staticvalue_p.h.

◆ anonymous enum

anonymous enum
Enumerator
QT_Empty 
QT_Null 
QT_Bool 
QT_Int 
QuickType_Shift 

Definition at line 248 of file qv4staticvalue_p.h.

◆ QuickType

enum class QV4::StaticValue::QuickType : quint32
strong
Enumerator
Managed 
Empty 
Null 
Boolean 
Integer 
PlusInf 
MinusInf 
NaN 
MinusNaN 

Definition at line 228 of file qv4staticvalue_p.h.

◆ TagBit

enum class QV4::StaticValue::TagBit
strong
Enumerator
SpecialNegative 
SpecialQNaN 
Special 
IntCompat 
Unmanaged 
IntOrBool 
Number 

Definition at line 160 of file qv4staticvalue_p.h.

◆ Type

Enumerator
Managed_Type 
Double_Type 
Undefined_Type 
Empty_Type 
Null_Type 
Boolean_Type 
Integer_Type 

Definition at line 178 of file qv4staticvalue_p.h.

Constructor & Destructor Documentation

◆ StaticValue() [1/2]

QV4::StaticValue::StaticValue ( )
default

◆ StaticValue() [2/2]

constexpr QV4::StaticValue::StaticValue ( quint64 val)
inlineconstexpr

Definition at line 49 of file qv4staticvalue_p.h.

Member Function Documentation

◆ asDouble()

double QV4::StaticValue::asDouble ( ) const
inline

Definition at line 400 of file qv4staticvalue_p.h.

References doubleValue(), int_32(), Integer, and tag().

Referenced by QV4::Runtime::CompareGreaterThan::call(), QV4::Runtime::CompareLessThan::call(), QV4::Runtime::CompareGreaterEqual::call(), QV4::Runtime::CompareLessEqual::call(), ListModel::set(), ListModel::set(), and thisNumber().

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

◆ asReturnedValue()

constexpr ReturnedValue QV4::StaticValue::asReturnedValue ( ) const
inlineconstexpr

Definition at line 452 of file qv4staticvalue_p.h.

References _val.

Referenced by QV4::CallData::argument(), QV4::RegExpObject::builtinExec(), QV4::Runtime::CompareGreaterThan::call(), QV4::Runtime::CompareLessThan::call(), QV4::Runtime::CompareGreaterEqual::call(), QV4::Runtime::CompareLessEqual::call(), QV4::Runtime::CompareEqual::call(), QV4::Runtime::CreateUnmappedArgumentsObject::call(), QV4::Runtime::PushWithContext::call(), QV4::Runtime::LoadElement::call(), QV4::Runtime::PushBlockContext::call(), QV4::Runtime::PushCatchContext::call(), QV4::ExecutionEngine::catchException(), QV4::Value::convertedToNumber(), QV4::QMetaObjectWrapper::create(), QV4::QmlListWrapper::create(), QV4::QmlListWrapper::create(), QV4::QmlListWrapper::create(), QV4::EvalFunction::evalCall(), QV4::RegExpPrototype::execFirstMatch(), QV4::ExecutionEngine::fromData(), QV4::SimpleArrayData::get(), QV4::ESTable::get(), QV4::Lookup::getterIndexed(), QV4::ExecutionEngine::global(), QQuickContext2DStyle::gradient_proto_addColorStop(), QV4::QObjectSlotDispatcher::impl(), QV4::Moth::VME::interpret(), QV4::loadProperty(), QV4::PromiseCtor::method_all(), QV4::FunctionPrototype::method_bind(), QV4::RegExpPrototype::method_get_input(), QV4::ArrayPrototype::method_get_species(), QV4::ErrorObject::method_get_stack(), QQuickJSContext2DPrototype::method_isPointInPath(), QV4::IteratorPrototype::method_iterator(), QV4::ObjectPrototype::method_preventExtensions(), QV4::PromiseCtor::method_race(), QV4::StringCtor::method_raw(), QV4::ArrayPrototype::method_reduceRight(), QV4::IntrinsicTypedArrayPrototype::method_reduceRight(), QQuickJSContext2DPrototype::method_reset(), QQuickJSContext2DPrototype::method_restore(), QV4::ArrayPrototype::method_reverse(), QV4::ObjectPrototype::method_setPrototypeOf(), QV4::ArrayPrototype::method_sort(), QV4::PropertyListPrototype::method_sort(), QV4::SymbolPrototype::method_symbolToPrimitive(), QV4::StringPrototype::method_toString(), QV4::VariantPrototype::method_valueOf(), QV4::ExecutionContext::newCallContext(), QQmlV4Function::operator[](), QV4::SimpleArrayData::pop_front(), qmlsqldatabase_rows_index(), QV4::QQmlContextWrapper::resolveQmlContextPropertyLookupGetter(), QV4::JSTypesStackFrame::setupJSFrame(), thisNumberValue(), QJSManagedValue::toJSValue(), toVariant(), and QV4::ScriptFunction::virtualCallAsConstructor().

◆ asValue() [1/4]

template<typename Value >
Value & QV4::StaticValue::asValue ( )

◆ asValue() [2/4]

template<>
Value & QV4::StaticValue::asValue ( )
inline

Definition at line 248 of file qv4value_p.h.

◆ asValue() [3/4]

template<typename Value >
const Value & QV4::StaticValue::asValue ( ) const

Referenced by QV4::Runtime::PushWithContext::call(), QV4::CallMethod(), and QQmlJavaScriptExpression::evaluate().

+ Here is the caller graph for this function:

◆ asValue() [4/4]

template<>
const Value & QV4::StaticValue::asValue ( ) const
inline

Definition at line 254 of file qv4value_p.h.

◆ booleanValue()

bool QV4::StaticValue::booleanValue ( ) const
inline

Definition at line 406 of file qv4staticvalue_p.h.

References int_32().

Referenced by QV4::QQmlXMLHttpRequestCtor::method_open(), QQmlVMEMetaObject::readPropertyAsBool(), ListModel::set(), ListModel::set(), QJSManagedValue::toPrimitive(), QJSManagedValue::toVariant(), and value().

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

◆ bothDouble()

static bool QV4::StaticValue::bothDouble ( StaticValue a,
StaticValue b )
inlinestatic

Definition at line 339 of file qv4staticvalue_p.h.

◆ data_ptr()

ReturnedValue * QV4::StaticValue::data_ptr ( )
inline

Definition at line 451 of file qv4staticvalue_p.h.

References _val.

Referenced by QV4::Heap::DECLARE_EXPORTED_HEAP_OBJECT(), and QV4::PropertyIndex::set().

+ Here is the caller graph for this function:

◆ doubleValue()

QV4_NEARLY_ALWAYS_INLINE double QV4::StaticValue::doubleValue ( ) const
inline

Definition at line 358 of file qv4staticvalue_p.h.

References _val, d, EncodeMask, isDouble(), and Q_ASSERT.

Referenced by QV4::Value::asArrayLength(), asDouble(), QV4::CompiledData::CompilationUnit::bindingValueAsNumber(), QV4::Runtime::CompareEqual::call(), compareEqualInt(), isInt32(), QQmlVMEMetaObject::readPropertyAsDouble(), QV4::Value::sameValue(), QV4::Value::sameValueZero(), toBoolean(), toInt32(), QV4::Value::toNumber(), QJSManagedValue::toPrimitive(), and QJSManagedValue::toVariant().

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

◆ emptyValue()

static constexpr StaticValue QV4::StaticValue::emptyValue ( )
inlinestaticconstexpr

Definition at line 455 of file qv4staticvalue_p.h.

References Empty, and tagValue().

Referenced by QV4::Compiler::Codegen::pushArgs(), QV4::Compiler::Codegen::visit(), and QV4::Compiler::Codegen::visit().

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

◆ fromBoolean()

static constexpr StaticValue QV4::StaticValue::fromBoolean ( bool b)
inlinestaticconstexpr

Definition at line 456 of file qv4staticvalue_p.h.

References Boolean, and tagValue().

+ Here is the call graph for this function:

◆ fromDouble()

static StaticValue QV4::StaticValue::fromDouble ( double d)
inlinestatic

Definition at line 461 of file qv4staticvalue_p.h.

References d, and setDouble().

Referenced by QV4::add_int32(), QV4::mul_int32(), and QV4::sub_int32().

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

◆ fromInt32()

static constexpr StaticValue QV4::StaticValue::fromInt32 ( int i)
inlinestaticconstexpr

Definition at line 457 of file qv4staticvalue_p.h.

References i, Integer, and tagValue().

Referenced by QV4::add_int32(), QV4::mul_int32(), and QV4::sub_int32().

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

◆ fromReturnedValue()

static constexpr StaticValue QV4::StaticValue::fromReturnedValue ( ReturnedValue val)
inlinestaticconstexpr

Definition at line 453 of file qv4staticvalue_p.h.

Referenced by QV4::Compiler::Codegen::binopHelper(), QQmlJSCodeGenerator::generate_LoadConst(), QQmlJSCodeGenerator::generate_MoveConst(), QV4::Compiler::Codegen::jumpBinop(), QV4::Compiler::Codegen::Reference::loadInAccumulator(), QV4::CompiledData::CompilationUnit::setUnitData(), and QV4::Compiler::Codegen::unop().

+ Here is the caller graph for this function:

◆ fromUInt32()

static StaticValue QV4::StaticValue::fromUInt32 ( uint i)
inlinestatic

Definition at line 468 of file qv4staticvalue_p.h.

References i, Integer, and setTagValue().

+ Here is the call graph for this function:

◆ int_32()

QV4_NEARLY_ALWAYS_INLINE constexpr int QV4::StaticValue::int_32 ( ) const
inlineconstexpr

Definition at line 145 of file qv4staticvalue_p.h.

References value().

Referenced by QV4::PersistentValueStorage::allocate(), QV4::SparseArrayData::allocate(), QV4::CallData::argc(), QV4::Value::asArrayLength(), asDouble(), booleanValue(), QV4::Runtime::CompareEqual::call(), QV4::Runtime::TailCall::call(), compareEqualInt(), integerValue(), isPositiveInt(), QV4::Value::sameValue(), QV4::Value::sameValueZero(), toBoolean(), toInt32(), QV4::Value::toNumber(), and QV4::Value::toPropertyKey().

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

◆ integerCompatible() [1/2]

bool QV4::StaticValue::integerCompatible ( ) const
inline

Definition at line 330 of file qv4staticvalue_p.h.

References _val, isEmpty(), IsIntegerConvertible_Shift, IsIntegerConvertible_Value, and Q_ASSERT.

Referenced by QV4::Moth::VME::interpret(), toBoolean(), QV4::Value::toUInt16(), and tryIntegerConversion().

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

◆ integerCompatible() [2/2]

static bool QV4::StaticValue::integerCompatible ( StaticValue a,
StaticValue b )
inlinestatic

Definition at line 335 of file qv4staticvalue_p.h.

◆ integerValue()

int QV4::StaticValue::integerValue ( ) const
inline

Definition at line 410 of file qv4staticvalue_p.h.

References int_32().

Referenced by QV4::Runtime::CompareGreaterThan::call(), QV4::Runtime::CompareLessThan::call(), QV4::Runtime::CompareGreaterEqual::call(), QV4::Runtime::CompareLessEqual::call(), QV4::MathObject::method_abs(), QQmlVMEMetaObject::readPropertyAsInt(), QJSManagedValue::toPrimitive(), QV4::Value::toUInt16(), and QJSManagedValue::toVariant().

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

◆ isBoolean()

bool QV4::StaticValue::isBoolean ( ) const
inline

Definition at line 284 of file qv4staticvalue_p.h.

References Boolean, and tag().

Referenced by QV4::PromisePrototype::method_catch(), QV4::ObjectPrototype::method_toString(), QJSManagedValue::prototype(), QQmlVMEMetaObject::readPropertyAsBool(), ListModel::set(), ListModel::set(), QJSManagedValue::toPrimitive(), QJSManagedValue::toVariant(), QJSManagedValue::type(), and value().

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

◆ isDouble()

bool QV4::StaticValue::isDouble ( ) const
inline

Definition at line 289 of file qv4staticvalue_p.h.

References _val, DoubleDiscriminator, and DoubleMask.

Referenced by QV4::Value::convertedToNumber(), doubleValue(), isInt32(), QV4::PromisePrototype::method_catch(), QQmlVMEMetaObject::readPropertyAsDouble(), QV4::Value::sameValue(), QV4::Value::sameValueZero(), setDouble(), and QV4::Value::toNumber().

+ Here is the caller graph for this function:

◆ isEmpty()

bool QV4::StaticValue::isEmpty ( ) const
inline

Definition at line 282 of file qv4staticvalue_p.h.

References Empty, and tag().

Referenced by QV4::Runtime::CreateClass::call(), QV4::Property::completed(), QV4::SimpleArrayData::del(), QV4::Property::fullyPopulated(), integerCompatible(), QV4::SimpleArrayData::pop_front(), and QV4::SimpleArrayData::truncate().

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

◆ isInt32() [1/2]

bool QV4::StaticValue::isInt32 ( )
inline

Definition at line 382 of file qv4staticvalue_p.h.

References d, doubleValue(), Integer, isDouble(), isInt32(), setInt_32(), and tag().

Referenced by isInt32(), and QQmlVMEMetaObject::readPropertyAsInt().

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

◆ isInt32() [2/2]

static QV4_NEARLY_ALWAYS_INLINE bool QV4::StaticValue::isInt32 ( double d)
inlinestatic

Definition at line 395 of file qv4staticvalue_p.h.

References d, and i.

◆ isInteger()

bool QV4::StaticValue::isInteger ( ) const
inline

◆ isIntOrBool()

bool QV4::StaticValue::isIntOrBool ( ) const
inline

Definition at line 323 of file qv4staticvalue_p.h.

References _val, IsIntegerOrBool_Shift, and IsIntegerOrBool_Value.

◆ isManaged()

bool QV4::StaticValue::isManaged ( ) const
inline

Definition at line 318 of file qv4staticvalue_p.h.

References isManagedOrUndefined(), and isUndefined().

Referenced by QV4::Value::as(), QV4::Value::sameValue(), QV4::Value::sameValueZero(), QV4::Value::toQString(), QV4::Value::toQString(), and QV4::Value::toQStringNoThrow().

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

◆ isManagedOrUndefined()

bool QV4::StaticValue::isManagedOrUndefined ( ) const
inline

Definition at line 315 of file qv4staticvalue_p.h.

References _val, and ManagedMask.

Referenced by compareEqualInt(), isManaged(), and toBoolean().

+ Here is the caller graph for this function:

◆ isNaN()

bool QV4::StaticValue::isNaN ( ) const
inline

Definition at line 343 of file qv4staticvalue_p.h.

References MinusNaN, NaN, and tag().

Referenced by QV4::Runtime::CompareEqual::call(), and setDouble().

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

◆ isNull()

bool QV4::StaticValue::isNull ( ) const
inline

Definition at line 283 of file qv4staticvalue_p.h.

References Null, and tag().

Referenced by QV4::Runtime::CompareEqual::call(), QV4::Runtime::CreateClass::call(), getThisString(), QQmlDelegateModelPrivate::insert(), QJSManagedValue::isNull(), isNullOrUndefined(), QQmlVMEMetaObject::metaCall(), QV4::ObjectPrototype::method_set_proto(), QV4::ObjectPrototype::method_setPrototypeOf(), QV4::Reflect::method_setPrototypeOf(), QV4::ObjectPrototype::method_toString(), ListModel::set(), QJSManagedValue::toPrimitive(), QJSManagedValue::toVariant(), QV4::ObjectCtor::virtualCall(), and QV4::ObjectCtor::virtualCallAsConstructor().

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

◆ isNullOrUndefined()

bool QV4::StaticValue::isNullOrUndefined ( ) const
inline

◆ isNumber()

◆ isPositiveInt()

bool QV4::StaticValue::isPositiveInt ( ) const
inline

Definition at line 354 of file qv4staticvalue_p.h.

References int_32(), and isInteger().

+ Here is the call graph for this function:

◆ isUndefined()

bool QV4::StaticValue::isUndefined ( ) const
inline

Definition at line 287 of file qv4staticvalue_p.h.

References _val.

Referenced by QV4::Runtime::CompareEqual::call(), compareEqualInt(), QV4::ErrorObject::create(), QV4::ErrorObject::create(), getThisString(), QV4::QObjectSlotDispatcher::impl(), isManaged(), isNullOrUndefined(), QV4::IntrinsicTypedArrayPrototype::method_copyWithin(), QV4::ObjectPrototype::method_defineGetter(), QV4::ObjectPrototype::method_defineSetter(), QV4::IntrinsicTypedArrayPrototype::method_fill(), QV4::IntrinsicTypedArrayPrototype::method_includes(), QV4::StringPrototype::method_padEnd(), QV4::StringPrototype::method_padStart(), QV4::StringPrototype::method_slice(), QV4::IntrinsicTypedArrayPrototype::method_slice(), QV4::IntrinsicTypedArrayPrototype::method_subarray(), QV4::NumberPrototype::method_toExponential(), QV4::ObjectPrototype::method_toString(), QV4::Object::setProtoFromNewTarget(), QV4::SharedArrayBufferPrototype::slice(), QV4::Object::speciesConstructor(), QJSManagedValue::strictlyEquals(), QV4::throwPropertyIsNotAFunctionTypeError(), QJSManagedValue::toPrimitive(), QJSManagedValue::toVariant(), type(), QJSManagedValue::type(), QV4::ObjectCtor::virtualCall(), QV4::SharedArrayBufferCtor::virtualCallAsConstructor(), QV4::DataViewCtor::virtualCallAsConstructor(), QV4::ObjectCtor::virtualCallAsConstructor(), QV4::RegExpCtor::virtualCallAsConstructor(), and QV4::TypedArrayCtor::virtualCallAsConstructor().

+ Here is the caller graph for this function:

◆ nullValue()

static constexpr StaticValue QV4::StaticValue::nullValue ( )
inlinestaticconstexpr

Definition at line 459 of file qv4staticvalue_p.h.

References Null, and tagValue().

+ Here is the call graph for this function:

◆ operator=() [1/4]

template<typename Managed >
StaticValue & QV4::StaticValue::operator= ( const Managed & m)
inline

Definition at line 241 of file qv4value_p.h.

◆ operator=() [2/4]

template<typename Value >
StaticValue & QV4::StaticValue::operator= ( const Value & )

◆ operator=() [3/4]

template<>
StaticValue & QV4::StaticValue::operator= ( const Value & value)
inline

Definition at line 234 of file qv4value_p.h.

References _val.

◆ operator=() [4/4]

StaticValue & QV4::StaticValue::operator= ( ReturnedValue v)
inline

Definition at line 51 of file qv4staticvalue_p.h.

References _val.

◆ quickType()

quint64 QV4::StaticValue::quickType ( ) const
inline

Definition at line 279 of file qv4staticvalue_p.h.

References _val, and QuickType_Shift.

Referenced by QV4::Runtime::CompareEqual::call(), and compareEqualInt().

+ Here is the caller graph for this function:

◆ rawValue()

QV4_NEARLY_ALWAYS_INLINE constexpr quint64 QV4::StaticValue::rawValue ( ) const
inlineconstexpr

Definition at line 129 of file qv4staticvalue_p.h.

References _val.

Referenced by QV4::Scoped< T >::asReturnedValue(), QV4::StringCtor::method_raw(), QV4::Value::operator=(), and QV4::Value::operator=().

+ Here is the caller graph for this function:

◆ rawValueRef()

QV4_NEARLY_ALWAYS_INLINE constexpr quint64 & QV4::StaticValue::rawValueRef ( )
inlineconstexpr

Definition at line 128 of file qv4staticvalue_p.h.

References _val.

◆ setDouble()

QV4_NEARLY_ALWAYS_INLINE void QV4::StaticValue::setDouble ( double d)
inline

Definition at line 366 of file qv4staticvalue_p.h.

References _val, d, EncodeMask, isDouble(), isNaN(), NaN, Q_ASSERT, qt_is_nan(), and Tag_Shift.

Referenced by QV4::Value::convertedToNumber(), and fromDouble().

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

◆ setEmpty()

QV4_NEARLY_ALWAYS_INLINE constexpr void QV4::StaticValue::setEmpty ( )
inlineconstexpr

Definition at line 155 of file qv4staticvalue_p.h.

References Empty, and setTagValue().

Referenced by QV4::ArrayData::realloc().

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

◆ setInt_32()

QV4_NEARLY_ALWAYS_INLINE constexpr void QV4::StaticValue::setInt_32 ( int i)
inlineconstexpr

Definition at line 149 of file qv4staticvalue_p.h.

References i, Integer, and setTagValue().

Referenced by QV4::PropertyKey::fromArrayIndex(), isInt32(), and QV4::CallData::setArgc().

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

◆ setRawValue()

QV4_NEARLY_ALWAYS_INLINE constexpr void QV4::StaticValue::setRawValue ( quint64 raw)
inlineconstexpr

Definition at line 130 of file qv4staticvalue_p.h.

References _val.

Referenced by QV4::Scoped< T >::Scoped(), QV4::Scoped< T >::Scoped(), QV4::ScopedValue::ScopedValue(), QV4::ScopedValue::ScopedValue(), QV4::ScopedValue::ScopedValue(), QV4::IntrinsicTypedArrayPrototype::method_set(), QV4::ScopedValue::operator=(), and QV4::TypedArrayCtor::virtualCallAsConstructor().

+ Here is the caller graph for this function:

◆ setTag()

QV4_NEARLY_ALWAYS_INLINE constexpr void QV4::StaticValue::setTag ( quint32 tag)
inlineconstexpr

Definition at line 143 of file qv4staticvalue_p.h.

References setTagValue(), tag(), and value().

+ Here is the call graph for this function:

◆ setTagValue()

QV4_NEARLY_ALWAYS_INLINE constexpr void QV4::StaticValue::setTagValue ( quint32 tag,
quint32 value )
inlineconstexpr

Definition at line 140 of file qv4staticvalue_p.h.

References _val, tag(), Tag_Shift, and value().

Referenced by fromUInt32(), setEmpty(), setInt_32(), setTag(), and tryIntegerConversion().

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

◆ tag()

QV4_NEARLY_ALWAYS_INLINE constexpr quint32 QV4::StaticValue::tag ( ) const
inlineconstexpr

Definition at line 142 of file qv4staticvalue_p.h.

References _val, and Tag_Shift.

Referenced by asDouble(), isBoolean(), isEmpty(), isInt32(), isInteger(), isNaN(), isNull(), setTag(), setTagValue(), tagValue(), and type().

+ Here is the caller graph for this function:

◆ tagBitMask()

static constexpr quint64 QV4::StaticValue::tagBitMask ( TagBit bit)
inlinestaticconstexpr

Definition at line 176 of file qv4staticvalue_p.h.

References Tag_Shift.

Referenced by type().

+ Here is the caller graph for this function:

◆ tagOffset()

static int QV4::StaticValue::tagOffset ( )
inlinestatic

Definition at line 134 of file qv4staticvalue_p.h.

◆ tagValue()

static constexpr quint64 QV4::StaticValue::tagValue ( quint32 tag,
quint32 value )
inlinestaticconstexpr

Definition at line 139 of file qv4staticvalue_p.h.

References tag(), Tag_Shift, and value().

Referenced by emptyValue(), fromBoolean(), fromInt32(), and nullValue().

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

◆ toBoolean()

bool QV4::StaticValue::toBoolean ( ) const
inline

Definition at line 421 of file qv4staticvalue_p.h.

References d, doubleValue(), int_32(), integerCompatible(), and isManagedOrUndefined().

+ Here is the call graph for this function:

◆ toInt32() [1/2]

int QV4::StaticValue::toInt32 ( ) const
inline

Definition at line 433 of file qv4staticvalue_p.h.

References Boolean_Type, Double_Type, doubleValue(), Empty_Type, int_32(), Integer_Type, Managed_Type, Null_Type, type(), and Undefined_Type.

Referenced by toUInt32().

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

◆ toInt32() [2/2]

static int QV4::StaticValue::toInt32 ( double d)
inlinestatic

Definition at line 488 of file qv4staticvalue_p.h.

References d.

◆ toInteger()

static double QV4::StaticValue::toInteger ( double d)
inlinestatic

Definition at line 479 of file qv4staticvalue_p.h.

References d.

◆ toUInt32()

static unsigned int QV4::StaticValue::toUInt32 ( double d)
inlinestatic

Definition at line 493 of file qv4staticvalue_p.h.

References d, and toInt32().

+ Here is the call graph for this function:

◆ tryIntegerConversion()

bool QV4::StaticValue::tryIntegerConversion ( )
inline

Definition at line 414 of file qv4staticvalue_p.h.

References Integer, integerCompatible(), setTagValue(), and value().

+ Here is the call graph for this function:

◆ type()

Type QV4::StaticValue::type ( ) const
inline

Definition at line 256 of file qv4staticvalue_p.h.

References _val, Boolean_Type, Double_Type, DoubleDiscriminator, DoubleMask, Empty_Type, Integer_Type, isUndefined(), Managed_Type, Null_Type, Q_ASSERT, ret, tag(), tagBitMask(), Undefined_Type, and Unmanaged.

Referenced by QV4::ExecutionContext::asCallContext(), QV4::ExecutionContext::asCallContext(), QV4::QQmlTypeWrapper::lookupSingletonMethod(), QV4::ExecutionContext::newBlockContext(), QV4::numDefinedArguments(), QV4::ArrayData::sort(), toInt32(), and QV4::QQmlScopedEnumWrapper::virtualGet().

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

◆ uint_32()

QV4_NEARLY_ALWAYS_INLINE uint QV4::StaticValue::uint_32 ( ) const
inline

Definition at line 153 of file qv4staticvalue_p.h.

References value().

+ Here is the call graph for this function:

◆ undefinedValue()

static constexpr StaticValue QV4::StaticValue::undefinedValue ( )
inlinestaticconstexpr

Definition at line 458 of file qv4staticvalue_p.h.

Referenced by QV4::CallData::argument(), and QV4::PropertyKey::invalid().

+ Here is the caller graph for this function:

◆ value()

◆ valueOffset()

static int QV4::StaticValue::valueOffset ( )
inlinestatic

Definition at line 133 of file qv4staticvalue_p.h.

Member Data Documentation

◆ _val

◆ DoubleDiscriminator

constexpr quint64 QV4::StaticValue::DoubleDiscriminator = ((quint64(TagBit::Unmanaged) | quint64(TagBit::Special)) << Tag_Shift)
staticconstexpr

Definition at line 222 of file qv4staticvalue_p.h.

Referenced by isDouble(), and type().

◆ DoubleMask

constexpr quint64 QV4::StaticValue::DoubleMask = ManagedMask | quint64(TagBit::Special) << Tag_Shift
staticconstexpr

Definition at line 215 of file qv4staticvalue_p.h.

Referenced by isDouble(), and type().

◆ EncodeMask

constexpr quint64 QV4::StaticValue::EncodeMask = DoubleMask | NumberMask
staticconstexpr

Definition at line 220 of file qv4staticvalue_p.h.

Referenced by doubleValue(), and setDouble().

◆ ExponentMask

constexpr quint64 QV4::StaticValue::ExponentMask = 0b0111111111110000ull << 48
staticconstexpr

Definition at line 208 of file qv4staticvalue_p.h.

◆ IntCompatMask

constexpr quint64 QV4::StaticValue::IntCompatMask = ManagedMask | quint64(TagBit::IntCompat) << Tag_Shift
staticconstexpr

Definition at line 218 of file qv4staticvalue_p.h.

◆ IntOrBoolMask

constexpr quint64 QV4::StaticValue::IntOrBoolMask = ManagedMask | quint64(TagBit::IntOrBool) << Tag_Shift
staticconstexpr

Definition at line 217 of file qv4staticvalue_p.h.

◆ Lower5Mask

constexpr quint64 QV4::StaticValue::Lower5Mask = 0b0000000000011111ull
staticconstexpr

Definition at line 212 of file qv4staticvalue_p.h.

◆ ManagedMask

constexpr quint64 QV4::StaticValue::ManagedMask = ExponentMask | quint64(TagBit::Unmanaged) << Tag_Shift
staticconstexpr

Definition at line 214 of file qv4staticvalue_p.h.

Referenced by isManagedOrUndefined().

◆ NumberDiscriminator

constexpr quint64 QV4::StaticValue::NumberDiscriminator = ((quint64(TagBit::Unmanaged) | quint64(TagBit::Number)) << Tag_Shift)
staticconstexpr

Definition at line 224 of file qv4staticvalue_p.h.

Referenced by isNumber().

◆ NumberMask

constexpr quint64 QV4::StaticValue::NumberMask = ManagedMask | quint64(TagBit::Number) << Tag_Shift
staticconstexpr

Definition at line 216 of file qv4staticvalue_p.h.

Referenced by isNumber().

◆ Top1Mask

constexpr quint64 QV4::StaticValue::Top1Mask = 0b1000000000000000ull << 48
staticconstexpr

Definition at line 210 of file qv4staticvalue_p.h.

◆ Upper3Mask

constexpr quint64 QV4::StaticValue::Upper3Mask = 0b0000000000001110ull << 48
staticconstexpr

Definition at line 211 of file qv4staticvalue_p.h.


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