aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-10-21 14:49:50 +0200
committerLars Knoll <lars.knoll@qt.io>2017-11-07 09:00:53 +0000
commit3f37847fc3758d66cb16e8e070c29ac5b39dbc7a (patch)
tree238252b16f4a34e9b6e1ae2c23e77030a5063aba /src/qml/jsruntime
parente72306a6f2aeb2bddbb462c205db8fad2fb5a1a4 (diff)
Rename the construct 'virtual' method to callAsConstructor
To make it consistent with the rest of the engine. Change-Id: I57b98fa26134f9864c663f47371ef3e9ca16ac9c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4arraybuffer.cpp4
-rw-r--r--src/qml/jsruntime/qv4arraybuffer_p.h2
-rw-r--r--src/qml/jsruntime/qv4arrayobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4arrayobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4booleanobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4booleanobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4dataview.cpp4
-rw-r--r--src/qml/jsruntime/qv4dataview_p.h2
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4dateobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4errorobject.cpp14
-rw-r--r--src/qml/jsruntime/qv4errorobject_p.h14
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp14
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h10
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4numberobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4object.cpp2
-rw-r--r--src/qml/jsruntime/qv4object_p.h6
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp2
-rw-r--r--src/qml/jsruntime/qv4objectproto_p.h2
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp2
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper_p.h2
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4regexpobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4stringobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4typedarray.cpp4
-rw-r--r--src/qml/jsruntime/qv4typedarray_p.h2
28 files changed, 58 insertions, 58 deletions
diff --git a/src/qml/jsruntime/qv4arraybuffer.cpp b/src/qml/jsruntime/qv4arraybuffer.cpp
index dd29411b46..7a8e1c67b5 100644
--- a/src/qml/jsruntime/qv4arraybuffer.cpp
+++ b/src/qml/jsruntime/qv4arraybuffer.cpp
@@ -52,7 +52,7 @@ void Heap::ArrayBufferCtor::init(QV4::ExecutionContext *scope)
Heap::FunctionObject::init(scope, QStringLiteral("ArrayBuffer"));
}
-ReturnedValue ArrayBufferCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue ArrayBufferCtor::callAsConstructor(const Managed *m, CallData *callData)
{
ExecutionEngine *v4 = m->engine();
Scope scope(v4);
@@ -75,7 +75,7 @@ ReturnedValue ArrayBufferCtor::construct(const Managed *m, CallData *callData)
ReturnedValue ArrayBufferCtor::call(const Managed *that, CallData *callData)
{
- return construct(that, callData);
+ return callAsConstructor(that, callData);
}
ReturnedValue ArrayBufferCtor::method_isView(const BuiltinFunction *, CallData *callData)
diff --git a/src/qml/jsruntime/qv4arraybuffer_p.h b/src/qml/jsruntime/qv4arraybuffer_p.h
index b35324c472..06c65fb01d 100644
--- a/src/qml/jsruntime/qv4arraybuffer_p.h
+++ b/src/qml/jsruntime/qv4arraybuffer_p.h
@@ -78,7 +78,7 @@ struct ArrayBufferCtor: FunctionObject
{
V4_OBJECT2(ArrayBufferCtor, FunctionObject)
- static ReturnedValue construct(const Managed *m, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *m, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
static ReturnedValue method_isView(const BuiltinFunction *, CallData *callData);
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
index 206e3a9fc3..a0dd26ce6c 100644
--- a/src/qml/jsruntime/qv4arrayobject.cpp
+++ b/src/qml/jsruntime/qv4arrayobject.cpp
@@ -55,7 +55,7 @@ void Heap::ArrayCtor::init(QV4::ExecutionContext *scope)
Heap::FunctionObject::init(scope, QStringLiteral("Array"));
}
-ReturnedValue ArrayCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue ArrayCtor::callAsConstructor(const Managed *m, CallData *callData)
{
ExecutionEngine *v4 = static_cast<const ArrayCtor *>(m)->engine();
Scope scope(v4);
@@ -82,7 +82,7 @@ ReturnedValue ArrayCtor::construct(const Managed *m, CallData *callData)
ReturnedValue ArrayCtor::call(const Managed *that, CallData *callData)
{
- return construct(that, callData);
+ return callAsConstructor(that, callData);
}
void ArrayPrototype::init(ExecutionEngine *engine, Object *ctor)
diff --git a/src/qml/jsruntime/qv4arrayobject_p.h b/src/qml/jsruntime/qv4arrayobject_p.h
index 7c4b86dac5..f434d05628 100644
--- a/src/qml/jsruntime/qv4arrayobject_p.h
+++ b/src/qml/jsruntime/qv4arrayobject_p.h
@@ -70,7 +70,7 @@ struct ArrayCtor: FunctionObject
{
V4_OBJECT2(ArrayCtor, FunctionObject)
- static ReturnedValue construct(const Managed *m, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *m, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
};
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp
index d4e02e0356..247f36784b 100644
--- a/src/qml/jsruntime/qv4booleanobject.cpp
+++ b/src/qml/jsruntime/qv4booleanobject.cpp
@@ -50,7 +50,7 @@ void Heap::BooleanCtor::init(QV4::ExecutionContext *scope)
Heap::FunctionObject::init(scope, QStringLiteral("Boolean"));
}
-ReturnedValue BooleanCtor::construct(const Managed *that, CallData *callData)
+ReturnedValue BooleanCtor::callAsConstructor(const Managed *that, CallData *callData)
{
bool n = callData->argc() ? callData->args[0].toBoolean() : false;
return Encode(that->engine()->newBooleanObject(n));
diff --git a/src/qml/jsruntime/qv4booleanobject_p.h b/src/qml/jsruntime/qv4booleanobject_p.h
index 78fe59cc7e..fbdba8d6e4 100644
--- a/src/qml/jsruntime/qv4booleanobject_p.h
+++ b/src/qml/jsruntime/qv4booleanobject_p.h
@@ -70,7 +70,7 @@ struct BooleanCtor: FunctionObject
{
V4_OBJECT2(BooleanCtor, FunctionObject)
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
};
diff --git a/src/qml/jsruntime/qv4dataview.cpp b/src/qml/jsruntime/qv4dataview.cpp
index 73163a9e32..db5b41603e 100644
--- a/src/qml/jsruntime/qv4dataview.cpp
+++ b/src/qml/jsruntime/qv4dataview.cpp
@@ -54,7 +54,7 @@ void Heap::DataViewCtor::init(QV4::ExecutionContext *scope)
Heap::FunctionObject::init(scope, QStringLiteral("DataView"));
}
-ReturnedValue DataViewCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue DataViewCtor::callAsConstructor(const Managed *m, CallData *callData)
{
Scope scope(m->engine());
Scoped<ArrayBuffer> buffer(scope, callData->argument(0));
@@ -78,7 +78,7 @@ ReturnedValue DataViewCtor::construct(const Managed *m, CallData *callData)
ReturnedValue DataViewCtor::call(const Managed *that, CallData *callData)
{
- return construct(that, callData);
+ return callAsConstructor(that, callData);
}
void DataViewPrototype::init(ExecutionEngine *engine, Object *ctor)
diff --git a/src/qml/jsruntime/qv4dataview_p.h b/src/qml/jsruntime/qv4dataview_p.h
index 2d1a5d8be9..56a4c35621 100644
--- a/src/qml/jsruntime/qv4dataview_p.h
+++ b/src/qml/jsruntime/qv4dataview_p.h
@@ -79,7 +79,7 @@ struct DataViewCtor: FunctionObject
{
V4_OBJECT2(DataViewCtor, FunctionObject)
- static ReturnedValue construct(const Managed *m, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *m, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
};
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index 71327ea806..b41fffa399 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -678,7 +678,7 @@ void Heap::DateCtor::init(QV4::ExecutionContext *scope)
Heap::FunctionObject::init(scope, QStringLiteral("Date"));
}
-ReturnedValue DateCtor::construct(const Managed *that, CallData *callData)
+ReturnedValue DateCtor::callAsConstructor(const Managed *that, CallData *callData)
{
double t = 0;
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h
index a1f6dd9a7d..dd0a64086c 100644
--- a/src/qml/jsruntime/qv4dateobject_p.h
+++ b/src/qml/jsruntime/qv4dateobject_p.h
@@ -108,7 +108,7 @@ struct DateCtor: FunctionObject
{
V4_OBJECT2(DateCtor, FunctionObject)
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *);
};
diff --git a/src/qml/jsruntime/qv4errorobject.cpp b/src/qml/jsruntime/qv4errorobject.cpp
index c1724f84ca..91251ced57 100644
--- a/src/qml/jsruntime/qv4errorobject.cpp
+++ b/src/qml/jsruntime/qv4errorobject.cpp
@@ -233,7 +233,7 @@ void Heap::ErrorCtor::init(QV4::ExecutionContext *scope, const QString &name)
Heap::FunctionObject::init(scope, name);
}
-ReturnedValue ErrorCtor::construct(const Managed *that, CallData *callData)
+ReturnedValue ErrorCtor::callAsConstructor(const Managed *that, CallData *callData)
{
Value v = Value::fromReturnedValue(callData->argument(0));
return ErrorObject::create<ErrorObject>(that->engine(), v)->asReturnedValue();
@@ -249,7 +249,7 @@ void Heap::EvalErrorCtor::init(QV4::ExecutionContext *scope)
Heap::ErrorCtor::init(scope, QStringLiteral("EvalError"));
}
-ReturnedValue EvalErrorCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue EvalErrorCtor::callAsConstructor(const Managed *m, CallData *callData)
{
return ErrorObject::create<EvalErrorObject>(m->engine(), callData->args[0])->asReturnedValue();
}
@@ -259,7 +259,7 @@ void Heap::RangeErrorCtor::init(QV4::ExecutionContext *scope)
Heap::ErrorCtor::init(scope, QStringLiteral("RangeError"));
}
-ReturnedValue RangeErrorCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue RangeErrorCtor::callAsConstructor(const Managed *m, CallData *callData)
{
return ErrorObject::create<RangeErrorObject>(m->engine(), callData->args[0])->asReturnedValue();
}
@@ -269,7 +269,7 @@ void Heap::ReferenceErrorCtor::init(QV4::ExecutionContext *scope)
Heap::ErrorCtor::init(scope, QStringLiteral("ReferenceError"));
}
-ReturnedValue ReferenceErrorCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue ReferenceErrorCtor::callAsConstructor(const Managed *m, CallData *callData)
{
return ErrorObject::create<ReferenceErrorObject>(m->engine(), callData->args[0])->asReturnedValue();
}
@@ -279,7 +279,7 @@ void Heap::SyntaxErrorCtor::init(QV4::ExecutionContext *scope)
Heap::ErrorCtor::init(scope, QStringLiteral("SyntaxError"));
}
-ReturnedValue SyntaxErrorCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue SyntaxErrorCtor::callAsConstructor(const Managed *m, CallData *callData)
{
return ErrorObject::create<SyntaxErrorObject>(m->engine(), callData->args[0])->asReturnedValue();
}
@@ -289,7 +289,7 @@ void Heap::TypeErrorCtor::init(QV4::ExecutionContext *scope)
Heap::ErrorCtor::init(scope, QStringLiteral("TypeError"));
}
-ReturnedValue TypeErrorCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue TypeErrorCtor::callAsConstructor(const Managed *m, CallData *callData)
{
return ErrorObject::create<TypeErrorObject>(m->engine(), callData->args[0])->asReturnedValue();
}
@@ -299,7 +299,7 @@ void Heap::URIErrorCtor::init(QV4::ExecutionContext *scope)
Heap::ErrorCtor::init(scope, QStringLiteral("URIError"));
}
-ReturnedValue URIErrorCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue URIErrorCtor::callAsConstructor(const Managed *m, CallData *callData)
{
return ErrorObject::create<URIErrorObject>(m->engine(), callData->args[0])->asReturnedValue();
}
diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h
index 8e235a32de..4190b68866 100644
--- a/src/qml/jsruntime/qv4errorobject_p.h
+++ b/src/qml/jsruntime/qv4errorobject_p.h
@@ -229,7 +229,7 @@ struct ErrorCtor: FunctionObject
{
V4_OBJECT2(ErrorCtor, FunctionObject)
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
};
@@ -237,42 +237,42 @@ struct EvalErrorCtor: ErrorCtor
{
V4_OBJECT2(EvalErrorCtor, ErrorCtor)
- static ReturnedValue construct(const Managed *m, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *m, CallData *callData);
};
struct RangeErrorCtor: ErrorCtor
{
V4_OBJECT2(RangeErrorCtor, ErrorCtor)
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
};
struct ReferenceErrorCtor: ErrorCtor
{
V4_OBJECT2(ReferenceErrorCtor, ErrorCtor)
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
};
struct SyntaxErrorCtor: ErrorCtor
{
V4_OBJECT2(SyntaxErrorCtor, ErrorCtor)
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
};
struct TypeErrorCtor: ErrorCtor
{
V4_OBJECT2(TypeErrorCtor, ErrorCtor)
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
};
struct URIErrorCtor: ErrorCtor
{
V4_OBJECT2(URIErrorCtor, ErrorCtor)
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
};
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 21aacb68d6..5b639e01d7 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -80,7 +80,7 @@ ReturnedValue jsConstructWrapper(const QV4::FunctionObject *f, const Value *argv
{
Scope scope(f->engine());
JSCallData callData(scope, argc, argv);
- return f->vtable()->construct(f, callData.callData(f));
+ return f->vtable()->callAsConstructor(f, callData.callData(f));
}
@@ -164,7 +164,7 @@ ReturnedValue FunctionObject::name() const
return get(scope()->internalClass->engine->id_name());
}
-ReturnedValue FunctionObject::construct(const Managed *that, CallData *)
+ReturnedValue FunctionObject::callAsConstructor(const Managed *that, CallData *)
{
return that->engine()->throwTypeError();
}
@@ -202,7 +202,7 @@ void Heap::FunctionCtor::init(QV4::ExecutionContext *scope)
}
// 15.3.2
-ReturnedValue FunctionCtor::construct(const Managed *that, CallData *callData)
+ReturnedValue FunctionCtor::callAsConstructor(const Managed *that, CallData *callData)
{
Scope scope(that->engine());
Scoped<FunctionCtor> f(scope, static_cast<const FunctionCtor *>(that));
@@ -252,7 +252,7 @@ ReturnedValue FunctionCtor::construct(const Managed *that, CallData *callData)
// 15.3.1: This is equivalent to new Function(...)
ReturnedValue FunctionCtor::call(const Managed *that, CallData *callData)
{
- return construct(that, callData);
+ return callAsConstructor(that, callData);
}
DEFINE_OBJECT_VTABLE(FunctionPrototype);
@@ -377,7 +377,7 @@ ReturnedValue FunctionPrototype::method_bind(const BuiltinFunction *b, CallData
DEFINE_OBJECT_VTABLE(ScriptFunction);
-ReturnedValue ScriptFunction::construct(const Managed *that, CallData *callData)
+ReturnedValue ScriptFunction::callAsConstructor(const Managed *that, CallData *callData)
{
ExecutionEngine *v4 = that->engine();
const ScriptFunction *f = static_cast<const ScriptFunction *>(that);
@@ -458,7 +458,7 @@ void Heap::BuiltinFunction::init(QV4::ExecutionContext *scope, QV4::String *name
this->code = code;
}
-ReturnedValue BuiltinFunction::construct(const Managed *f, CallData *)
+ReturnedValue BuiltinFunction::callAsConstructor(const Managed *f, CallData *)
{
return f->engine()->throwTypeError();
}
@@ -517,7 +517,7 @@ ReturnedValue BoundFunction::call(const Managed *that, CallData *callData)
return static_cast<FunctionObject &>(callData->function).call(&callData->thisObject, callData->args, callData->argc());
}
-ReturnedValue BoundFunction::construct(const Managed *that, CallData *callData)
+ReturnedValue BoundFunction::callAsConstructor(const Managed *that, CallData *callData)
{
const BoundFunction *f = static_cast<const BoundFunction *>(that);
Heap::MemberData *boundArgs = f->boundArgs();
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index 398fd8b207..6a65a7c1ce 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -164,7 +164,7 @@ struct Q_QML_EXPORT FunctionObject: Object {
ReturnedValue call(const Value *thisObject, const Value *argv, int argc) const {
return d()->jsCall(this, thisObject, argv, argc);
}
- static ReturnedValue construct(const Managed *that, CallData *);
+ static ReturnedValue callAsConstructor(const Managed *that, CallData *);
static ReturnedValue call(const Managed *that, CallData *d);
static Heap::FunctionObject *createScriptFunction(ExecutionContext *scope, Function *function);
@@ -186,7 +186,7 @@ struct FunctionCtor: FunctionObject
{
V4_OBJECT2(FunctionCtor, FunctionObject)
- static ReturnedValue construct(const Managed *that, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *that, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
};
@@ -211,7 +211,7 @@ struct Q_QML_EXPORT BuiltinFunction : FunctionObject {
return scope->engine()->memoryManager->allocObject<BuiltinFunction>(scope, name, code);
}
- static ReturnedValue construct(const Managed *, CallData *);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *);
static ReturnedValue call(const Managed *that, CallData *callData);
};
@@ -233,7 +233,7 @@ struct ScriptFunction : FunctionObject {
V4_OBJECT2(ScriptFunction, FunctionObject)
V4_INTERNALCLASS(ScriptFunction)
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
InternalClass *classForConstructor() const;
@@ -252,7 +252,7 @@ struct BoundFunction: FunctionObject {
Value boundThis() const { return d()->boundThis; }
Heap::MemberData *boundArgs() const { return d()->boundArgs; }
- static ReturnedValue construct(const Managed *, CallData *d);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *d);
static ReturnedValue call(const Managed *that, CallData *dd);
};
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index 173a869c3d..f248109273 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -78,7 +78,7 @@ void Heap::NumberCtor::init(QV4::ExecutionContext *scope)
Heap::FunctionObject::init(scope, QStringLiteral("Number"));
}
-ReturnedValue NumberCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue NumberCtor::callAsConstructor(const Managed *m, CallData *callData)
{
double dbl = callData->argc() ? callData->args[0].toNumber() : 0.;
return Encode(m->engine()->newNumberObject(dbl));
diff --git a/src/qml/jsruntime/qv4numberobject_p.h b/src/qml/jsruntime/qv4numberobject_p.h
index 6a2b5953a6..b89c7e8beb 100644
--- a/src/qml/jsruntime/qv4numberobject_p.h
+++ b/src/qml/jsruntime/qv4numberobject_p.h
@@ -79,7 +79,7 @@ struct NumberCtor: FunctionObject
{
V4_OBJECT2(NumberCtor, FunctionObject)
- static ReturnedValue construct(const Managed *that, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *that, CallData *callData);
static ReturnedValue call(const Managed *, CallData *callData);
};
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 357efcc47d..5e9954d0f5 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -395,7 +395,7 @@ bool Object::hasOwnProperty(uint index) const
return false;
}
-ReturnedValue Object::construct(const Managed *m, CallData *)
+ReturnedValue Object::callAsConstructor(const Managed *m, CallData *)
{
return m->engine()->throwTypeError();
}
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 473b872747..477e341b07 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -176,7 +176,7 @@ struct ObjectVTable
{
VTable vTable;
ReturnedValue (*call)(const Managed *, CallData *data);
- ReturnedValue (*construct)(const Managed *, CallData *data);
+ ReturnedValue (*callAsConstructor)(const Managed *, CallData *data);
ReturnedValue (*get)(const Managed *, String *name, bool *hasProperty);
ReturnedValue (*getIndexed)(const Managed *, uint index, bool *hasProperty);
bool (*put)(Managed *, String *name, const Value &value);
@@ -197,7 +197,7 @@ const QV4::ObjectVTable classname::static_vtbl = \
{ \
DEFINE_MANAGED_VTABLE_INT(classname, (std::is_same<classname::SuperClass, Object>::value) ? nullptr : &classname::SuperClass::static_vtbl.vTable), \
call, \
- construct, \
+ callAsConstructor, \
get, \
getIndexed, \
put, \
@@ -428,7 +428,7 @@ public:
{ return vtable()->instanceOf(this, var); }
protected:
- static ReturnedValue construct(const Managed *m, CallData *);
+ static ReturnedValue callAsConstructor(const Managed *m, CallData *);
static ReturnedValue call(const Managed *m, CallData *);
static ReturnedValue get(const Managed *m, String *name, bool *hasProperty);
static ReturnedValue getIndexed(const Managed *m, uint index, bool *hasProperty);
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 9f1ba59b36..b5446628bd 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -61,7 +61,7 @@ void Heap::ObjectCtor::init(QV4::ExecutionContext *scope)
Heap::FunctionObject::init(scope, QStringLiteral("Object"));
}
-ReturnedValue ObjectCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue ObjectCtor::callAsConstructor(const Managed *m, CallData *callData)
{
ExecutionEngine *v4 = m->engine();
const ObjectCtor *ctor = static_cast<const ObjectCtor *>(m);
diff --git a/src/qml/jsruntime/qv4objectproto_p.h b/src/qml/jsruntime/qv4objectproto_p.h
index c3c63de8ce..cdfdfd5536 100644
--- a/src/qml/jsruntime/qv4objectproto_p.h
+++ b/src/qml/jsruntime/qv4objectproto_p.h
@@ -70,7 +70,7 @@ struct ObjectCtor: FunctionObject
{
V4_OBJECT2(ObjectCtor, FunctionObject)
- static ReturnedValue construct(const Managed *that, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *that, CallData *callData);
static ReturnedValue call(const Managed *m, CallData *callData);
};
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 074866608c..0679732e1b 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -2022,7 +2022,7 @@ void QMetaObjectWrapper::init(ExecutionEngine *) {
}
}
-ReturnedValue QMetaObjectWrapper::construct(const Managed *m, CallData *callData)
+ReturnedValue QMetaObjectWrapper::callAsConstructor(const Managed *m, CallData *callData)
{
const QMetaObjectWrapper *This = static_cast<const QMetaObjectWrapper*>(m);
return This->constructInternal(callData);
diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h
index d7cc91925b..2368884465 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper_p.h
+++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h
@@ -251,7 +251,7 @@ struct Q_QML_EXPORT QMetaObjectWrapper : public QV4::FunctionObject
V4_NEEDS_DESTROY
static ReturnedValue create(ExecutionEngine *engine, const QMetaObject* metaObject);
- static ReturnedValue construct(const Managed *, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *, CallData *callData);
static bool isEqualTo(Managed *a, Managed *b);
const QMetaObject *metaObject() const { return d()->metaObject; }
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index 1d1a786e61..f5a8fa3f2b 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -214,7 +214,7 @@ void Heap::RegExpCtor::clearLastMatch()
lastMatchEnd = 0;
}
-ReturnedValue RegExpCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue RegExpCtor::callAsConstructor(const Managed *m, CallData *callData)
{
Scope scope(m->engine());
ScopedValue r(scope, callData->argument(0));
@@ -270,7 +270,7 @@ ReturnedValue RegExpCtor::call(const Managed *that, CallData *callData)
return Encode(callData->args[0]);
}
- return construct(that, callData);
+ return callAsConstructor(that, callData);
}
void RegExpPrototype::init(ExecutionEngine *engine, Object *constructor)
diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h
index 7432840fcd..7db862c502 100644
--- a/src/qml/jsruntime/qv4regexpobject_p.h
+++ b/src/qml/jsruntime/qv4regexpobject_p.h
@@ -150,7 +150,7 @@ struct RegExpCtor: FunctionObject
int lastMatchStart() { return d()->lastMatchStart; }
int lastMatchEnd() { return d()->lastMatchEnd; }
- static ReturnedValue construct(const Managed *m, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *m, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
};
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index 7e5b306ebe..0ab096c2bb 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -143,7 +143,7 @@ void Heap::StringCtor::init(QV4::ExecutionContext *scope)
Heap::FunctionObject::init(scope, QStringLiteral("String"));
}
-ReturnedValue StringCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue StringCtor::callAsConstructor(const Managed *m, CallData *callData)
{
ExecutionEngine *v4 = static_cast<const Object *>(m)->engine();
Scope scope(v4);
@@ -419,7 +419,7 @@ ReturnedValue StringPrototype::method_match(const BuiltinFunction *b, CallData *
if (!callData->args[0].as<RegExpObject>()) {
// convert args[0] to a regexp
- callData->args[0] = RegExpCtor::construct(b, callData);
+ callData->args[0] = RegExpCtor::callAsConstructor(b, callData);
if (v4->hasException)
return Encode::undefined();
}
diff --git a/src/qml/jsruntime/qv4stringobject_p.h b/src/qml/jsruntime/qv4stringobject_p.h
index af5a5bead5..349eb5f9d8 100644
--- a/src/qml/jsruntime/qv4stringobject_p.h
+++ b/src/qml/jsruntime/qv4stringobject_p.h
@@ -106,7 +106,7 @@ struct StringCtor: FunctionObject
{
V4_OBJECT2(StringCtor, FunctionObject)
- static ReturnedValue construct(const Managed *m, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *m, CallData *callData);
static ReturnedValue call(const Managed *, CallData *callData);
};
diff --git a/src/qml/jsruntime/qv4typedarray.cpp b/src/qml/jsruntime/qv4typedarray.cpp
index 631fed426a..7c2c623b93 100644
--- a/src/qml/jsruntime/qv4typedarray.cpp
+++ b/src/qml/jsruntime/qv4typedarray.cpp
@@ -209,7 +209,7 @@ void Heap::TypedArrayCtor::init(QV4::ExecutionContext *scope, TypedArray::Type t
type = t;
}
-ReturnedValue TypedArrayCtor::construct(const Managed *m, CallData *callData)
+ReturnedValue TypedArrayCtor::callAsConstructor(const Managed *m, CallData *callData)
{
Scope scope(m->engine());
Scoped<TypedArrayCtor> that(scope, static_cast<const TypedArrayCtor *>(m));
@@ -339,7 +339,7 @@ ReturnedValue TypedArrayCtor::construct(const Managed *m, CallData *callData)
ReturnedValue TypedArrayCtor::call(const Managed *that, CallData *callData)
{
- return construct(that, callData);
+ return callAsConstructor(that, callData);
}
void Heap::TypedArray::init(Type t)
diff --git a/src/qml/jsruntime/qv4typedarray_p.h b/src/qml/jsruntime/qv4typedarray_p.h
index fc7aa78cda..ae82f2b9b5 100644
--- a/src/qml/jsruntime/qv4typedarray_p.h
+++ b/src/qml/jsruntime/qv4typedarray_p.h
@@ -141,7 +141,7 @@ struct TypedArrayCtor: FunctionObject
{
V4_OBJECT2(TypedArrayCtor, FunctionObject)
- static ReturnedValue construct(const Managed *m, CallData *callData);
+ static ReturnedValue callAsConstructor(const Managed *m, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
};