diff options
author | Lars Knoll <[email protected]> | 2014-01-24 22:55:39 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2014-01-31 11:13:48 +0100 |
commit | a78a48c5328ea746dfd161599894a4a5b11041bd (patch) | |
tree | 1e38f4334a8e3efdb5761d862baaa465141bf543 /src/qml/jsruntime/qv4functionobject.cpp | |
parent | d96478044ae0dfbcc35113e3941aa79604ba83a0 (diff) |
Cleanups
Remove SafeValue, it was used to port over to an exact GC. Since
we now have that, we can now safely merge it with QV4::Value
again. Also rename SafeString to StringValue for better naming
consistency.
Change-Id: I8553d1bec5134c53996f6b0d758738a0ec8a2e4d
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index a6ed03cea8..a3e47c42ca 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -352,7 +352,7 @@ ReturnedValue FunctionPrototype::method_apply(CallContext *ctx) } else { int alen = qMin(len, arr->arrayData->length()); if (alen) - memcpy(callData->args, arr->arrayData->data, alen*sizeof(SafeValue)); + memcpy(callData->args, arr->arrayData->data, alen*sizeof(Value)); for (quint32 i = alen; i < len; ++i) callData->args[i] = Primitive::undefinedValue(); } @@ -387,7 +387,7 @@ ReturnedValue FunctionPrototype::method_bind(CallContext *ctx) return ctx->throwTypeError(); ScopedValue boundThis(scope, ctx->argument(0)); - QVector<SafeValue> boundArgs; + QVector<Value> boundArgs; for (int i = 1; i < ctx->callData->argc; ++i) boundArgs += ctx->callData->args[i]; @@ -643,7 +643,7 @@ DEFINE_OBJECT_VTABLE(IndexedBuiltinFunction); DEFINE_OBJECT_VTABLE(BoundFunction); -BoundFunction::BoundFunction(ExecutionContext *scope, FunctionObjectRef target, const ValueRef boundThis, const QVector<SafeValue> &boundArgs) +BoundFunction::BoundFunction(ExecutionContext *scope, FunctionObjectRef target, const ValueRef boundThis, const QVector<Value> &boundArgs) : FunctionObject(scope, QStringLiteral("__bound function__")) , target(target) , boundArgs(boundArgs) @@ -683,8 +683,8 @@ ReturnedValue BoundFunction::call(Managed *that, CallData *dd) ScopedCallData callData(scope, f->boundArgs.size() + dd->argc); callData->thisObject = f->boundThis; - memcpy(callData->args, f->boundArgs.constData(), f->boundArgs.size()*sizeof(SafeValue)); - memcpy(callData->args + f->boundArgs.size(), dd->args, dd->argc*sizeof(SafeValue)); + memcpy(callData->args, f->boundArgs.constData(), f->boundArgs.size()*sizeof(Value)); + memcpy(callData->args + f->boundArgs.size(), dd->args, dd->argc*sizeof(Value)); return f->target->call(callData); } @@ -696,8 +696,8 @@ ReturnedValue BoundFunction::construct(Managed *that, CallData *dd) return Encode::undefined(); ScopedCallData callData(scope, f->boundArgs.size() + dd->argc); - memcpy(callData->args, f->boundArgs.constData(), f->boundArgs.size()*sizeof(SafeValue)); - memcpy(callData->args + f->boundArgs.size(), dd->args, dd->argc*sizeof(SafeValue)); + memcpy(callData->args, f->boundArgs.constData(), f->boundArgs.size()*sizeof(Value)); + memcpy(callData->args + f->boundArgs.size(), dd->args, dd->argc*sizeof(Value)); return f->target->construct(callData); } |