diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-02 21:41:58 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-05 22:23:25 +0100 |
commit | 83947c254485f59f1660b172bddd190995353d81 (patch) | |
tree | 10f41c74fc45d968a86ccff28e37954ec201cc93 /src/qml/jsruntime/qv4runtime.cpp | |
parent | 9ca52f32e965c45c912a2dd2de34339087aba338 (diff) |
Smaller optimisations
Change-Id: Idb35d57801472e73b4e77b83e129dbb2a484b734
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 22af24e527..75af118090 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -892,14 +892,13 @@ ReturnedValue __qmljs_call_property(ExecutionContext *context, const StringRef n ReturnedValue __qmljs_call_property_lookup(ExecutionContext *context, uint index, CallDataRef callData) { - Scope scope(context); - Lookup *l = context->lookups + index; - Scoped<Object> o(scope, l->getter(l, callData->thisObject)); - if (!o) + SafeValue v; + v = l->getter(l, callData->thisObject); + if (!v.isManaged()) return context->throwTypeError(); - return o->call(callData); + return v.managed()->call(callData); } ReturnedValue __qmljs_call_element(ExecutionContext *context, const ValueRef index, CallDataRef callData) @@ -921,11 +920,10 @@ ReturnedValue __qmljs_call_element(ExecutionContext *context, const ValueRef ind ReturnedValue __qmljs_call_value(ExecutionContext *context, const ValueRef func, CallDataRef callData) { - Object *o = func->asObject(); - if (!o) + if (!func->isManaged()) return context->throwTypeError(); - return o->call(callData); + return func->managed()->call(callData); } |