aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r--src/qml/jsruntime/qv4object.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 78b963e12d..e0c8974440 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -135,7 +135,7 @@ ReturnedValue Object::getValue(const ValueRef thisObject, const Property *p, Pro
return p->value.asReturnedValue();
FunctionObject *getter = p->getter();
if (!getter)
- return Value::undefinedValue().asReturnedValue();
+ return Primitive::undefinedValue().asReturnedValue();
Scope scope(getter->engine());
ScopedCallData callData(scope, 0);
@@ -235,7 +235,7 @@ void Object::defineDefaultProperty(const QString &name, ReturnedValue (*code)(Si
Scope scope(e);
ScopedString s(scope, e->newIdentifier(name));
Scoped<FunctionObject> function(scope, e->newBuiltinFunction(e->rootContext, s, code));
- function->defineReadonlyProperty(e->id_length, Value::fromInt32(argumentCount));
+ function->defineReadonlyProperty(e->id_length, Primitive::fromInt32(argumentCount));
defineDefaultProperty(s, function.asValue());
}
@@ -244,7 +244,7 @@ void Object::defineDefaultProperty(const StringRef name, ReturnedValue (*code)(S
ExecutionEngine *e = engine();
Scope scope(e);
Scoped<FunctionObject> function(scope, e->newBuiltinFunction(e->rootContext, name, code));
- function->defineReadonlyProperty(e->id_length, Value::fromInt32(argumentCount));
+ function->defineReadonlyProperty(e->id_length, Primitive::fromInt32(argumentCount));
defineDefaultProperty(name, function.asValue());
}
@@ -538,7 +538,7 @@ ReturnedValue Object::getLookup(Managed *m, Lookup *l)
return o->getValue(p, attrs);
}
}
- return Value::undefinedValue().asReturnedValue();
+ return Primitive::undefinedValue().asReturnedValue();
}
void Object::setLookup(Managed *m, Lookup *l, const ValueRef value)
@@ -710,7 +710,7 @@ ReturnedValue Object::internalGetIndexed(uint index, bool *hasProperty)
if (hasProperty)
*hasProperty = false;
- return Value::undefinedValue().asReturnedValue();
+ return Primitive::undefinedValue().asReturnedValue();
}
@@ -902,7 +902,7 @@ bool Object::internalDeleteIndexedProperty(uint index)
return true;
if (!arrayAttributes || arrayAttributes[pidx].isConfigurable()) {
- arrayData[pidx].value = Value::undefinedValue();
+ arrayData[pidx].value = Primitive::undefinedValue();
if (!arrayAttributes)
ensureArrayAttributes();
arrayAttributes[pidx].clear();
@@ -1061,7 +1061,7 @@ bool Object::__defineOwnProperty__(ExecutionContext *ctx, Property *current, con
// 9c
cattrs.setType(PropertyAttributes::Data);
cattrs.setWritable(false);
- current->value = Value::undefinedValue();
+ current->value = Primitive::undefinedValue();
}
} else if (cattrs.isData() && attrs.isData()) { // clause 10
if (!cattrs.isConfigurable() && !cattrs.isWritable()) {
@@ -1293,12 +1293,12 @@ void Object::initSparse()
arrayAlloc += off;
int o = off;
for (int i = 0; i < o - 1; ++i) {
- arrayData[i].value = Value::fromInt32(i + 1);
+ arrayData[i].value = Primitive::fromInt32(i + 1);
}
- arrayData[o - 1].value = Value::fromInt32(arrayDataLen + off);
+ arrayData[o - 1].value = Primitive::fromInt32(arrayDataLen + off);
}
for (int i = arrayDataLen + off; i < arrayAlloc; ++i) {
- arrayData[i].value = Value::fromInt32(i + 1);
+ arrayData[i].value = Primitive::fromInt32(i + 1);
}
}
}
@@ -1327,7 +1327,7 @@ void Object::arrayReserve(uint n)
if (sparseArray) {
for (uint i = arrayFreeList; i < arrayAlloc; ++i) {
arrayData[i].value = Value::emptyValue();
- arrayData[i].value = Value::fromInt32(i + 1);
+ arrayData[i].value = Primitive::fromInt32(i + 1);
}
} else {
arrayOffset = 0;
@@ -1460,7 +1460,7 @@ ArrayObject::ArrayObject(ExecutionEngine *engine, const QStringList &list)
void ArrayObject::init(ExecutionEngine *engine)
{
type = Type_ArrayObject;
- memberData[LengthPropertyIndex].value = Value::fromInt32(0);
+ memberData[LengthPropertyIndex].value = Primitive::fromInt32(0);
}
QStringList ArrayObject::toQStringList() const