diff options
Diffstat (limited to 'src/qml/jit/qv4jithelpers.cpp')
-rw-r--r-- | src/qml/jit/qv4jithelpers.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/jit/qv4jithelpers.cpp b/src/qml/jit/qv4jithelpers.cpp index f644d8c782..23e3095a85 100644 --- a/src/qml/jit/qv4jithelpers.cpp +++ b/src/qml/jit/qv4jithelpers.cpp @@ -69,6 +69,15 @@ ReturnedValue loadGlobalLookup(ExecutionEngine *engine, Function *f, int index) return l->globalGetter(l, engine); } +ReturnedValue loadSuperConstructor(ExecutionEngine *engine, const Value *t) +{ + if (!t->isObject()) { + engine->throwTypeError(); + return Encode::undefined(); + } + return static_cast<const Object *>(t)->getPrototypeOf()->asReturnedValue(); +} + ReturnedValue toObject(ExecutionEngine *engine, const Value &obj) { if (obj.isObject()) |