aboutsummaryrefslogtreecommitdiffstats
path: root/src/v4/qv4runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4/qv4runtime.cpp')
-rw-r--r--src/v4/qv4runtime.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/v4/qv4runtime.cpp b/src/v4/qv4runtime.cpp
index b6a7dd6c99..8aac271f91 100644
--- a/src/v4/qv4runtime.cpp
+++ b/src/v4/qv4runtime.cpp
@@ -721,9 +721,14 @@ void __qmljs_get_activation_property(ExecutionContext *ctx, Value *result, Strin
*result = ctx->getProperty(name);
}
+void __qmljs_get_global_lookup(ExecutionContext *ctx, Value *result, int lookupIndex)
+{
+ Lookup *l = ctx->lookups + lookupIndex;
+ l->lookupGlobal(l, ctx, result);
+}
+
void __qmljs_get_property_lookup(ExecutionContext *ctx, Value *result, const Value &object, int lookupIndex)
{
- Value res;
Lookup *l = ctx->lookups + lookupIndex;
l->lookupProperty(l, ctx, result, object);
}
@@ -820,6 +825,31 @@ Bool __qmljs_strict_equal(const Value &x, const Value &y, ExecutionContext *ctx)
return false;
}
+
+void __qmljs_call_global_lookup(ExecutionContext *context, Value *result, uint index, Value *args, int argc)
+{
+ Lookup *l = context->lookups + index;
+ Value v;
+ l->lookupGlobal(l, context, &v);
+ FunctionObject *o = v.asFunctionObject();
+ if (!o)
+ context->throwTypeError();
+
+ Value thisObject = Value::undefinedValue();
+
+ if (o == context->engine->evalFunction && l->name->isEqualTo(context->engine->id_eval)) {
+ Value res = static_cast<EvalFunction *>(o)->evalCall(context, thisObject, args, argc, true);
+ if (result)
+ *result = res;
+ return;
+ }
+
+ Value res = o->call(context, thisObject, args, argc);
+ if (result)
+ *result = res;
+}
+
+
void __qmljs_call_activation_property(ExecutionContext *context, Value *result, String *name, Value *args, int argc)
{
Object *base;