diff options
author | Lars Knoll <lars.knoll@digia.com> | 2012-10-17 09:05:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 09:35:39 +0200 |
commit | f5b98f63862d4f36774d6baea5d3789350844e04 (patch) | |
tree | 50a59c6cceea4f154a9c83365b5f10f167606769 /qmljs_runtime.cpp | |
parent | 951990255e4a6909a5b2f652ac1c651848d2877c (diff) |
Generate correct code when calling values
__qmljs_call_value was still using a pointer to a Value.
In addition, qcv4isel_masm.cpp was using a wrong order
of the arguments.
Change-Id: I0414aa732ae8074420e4f11525f5b04712cc1bab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'qmljs_runtime.cpp')
-rw-r--r-- | qmljs_runtime.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qmljs_runtime.cpp b/qmljs_runtime.cpp index 94c2bc299c..73391159f2 100644 --- a/qmljs_runtime.cpp +++ b/qmljs_runtime.cpp @@ -809,14 +809,14 @@ Value __qmljs_object_default_value(Context *ctx, const Value object, int typeHin Value conv = oo->getProperty(ctx, meth1); if (!conv.isUndefined() && conv.isFunctionObject()) { - Value r = __qmljs_call_value(ctx, object, &conv, 0, 0); + Value r = __qmljs_call_value(ctx, object, conv, 0, 0); if (r.isPrimitive()) return r; } conv = oo->getProperty(ctx, meth2); if (!conv.isUndefined() && conv.isFunctionObject()) { - Value r = __qmljs_call_value(ctx, object, &conv, 0, 0); + Value r = __qmljs_call_value(ctx, object, conv, 0, 0); if (r.isPrimitive()) return r; } @@ -1074,7 +1074,7 @@ Value __qmljs_call_activation_property(Context *context, String *name, Value *ar context->throwReferenceError(Value::fromString(name)); return Value::undefinedValue(); } - Value result = __qmljs_call_value(context, Value::undefinedValue(), func, args, argc); + Value result = __qmljs_call_value(context, Value::undefinedValue(), *func, args, argc); return result; } @@ -1111,10 +1111,10 @@ Value __qmljs_call_property(Context *context, const Value base, String *name, Va return result; } -Value __qmljs_call_value(Context *context, const Value thisObject, const Value *func, Value *args, int argc) +Value __qmljs_call_value(Context *context, const Value thisObject, const Value func, Value *args, int argc) { Value result; - if (FunctionObject *f = func->asFunctionObject()) { + if (FunctionObject *f = func.asFunctionObject()) { Context k; Context *ctx = f->needsActivation ? context->engine->newContext() : &k; const Value *that = thisObject.isUndefined() ? 0 : &thisObject; |