diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-29 14:25:09 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-29 18:10:52 +0000 |
commit | b6018a8167b23988542100312b4f2cd126c41700 (patch) | |
tree | 2e55d759b2996f96c1fae84d2abc42ff83030f8c /src/qml/jit | |
parent | 123f01df338972e2253ae2ab993027755695ceea (diff) |
Initialize this to empty for derived constructors
As per spec, this should be uninitialized in derived
constructors, and the base constructor needs to get
called exactly once.
Change-Id: If31804e58d7ba62efde8fbf6cd852674f8da4495
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jit')
-rw-r--r-- | src/qml/jit/qv4baselinejit.cpp | 2 | ||||
-rw-r--r-- | src/qml/jit/qv4jithelpers.cpp | 10 | ||||
-rw-r--r-- | src/qml/jit/qv4jithelpers_p.h | 1 |
3 files changed, 1 insertions, 12 deletions
diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp index e9f85a5c6b..36375461f9 100644 --- a/src/qml/jit/qv4baselinejit.cpp +++ b/src/qml/jit/qv4baselinejit.cpp @@ -815,7 +815,7 @@ void BaselineJIT::generate_LoadSuperConstructor() as->prepareCallWithArgCount(2); as->passJSSlotAsArg(CallData::Function, 1); as->passEngineAsArg(0); - BASELINEJIT_GENERATE_RUNTIME_CALL(Helpers::loadSuperConstructor, CallResultDestination::InAccumulator); + BASELINEJIT_GENERATE_RUNTIME_CALL(Runtime::method_loadSuperConstructor, CallResultDestination::InAccumulator); as->checkException(); } diff --git a/src/qml/jit/qv4jithelpers.cpp b/src/qml/jit/qv4jithelpers.cpp index 9e057dd33d..7bac5d968d 100644 --- a/src/qml/jit/qv4jithelpers.cpp +++ b/src/qml/jit/qv4jithelpers.cpp @@ -70,16 +70,6 @@ ReturnedValue loadGlobalLookup(ExecutionEngine *engine, Function *f, int index) return l->globalGetter(l, engine); } -ReturnedValue loadSuperConstructor(ExecutionEngine *engine, const Value *t) -{ - const FunctionObject *f = t->as<FunctionObject>(); - if (!f || !f->isConstructor()) { - engine->throwTypeError(); - return Encode::undefined(); - } - return static_cast<const Object *>(t)->getPrototypeOf()->asReturnedValue(); -} - ReturnedValue toObject(ExecutionEngine *engine, const Value &obj) { if (obj.isObject()) diff --git a/src/qml/jit/qv4jithelpers_p.h b/src/qml/jit/qv4jithelpers_p.h index e0dfdc47d9..bb10d5722b 100644 --- a/src/qml/jit/qv4jithelpers_p.h +++ b/src/qml/jit/qv4jithelpers_p.h @@ -66,7 +66,6 @@ namespace Helpers { void convertThisToObject(ExecutionEngine *engine, Value *t); ReturnedValue loadGlobalLookup(ExecutionEngine *engine, Function *f, int index); -ReturnedValue loadSuperConstructor(ExecutionEngine *engine, const Value *t); ReturnedValue toObject(ExecutionEngine *engine, const Value &obj); ReturnedValue exp(const Value &base, const Value &exp); ReturnedValue getLookup(ExecutionEngine *engine, Function *f, int index, const Value &base); |