aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-04-05 16:23:22 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-04-05 20:39:09 +0200
commit3b73dd08e0cb705dc57f6cce8b528c36aad40bcc (patch)
tree6a8feac3b99b719d91f95d2660ba5bdd6168c6a4 /src
parent8da2e2af2634fbba0920a6296ad470c491ae00f7 (diff)
Move arguments out of ExecutionContext and into CallContext
Change-Id: Ic826e3e71eac9171fa113dec79db7c69982f2386 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/v4/debugging.cpp6
-rw-r--r--src/v4/moth/qv4vme_moth.cpp7
-rw-r--r--src/v4/qv4argumentsobject.cpp2
-rw-r--r--src/v4/qv4argumentsobject.h2
-rw-r--r--src/v4/qv4arrayobject.cpp44
-rw-r--r--src/v4/qv4arrayobject.h44
-rw-r--r--src/v4/qv4booleanobject.cpp4
-rw-r--r--src/v4/qv4booleanobject.h4
-rw-r--r--src/v4/qv4context.cpp16
-rw-r--r--src/v4/qv4context.h6
-rw-r--r--src/v4/qv4dateobject.cpp96
-rw-r--r--src/v4/qv4dateobject.h96
-rw-r--r--src/v4/qv4engine.cpp2
-rw-r--r--src/v4/qv4engine.h2
-rw-r--r--src/v4/qv4errorobject.cpp2
-rw-r--r--src/v4/qv4errorobject.h2
-rw-r--r--src/v4/qv4functionobject.cpp14
-rw-r--r--src/v4/qv4functionobject.h12
-rw-r--r--src/v4/qv4globalobject.cpp12
-rw-r--r--src/v4/qv4globalobject.h12
-rw-r--r--src/v4/qv4isel_masm.cpp2
-rw-r--r--src/v4/qv4jsonobject.cpp4
-rw-r--r--src/v4/qv4jsonobject.h4
-rw-r--r--src/v4/qv4numberobject.cpp12
-rw-r--r--src/v4/qv4numberobject.h12
-rw-r--r--src/v4/qv4object.cpp2
-rw-r--r--src/v4/qv4object.h3
-rw-r--r--src/v4/qv4objectproto.cpp40
-rw-r--r--src/v4/qv4objectproto.h44
-rw-r--r--src/v4/qv4regexpobject.cpp8
-rw-r--r--src/v4/qv4regexpobject.h8
-rw-r--r--src/v4/qv4stringobject.cpp18
-rw-r--r--src/v4/qv4stringobject.h18
33 files changed, 274 insertions, 286 deletions
diff --git a/src/v4/debugging.cpp b/src/v4/debugging.cpp
index 5760753196..e41dba2086 100644
--- a/src/v4/debugging.cpp
+++ b/src/v4/debugging.cpp
@@ -64,10 +64,10 @@ FunctionState::~FunctionState()
VM::Value *FunctionState::argument(unsigned idx)
{
- if (idx < _context->argumentCount)
- return _context->arguments + idx;
- else
+ VM::CallContext *c = _context->asCallContext();
+ if (!c || idx >= c->argumentCount)
return 0;
+ return c->arguments + idx;
}
VM::Value *FunctionState::local(unsigned idx)
diff --git a/src/v4/moth/qv4vme_moth.cpp b/src/v4/moth/qv4vme_moth.cpp
index f4ac8f784c..26bd76a1d5 100644
--- a/src/v4/moth/qv4vme_moth.cpp
+++ b/src/v4/moth/qv4vme_moth.cpp
@@ -143,11 +143,12 @@ static inline VM::Value *getValueRef(QQmlJS::VM::ExecutionContext *context,
uint scope = param.scope;
while (scope--)
c = c->outer;
+ VM::CallContext *cc = static_cast<VM::CallContext *>(c);
const unsigned arg = param.index;
Q_ASSERT(arg >= 0);
- Q_ASSERT((unsigned) arg < c->argumentCount);
- Q_ASSERT(c->arguments);
- return c->arguments + arg;
+ Q_ASSERT((unsigned) arg < cc->argumentCount);
+ Q_ASSERT(cc->arguments);
+ return cc->arguments + arg;
} else if (param.isLocal()) {
VMSTATS(paramIsLocal);
const unsigned index = param.index;
diff --git a/src/v4/qv4argumentsobject.cpp b/src/v4/qv4argumentsobject.cpp
index 4fb0e1afe9..06ce3e8f55 100644
--- a/src/v4/qv4argumentsobject.cpp
+++ b/src/v4/qv4argumentsobject.cpp
@@ -44,7 +44,7 @@ namespace QQmlJS {
namespace VM {
-static Value throwTypeError(ExecutionContext *ctx)
+static Value throwTypeError(CallContext *ctx)
{
ctx->throwTypeError();
return Value::undefinedValue();
diff --git a/src/v4/qv4argumentsobject.h b/src/v4/qv4argumentsobject.h
index 144cb35e59..4dcdadd2d8 100644
--- a/src/v4/qv4argumentsobject.h
+++ b/src/v4/qv4argumentsobject.h
@@ -77,7 +77,7 @@ protected:
struct ArgumentsObject: Object {
- ExecutionContext *context;
+ CallContext *context;
QVector<Value> mappedArguments;
ArgumentsObject(CallContext *context, int formalParameterCount, int actualParameterCount);
~ArgumentsObject() {}
diff --git a/src/v4/qv4arrayobject.cpp b/src/v4/qv4arrayobject.cpp
index 1e25140883..4b6f8ea1f6 100644
--- a/src/v4/qv4arrayobject.cpp
+++ b/src/v4/qv4arrayobject.cpp
@@ -118,24 +118,24 @@ uint ArrayPrototype::getLength(ExecutionContext *ctx, Object *o)
return o->get(ctx, ctx->engine->id_length).toUInt32(ctx);
}
-Value ArrayPrototype::method_isArray(ExecutionContext *ctx)
+Value ArrayPrototype::method_isArray(CallContext *ctx)
{
Value arg = ctx->argument(0);
bool isArray = arg.asArrayObject();
return Value::fromBoolean(isArray);
}
-Value ArrayPrototype::method_toString(ExecutionContext *ctx)
+Value ArrayPrototype::method_toString(CallContext *ctx)
{
return method_join(ctx);
}
-Value ArrayPrototype::method_toLocaleString(ExecutionContext *ctx)
+Value ArrayPrototype::method_toLocaleString(CallContext *ctx)
{
return method_toString(ctx);
}
-Value ArrayPrototype::method_concat(ExecutionContext *ctx)
+Value ArrayPrototype::method_concat(CallContext *ctx)
{
ArrayObject *result = ctx->engine->newArrayObject(ctx);
@@ -159,7 +159,7 @@ Value ArrayPrototype::method_concat(ExecutionContext *ctx)
return Value::fromObject(result);
}
-Value ArrayPrototype::method_join(ExecutionContext *ctx)
+Value ArrayPrototype::method_join(CallContext *ctx)
{
Value arg = ctx->argument(0);
@@ -216,7 +216,7 @@ Value ArrayPrototype::method_join(ExecutionContext *ctx)
return Value::fromString(ctx, R);
}
-Value ArrayPrototype::method_pop(ExecutionContext *ctx)
+Value ArrayPrototype::method_pop(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -237,7 +237,7 @@ Value ArrayPrototype::method_pop(ExecutionContext *ctx)
return result;
}
-Value ArrayPrototype::method_push(ExecutionContext *ctx)
+Value ArrayPrototype::method_push(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -294,7 +294,7 @@ Value ArrayPrototype::method_push(ExecutionContext *ctx)
}
-Value ArrayPrototype::method_reverse(ExecutionContext *ctx)
+Value ArrayPrototype::method_reverse(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
uint length = getLength(ctx, instance);
@@ -317,7 +317,7 @@ Value ArrayPrototype::method_reverse(ExecutionContext *ctx)
return Value::fromObject(instance);
}
-Value ArrayPrototype::method_shift(ExecutionContext *ctx)
+Value ArrayPrototype::method_shift(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -380,7 +380,7 @@ Value ArrayPrototype::method_shift(ExecutionContext *ctx)
return result;
}
-Value ArrayPrototype::method_slice(ExecutionContext *ctx)
+Value ArrayPrototype::method_slice(CallContext *ctx)
{
Object *o = ctx->thisObject.toObject(ctx);
@@ -417,7 +417,7 @@ Value ArrayPrototype::method_slice(ExecutionContext *ctx)
return Value::fromObject(result);
}
-Value ArrayPrototype::method_sort(ExecutionContext *ctx)
+Value ArrayPrototype::method_sort(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
@@ -428,7 +428,7 @@ Value ArrayPrototype::method_sort(ExecutionContext *ctx)
return ctx->thisObject;
}
-Value ArrayPrototype::method_splice(ExecutionContext *ctx)
+Value ArrayPrototype::method_splice(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -492,7 +492,7 @@ Value ArrayPrototype::method_splice(ExecutionContext *ctx)
return Value::fromObject(newArray);
}
-Value ArrayPrototype::method_unshift(ExecutionContext *ctx)
+Value ArrayPrototype::method_unshift(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -544,7 +544,7 @@ Value ArrayPrototype::method_unshift(ExecutionContext *ctx)
return Value::fromDouble((double)newLen);
}
-Value ArrayPrototype::method_indexOf(ExecutionContext *ctx)
+Value ArrayPrototype::method_indexOf(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -581,7 +581,7 @@ Value ArrayPrototype::method_indexOf(ExecutionContext *ctx)
return instance->arrayIndexOf(searchValue, fromIndex, len, ctx, instance);
}
-Value ArrayPrototype::method_lastIndexOf(ExecutionContext *ctx)
+Value ArrayPrototype::method_lastIndexOf(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -618,7 +618,7 @@ Value ArrayPrototype::method_lastIndexOf(ExecutionContext *ctx)
return Value::fromInt32(-1);
}
-Value ArrayPrototype::method_every(ExecutionContext *ctx)
+Value ArrayPrototype::method_every(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
@@ -647,7 +647,7 @@ Value ArrayPrototype::method_every(ExecutionContext *ctx)
return Value::fromBoolean(ok);
}
-Value ArrayPrototype::method_some(ExecutionContext *ctx)
+Value ArrayPrototype::method_some(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
@@ -676,7 +676,7 @@ Value ArrayPrototype::method_some(ExecutionContext *ctx)
return Value::fromBoolean(false);
}
-Value ArrayPrototype::method_forEach(ExecutionContext *ctx)
+Value ArrayPrototype::method_forEach(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
@@ -703,7 +703,7 @@ Value ArrayPrototype::method_forEach(ExecutionContext *ctx)
return Value::undefinedValue();
}
-Value ArrayPrototype::method_map(ExecutionContext *ctx)
+Value ArrayPrototype::method_map(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
@@ -735,7 +735,7 @@ Value ArrayPrototype::method_map(ExecutionContext *ctx)
return Value::fromObject(a);
}
-Value ArrayPrototype::method_filter(ExecutionContext *ctx)
+Value ArrayPrototype::method_filter(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
@@ -770,7 +770,7 @@ Value ArrayPrototype::method_filter(ExecutionContext *ctx)
return Value::fromObject(a);
}
-Value ArrayPrototype::method_reduce(ExecutionContext *ctx)
+Value ArrayPrototype::method_reduce(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
@@ -812,7 +812,7 @@ Value ArrayPrototype::method_reduce(ExecutionContext *ctx)
return acc;
}
-Value ArrayPrototype::method_reduceRight(ExecutionContext *ctx)
+Value ArrayPrototype::method_reduceRight(CallContext *ctx)
{
Object *instance = ctx->thisObject.toObject(ctx);
diff --git a/src/v4/qv4arrayobject.h b/src/v4/qv4arrayobject.h
index 1e616002bb..a4ab90c0bb 100644
--- a/src/v4/qv4arrayobject.h
+++ b/src/v4/qv4arrayobject.h
@@ -70,28 +70,28 @@ struct ArrayPrototype: ArrayObject
static uint getLength(ExecutionContext *ctx, Object *o);
- static Value method_isArray(ExecutionContext *ctx);
- static Value method_toString(ExecutionContext *ctx);
- static Value method_toLocaleString(ExecutionContext *ctx);
- static Value method_concat(ExecutionContext *ctx);
- static Value method_join(ExecutionContext *ctx);
- static Value method_pop(ExecutionContext *ctx);
- static Value method_push(ExecutionContext *ctx);
- static Value method_reverse(ExecutionContext *ctx);
- static Value method_shift(ExecutionContext *ctx);
- static Value method_slice(ExecutionContext *ctx);
- static Value method_sort(ExecutionContext *ctx);
- static Value method_splice(ExecutionContext *ctx);
- static Value method_unshift(ExecutionContext *ctx);
- static Value method_indexOf(ExecutionContext *ctx);
- static Value method_lastIndexOf(ExecutionContext *ctx);
- static Value method_every(ExecutionContext *ctx);
- static Value method_some(ExecutionContext *ctx);
- static Value method_forEach(ExecutionContext *ctx);
- static Value method_map(ExecutionContext *ctx);
- static Value method_filter(ExecutionContext *ctx);
- static Value method_reduce(ExecutionContext *ctx);
- static Value method_reduceRight(ExecutionContext *ctx);
+ static Value method_isArray(CallContext *ctx);
+ static Value method_toString(CallContext *ctx);
+ static Value method_toLocaleString(CallContext *ctx);
+ static Value method_concat(CallContext *ctx);
+ static Value method_join(CallContext *ctx);
+ static Value method_pop(CallContext *ctx);
+ static Value method_push(CallContext *ctx);
+ static Value method_reverse(CallContext *ctx);
+ static Value method_shift(CallContext *ctx);
+ static Value method_slice(CallContext *ctx);
+ static Value method_sort(CallContext *ctx);
+ static Value method_splice(CallContext *ctx);
+ static Value method_unshift(CallContext *ctx);
+ static Value method_indexOf(CallContext *ctx);
+ static Value method_lastIndexOf(CallContext *ctx);
+ static Value method_every(CallContext *ctx);
+ static Value method_some(CallContext *ctx);
+ static Value method_forEach(CallContext *ctx);
+ static Value method_map(CallContext *ctx);
+ static Value method_filter(CallContext *ctx);
+ static Value method_reduce(CallContext *ctx);
+ static Value method_reduceRight(CallContext *ctx);
};
diff --git a/src/v4/qv4booleanobject.cpp b/src/v4/qv4booleanobject.cpp
index 8b1af93bf5..1f55e92611 100644
--- a/src/v4/qv4booleanobject.cpp
+++ b/src/v4/qv4booleanobject.cpp
@@ -72,7 +72,7 @@ void BooleanPrototype::init(ExecutionContext *ctx, const Value &ctor)
defineDefaultProperty(ctx, QStringLiteral("valueOf"), method_valueOf);
}
-Value BooleanPrototype::method_toString(ExecutionContext *ctx)
+Value BooleanPrototype::method_toString(CallContext *ctx)
{
bool result;
if (ctx->thisObject.isBoolean()) {
@@ -87,7 +87,7 @@ Value BooleanPrototype::method_toString(ExecutionContext *ctx)
return Value::fromString(ctx, QLatin1String(result ? "true" : "false"));
}
-Value BooleanPrototype::method_valueOf(ExecutionContext *ctx)
+Value BooleanPrototype::method_valueOf(CallContext *ctx)
{
BooleanObject *thisObject = ctx->thisObject.asBooleanObject();
if (!thisObject)
diff --git a/src/v4/qv4booleanobject.h b/src/v4/qv4booleanobject.h
index 68976f3dc6..c3e13978ba 100644
--- a/src/v4/qv4booleanobject.h
+++ b/src/v4/qv4booleanobject.h
@@ -66,8 +66,8 @@ struct BooleanPrototype: BooleanObject
BooleanPrototype(ExecutionEngine *engine): BooleanObject(engine, Value::fromBoolean(false)) {}
void init(ExecutionContext *ctx, const Value &ctor);
- static Value method_toString(ExecutionContext *ctx);
- static Value method_valueOf(ExecutionContext *ctx);
+ static Value method_toString(CallContext *ctx);
+ static Value method_valueOf(CallContext *ctx);
};
diff --git a/src/v4/qv4context.cpp b/src/v4/qv4context.cpp
index 1ce278860d..21a5763c7d 100644
--- a/src/v4/qv4context.cpp
+++ b/src/v4/qv4context.cpp
@@ -138,10 +138,6 @@ void GlobalContext::init(ExecutionEngine *eng)
outer = 0;
lookups = 0;
global = 0;
-
- // ### remove
- arguments = 0;
- argumentCount = 0;
}
void WithContext::init(ExecutionContext *p, Object *with)
@@ -155,10 +151,6 @@ void WithContext::init(ExecutionContext *p, Object *with)
lookups = p->lookups;
withObject = with;
-
- // ### remove
- arguments = 0;
- argumentCount = 0;
}
void CatchContext::init(ExecutionContext *p, String *exceptionVarName, const Value &exceptionValue)
@@ -173,10 +165,6 @@ void CatchContext::init(ExecutionContext *p, String *exceptionVarName, const Val
this->exceptionVarName = exceptionVarName;
this->exceptionValue = exceptionValue;
-
- // ### remove
- arguments = 0;
- argumentCount = 0;
}
void CallContext::initCallContext(ExecutionEngine *engine)
@@ -284,11 +272,11 @@ void ExecutionContext::mark()
outer->mark();
thisObject.mark();
- for (unsigned arg = 0, lastArg = argumentCount; arg < lastArg; ++arg)
- arguments[arg].mark();
if (type == Type_CallContext || type == Type_QmlContext) {
VM::CallContext *c = static_cast<CallContext *>(this);
+ for (unsigned arg = 0, lastArg = c->argumentCount; arg < lastArg; ++arg)
+ c->arguments[arg].mark();
for (unsigned local = 0, lastLocal = c->variableCount(); local < lastLocal; ++local)
c->locals[local].mark();
c->function->mark();
diff --git a/src/v4/qv4context.h b/src/v4/qv4context.h
index b2d644d39c..5d43bf6384 100644
--- a/src/v4/qv4context.h
+++ b/src/v4/qv4context.h
@@ -97,10 +97,6 @@ struct ExecutionContext
Lookup *lookups;
ExecutionContext *next; // used in the GC
- // ### move to CallContext
- Value *arguments;
- unsigned int argumentCount;
-
String * const *formals() const;
unsigned int formalCount() const;
String * const *variables() const;
@@ -138,6 +134,8 @@ struct CallContext : public ExecutionContext
FunctionObject *function;
Value *locals;
+ Value *arguments;
+ unsigned int argumentCount;
Object *activation;
};
diff --git a/src/v4/qv4dateobject.cpp b/src/v4/qv4dateobject.cpp
index 1932b8fe96..fab70ded94 100644
--- a/src/v4/qv4dateobject.cpp
+++ b/src/v4/qv4dateobject.cpp
@@ -778,12 +778,12 @@ double DatePrototype::getThisDate(ExecutionContext *ctx)
}
}
-Value DatePrototype::method_parse(ExecutionContext *ctx)
+Value DatePrototype::method_parse(CallContext *ctx)
{
return Value::fromDouble(ParseString(ctx->argument(0).toString(ctx)->toQString()));
}
-Value DatePrototype::method_UTC(ExecutionContext *ctx)
+Value DatePrototype::method_UTC(CallContext *ctx)
{
const int numArgs = ctx->argumentCount;
if (numArgs >= 2) {
@@ -803,62 +803,62 @@ Value DatePrototype::method_UTC(ExecutionContext *ctx)
return Value::undefinedValue();
}
-Value DatePrototype::method_now(ExecutionContext *ctx)
+Value DatePrototype::method_now(CallContext *ctx)
{
Q_UNUSED(ctx);
double t = currentTime();
return Value::fromDouble(t);
}
-Value DatePrototype::method_toString(ExecutionContext *ctx)
+Value DatePrototype::method_toString(CallContext *ctx)
{
double t = getThisDate(ctx);
return Value::fromString(ctx, ToString(t));
}
-Value DatePrototype::method_toDateString(ExecutionContext *ctx)
+Value DatePrototype::method_toDateString(CallContext *ctx)
{
double t = getThisDate(ctx);
return Value::fromString(ctx, ToDateString(t));
}
-Value DatePrototype::method_toTimeString(ExecutionContext *ctx)
+Value DatePrototype::method_toTimeString(CallContext *ctx)
{
double t = getThisDate(ctx);
return Value::fromString(ctx, ToTimeString(t));
}
-Value DatePrototype::method_toLocaleString(ExecutionContext *ctx)
+Value DatePrototype::method_toLocaleString(CallContext *ctx)
{
double t = getThisDate(ctx);
return Value::fromString(ctx, ToLocaleString(t));
}
-Value DatePrototype::method_toLocaleDateString(ExecutionContext *ctx)
+Value DatePrototype::method_toLocaleDateString(CallContext *ctx)
{
double t = getThisDate(ctx);
return Value::fromString(ctx, ToLocaleDateString(t));
}
-Value DatePrototype::method_toLocaleTimeString(ExecutionContext *ctx)
+Value DatePrototype::method_toLocaleTimeString(CallContext *ctx)
{
double t = getThisDate(ctx);
return Value::fromString(ctx, ToLocaleTimeString(t));
}
-Value DatePrototype::method_valueOf(ExecutionContext *ctx)
+Value DatePrototype::method_valueOf(CallContext *ctx)
{
double t = getThisDate(ctx);
return Value::fromDouble(t);
}
-Value DatePrototype::method_getTime(ExecutionContext *ctx)
+Value DatePrototype::method_getTime(CallContext *ctx)
{
double t = getThisDate(ctx);
return Value::fromDouble(t);
}
-Value DatePrototype::method_getYear(ExecutionContext *ctx)
+Value DatePrototype::method_getYear(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -866,7 +866,7 @@ Value DatePrototype::method_getYear(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getFullYear(ExecutionContext *ctx)
+Value DatePrototype::method_getFullYear(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -874,7 +874,7 @@ Value DatePrototype::method_getFullYear(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getUTCFullYear(ExecutionContext *ctx)
+Value DatePrototype::method_getUTCFullYear(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -882,7 +882,7 @@ Value DatePrototype::method_getUTCFullYear(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getMonth(ExecutionContext *ctx)
+Value DatePrototype::method_getMonth(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -890,7 +890,7 @@ Value DatePrototype::method_getMonth(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getUTCMonth(ExecutionContext *ctx)
+Value DatePrototype::method_getUTCMonth(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -898,7 +898,7 @@ Value DatePrototype::method_getUTCMonth(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getDate(ExecutionContext *ctx)
+Value DatePrototype::method_getDate(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -906,7 +906,7 @@ Value DatePrototype::method_getDate(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getUTCDate(ExecutionContext *ctx)
+Value DatePrototype::method_getUTCDate(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -914,7 +914,7 @@ Value DatePrototype::method_getUTCDate(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getDay(ExecutionContext *ctx)
+Value DatePrototype::method_getDay(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -922,7 +922,7 @@ Value DatePrototype::method_getDay(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getUTCDay(ExecutionContext *ctx)
+Value DatePrototype::method_getUTCDay(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -930,7 +930,7 @@ Value DatePrototype::method_getUTCDay(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getHours(ExecutionContext *ctx)
+Value DatePrototype::method_getHours(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -938,7 +938,7 @@ Value DatePrototype::method_getHours(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getUTCHours(ExecutionContext *ctx)
+Value DatePrototype::method_getUTCHours(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -946,7 +946,7 @@ Value DatePrototype::method_getUTCHours(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getMinutes(ExecutionContext *ctx)
+Value DatePrototype::method_getMinutes(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -954,7 +954,7 @@ Value DatePrototype::method_getMinutes(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getUTCMinutes(ExecutionContext *ctx)
+Value DatePrototype::method_getUTCMinutes(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -962,7 +962,7 @@ Value DatePrototype::method_getUTCMinutes(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getSeconds(ExecutionContext *ctx)
+Value DatePrototype::method_getSeconds(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -970,7 +970,7 @@ Value DatePrototype::method_getSeconds(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getUTCSeconds(ExecutionContext *ctx)
+Value DatePrototype::method_getUTCSeconds(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -978,7 +978,7 @@ Value DatePrototype::method_getUTCSeconds(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getMilliseconds(ExecutionContext *ctx)
+Value DatePrototype::method_getMilliseconds(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -986,7 +986,7 @@ Value DatePrototype::method_getMilliseconds(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getUTCMilliseconds(ExecutionContext *ctx)
+Value DatePrototype::method_getUTCMilliseconds(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -994,7 +994,7 @@ Value DatePrototype::method_getUTCMilliseconds(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_getTimezoneOffset(ExecutionContext *ctx)
+Value DatePrototype::method_getTimezoneOffset(CallContext *ctx)
{
double t = getThisDate(ctx);
if (! isnan(t))
@@ -1002,7 +1002,7 @@ Value DatePrototype::method_getTimezoneOffset(ExecutionContext *ctx)
return Value::fromDouble(t);
}
-Value DatePrototype::method_setTime(ExecutionContext *ctx)
+Value DatePrototype::method_setTime(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1012,7 +1012,7 @@ Value DatePrototype::method_setTime(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setMilliseconds(ExecutionContext *ctx)
+Value DatePrototype::method_setMilliseconds(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1024,7 +1024,7 @@ Value DatePrototype::method_setMilliseconds(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setUTCMilliseconds(ExecutionContext *ctx)
+Value DatePrototype::method_setUTCMilliseconds(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1036,7 +1036,7 @@ Value DatePrototype::method_setUTCMilliseconds(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setSeconds(ExecutionContext *ctx)
+Value DatePrototype::method_setSeconds(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1050,7 +1050,7 @@ Value DatePrototype::method_setSeconds(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setUTCSeconds(ExecutionContext *ctx)
+Value DatePrototype::method_setUTCSeconds(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1064,7 +1064,7 @@ Value DatePrototype::method_setUTCSeconds(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setMinutes(ExecutionContext *ctx)
+Value DatePrototype::method_setMinutes(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1079,7 +1079,7 @@ Value DatePrototype::method_setMinutes(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setUTCMinutes(ExecutionContext *ctx)
+Value DatePrototype::method_setUTCMinutes(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1094,7 +1094,7 @@ Value DatePrototype::method_setUTCMinutes(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setHours(ExecutionContext *ctx)
+Value DatePrototype::method_setHours(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1110,7 +1110,7 @@ Value DatePrototype::method_setHours(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setUTCHours(ExecutionContext *ctx)
+Value DatePrototype::method_setUTCHours(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1126,7 +1126,7 @@ Value DatePrototype::method_setUTCHours(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setDate(ExecutionContext *ctx)
+Value DatePrototype::method_setDate(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1139,7 +1139,7 @@ Value DatePrototype::method_setDate(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setUTCDate(ExecutionContext *ctx)
+Value DatePrototype::method_setUTCDate(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1152,7 +1152,7 @@ Value DatePrototype::method_setUTCDate(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setMonth(ExecutionContext *ctx)
+Value DatePrototype::method_setMonth(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1166,7 +1166,7 @@ Value DatePrototype::method_setMonth(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setUTCMonth(ExecutionContext *ctx)
+Value DatePrototype::method_setUTCMonth(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1180,7 +1180,7 @@ Value DatePrototype::method_setUTCMonth(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setYear(ExecutionContext *ctx)
+Value DatePrototype::method_setYear(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1206,7 +1206,7 @@ Value DatePrototype::method_setYear(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setUTCFullYear(ExecutionContext *ctx)
+Value DatePrototype::method_setUTCFullYear(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1221,7 +1221,7 @@ Value DatePrototype::method_setUTCFullYear(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_setFullYear(ExecutionContext *ctx)
+Value DatePrototype::method_setFullYear(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1238,7 +1238,7 @@ Value DatePrototype::method_setFullYear(ExecutionContext *ctx)
return self->value;
}
-Value DatePrototype::method_toUTCString(ExecutionContext *ctx)
+Value DatePrototype::method_toUTCString(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1261,7 +1261,7 @@ static void addZeroPrefixedInt(QString &str, int num, int nDigits)
}
}
-Value DatePrototype::method_toISOString(ExecutionContext *ctx)
+Value DatePrototype::method_toISOString(CallContext *ctx)
{
DateObject *self = ctx->thisObject.asDateObject();
if (!self)
@@ -1299,7 +1299,7 @@ Value DatePrototype::method_toISOString(ExecutionContext *ctx)
return Value::fromString(ctx, result);
}
-Value DatePrototype::method_toJSON(ExecutionContext *ctx)
+Value DatePrototype::method_toJSON(CallContext *ctx)
{
Value O = __qmljs_to_object(ctx, ctx->thisObject);
Value tv = __qmljs_to_primitive(O, ctx, NUMBER_HINT);
diff --git a/src/v4/qv4dateobject.h b/src/v4/qv4dateobject.h
index 946240ec7f..d91b68bd81 100644
--- a/src/v4/qv4dateobject.h
+++ b/src/v4/qv4dateobject.h
@@ -73,55 +73,55 @@ struct DatePrototype: DateObject
static double getThisDate(ExecutionContext *ctx);
- static Value method_parse(ExecutionContext *ctx);
- static Value method_UTC(ExecutionContext *ctx);
- static Value method_now(ExecutionContext *ctx);
+ static Value method_parse(CallContext *ctx);
+ static Value method_UTC(CallContext *ctx);
+ static Value method_now(CallContext *ctx);
- static Value method_toString(ExecutionContext *ctx);
- static Value method_toDateString(ExecutionContext *ctx);
- static Value method_toTimeString(ExecutionContext *ctx);
- static Value method_toLocaleString(ExecutionContext *ctx);
- static Value method_toLocaleDateString(ExecutionContext *ctx);
- static Value method_toLocaleTimeString(ExecutionContext *ctx);
- static Value method_valueOf(ExecutionContext *ctx);
- static Value method_getTime(ExecutionContext *ctx);
- static Value method_getYear(ExecutionContext *ctx);
- static Value method_getFullYear(ExecutionContext *ctx);
- static Value method_getUTCFullYear(ExecutionContext *ctx);
- static Value method_getMonth(ExecutionContext *ctx);
- static Value method_getUTCMonth(ExecutionContext *ctx);
- static Value method_getDate(ExecutionContext *ctx);
- static Value method_getUTCDate(ExecutionContext *ctx);
- static Value method_getDay(ExecutionContext *ctx);
- static Value method_getUTCDay(ExecutionContext *ctx);
- static Value method_getHours(ExecutionContext *ctx);
- static Value method_getUTCHours(ExecutionContext *ctx);
- static Value method_getMinutes(ExecutionContext *ctx);
- static Value method_getUTCMinutes(ExecutionContext *ctx);
- static Value method_getSeconds(ExecutionContext *ctx);
- static Value method_getUTCSeconds(ExecutionContext *ctx);
- static Value method_getMilliseconds(ExecutionContext *ctx);
- static Value method_getUTCMilliseconds(ExecutionContext *ctx);
- static Value method_getTimezoneOffset(ExecutionContext *ctx);
- static Value method_setTime(ExecutionContext *ctx);
- static Value method_setMilliseconds(ExecutionContext *ctx);
- static Value method_setUTCMilliseconds(ExecutionContext *ctx);
- static Value method_setSeconds(ExecutionContext *ctx);
- static Value method_setUTCSeconds(ExecutionContext *ctx);
- static Value method_setMinutes(ExecutionContext *ctx);
- static Value method_setUTCMinutes(ExecutionContext *ctx);
- static Value method_setHours(ExecutionContext *ctx);
- static Value method_setUTCHours(ExecutionContext *ctx);
- static Value method_setDate(ExecutionContext *ctx);
- static Value method_setUTCDate(ExecutionContext *ctx);
- static Value method_setMonth(ExecutionContext *ctx);
- static Value method_setUTCMonth(ExecutionContext *ctx);
- static Value method_setYear(ExecutionContext *ctx);
- static Value method_setFullYear(ExecutionContext *ctx);
- static Value method_setUTCFullYear(ExecutionContext *ctx);
- static Value method_toUTCString(ExecutionContext *ctx);
- static Value method_toISOString(ExecutionContext *ctx);
- static Value method_toJSON(ExecutionContext *ctx);
+ static Value method_toString(CallContext *ctx);
+ static Value method_toDateString(CallContext *ctx);
+ static Value method_toTimeString(CallContext *ctx);
+ static Value method_toLocaleString(CallContext *ctx);
+ static Value method_toLocaleDateString(CallContext *ctx);
+ static Value method_toLocaleTimeString(CallContext *ctx);
+ static Value method_valueOf(CallContext *ctx);
+ static Value method_getTime(CallContext *ctx);
+ static Value method_getYear(CallContext *ctx);
+ static Value method_getFullYear(CallContext *ctx);
+ static Value method_getUTCFullYear(CallContext *ctx);
+ static Value method_getMonth(CallContext *ctx);
+ static Value method_getUTCMonth(CallContext *ctx);
+ static Value method_getDate(CallContext *ctx);
+ static Value method_getUTCDate(CallContext *ctx);
+ static Value method_getDay(CallContext *ctx);
+ static Value method_getUTCDay(CallContext *ctx);
+ static Value method_getHours(CallContext *ctx);
+ static Value method_getUTCHours(CallContext *ctx);
+ static Value method_getMinutes(CallContext *ctx);
+ static Value method_getUTCMinutes(CallContext *ctx);
+ static Value method_getSeconds(CallContext *ctx);
+ static Value method_getUTCSeconds(CallContext *ctx);
+ static Value method_getMilliseconds(CallContext *ctx);
+ static Value method_getUTCMilliseconds(CallContext *ctx);
+ static Value method_getTimezoneOffset(CallContext *ctx);
+ static Value method_setTime(CallContext *ctx);
+ static Value method_setMilliseconds(CallContext *ctx);
+ static Value method_setUTCMilliseconds(CallContext *ctx);
+ static Value method_setSeconds(CallContext *ctx);
+ static Value method_setUTCSeconds(CallContext *ctx);
+ static Value method_setMinutes(CallContext *ctx);
+ static Value method_setUTCMinutes(CallContext *ctx);
+ static Value method_setHours(CallContext *ctx);
+ static Value method_setUTCHours(CallContext *ctx);
+ static Value method_setDate(CallContext *ctx);
+ static Value method_setUTCDate(CallContext *ctx);
+ static Value method_setMonth(CallContext *ctx);
+ static Value method_setUTCMonth(CallContext *ctx);
+ static Value method_setYear(CallContext *ctx);
+ static Value method_setFullYear(CallContext *ctx);
+ static Value method_setUTCFullYear(CallContext *ctx);
+ static Value method_toUTCString(CallContext *ctx);
+ static Value method_toISOString(CallContext *ctx);
+ static Value method_toJSON(CallContext *ctx);
};
} // end of namespace VM
diff --git a/src/v4/qv4engine.cpp b/src/v4/qv4engine.cpp
index f22e9a9161..fb78d679a0 100644
--- a/src/v4/qv4engine.cpp
+++ b/src/v4/qv4engine.cpp
@@ -385,7 +385,7 @@ Function *ExecutionEngine::newFunction(const QString &name)
return f;
}
-FunctionObject *ExecutionEngine::newBuiltinFunction(ExecutionContext *scope, String *name, Value (*code)(ExecutionContext *))
+FunctionObject *ExecutionEngine::newBuiltinFunction(ExecutionContext *scope, String *name, Value (*code)(CallContext *))
{
BuiltinFunctionOld *f = new (memoryManager) BuiltinFunctionOld(scope, name, code);
return f;
diff --git a/src/v4/qv4engine.h b/src/v4/qv4engine.h
index d63691c4f9..dad9db37ac 100644
--- a/src/v4/qv4engine.h
+++ b/src/v4/qv4engine.h
@@ -207,7 +207,7 @@ struct Q_V4_EXPORT ExecutionEngine
VM::Function *newFunction(const QString &name);
- FunctionObject *newBuiltinFunction(ExecutionContext *scope, String *name, Value (*code)(ExecutionContext *));
+ FunctionObject *newBuiltinFunction(ExecutionContext *scope, String *name, Value (*code)(CallContext *));
FunctionObject *newBuiltinFunction(ExecutionContext *scope, String *name, Value (*code)(ExecutionContext *, Value, Value *, int));
FunctionObject *newScriptFunction(ExecutionContext *scope, VM::Function *function);
BoundFunction *newBoundFunction(ExecutionContext *scope, FunctionObject *target, Value boundThis, const QVector<Value> &boundArgs);
diff --git a/src/v4/qv4errorobject.cpp b/src/v4/qv4errorobject.cpp
index 9dc884e058..f576b73211 100644
--- a/src/v4/qv4errorobject.cpp
+++ b/src/v4/qv4errorobject.cpp
@@ -230,7 +230,7 @@ void ErrorPrototype::init(ExecutionContext *ctx, const Value &ctor, Object *obj)
obj->defineDefaultProperty(ctx, QStringLiteral("name"), Value::fromString(ctx, QStringLiteral("Error")));
}
-Value ErrorPrototype::method_toString(ExecutionContext *ctx)
+Value ErrorPrototype::method_toString(CallContext *ctx)
{
Object *o = ctx->thisObject.asObject();
if (!o)
diff --git a/src/v4/qv4errorobject.h b/src/v4/qv4errorobject.h
index c03d8221ff..98ccf6d4bb 100644
--- a/src/v4/qv4errorobject.h
+++ b/src/v4/qv4errorobject.h
@@ -185,7 +185,7 @@ struct ErrorPrototype: ErrorObject
void init(ExecutionContext *ctx, const Value &ctor) { init(ctx, ctor, this); }
static void init(ExecutionContext *ctx, const Value &ctor, Object *obj);
- static Value method_toString(ExecutionContext *ctx);
+ static Value method_toString(CallContext *ctx);
};
struct EvalErrorPrototype: EvalErrorObject
diff --git a/src/v4/qv4functionobject.cpp b/src/v4/qv4functionobject.cpp
index 801291e04f..91bff4177d 100644
--- a/src/v4/qv4functionobject.cpp
+++ b/src/v4/qv4functionobject.cpp
@@ -239,7 +239,7 @@ void FunctionPrototype::init(ExecutionContext *ctx, const Value &ctor)
}
-Value FunctionPrototype::method_toString(ExecutionContext *ctx)
+Value FunctionPrototype::method_toString(CallContext *ctx)
{
FunctionObject *fun = ctx->thisObject.asFunctionObject();
if (!fun)
@@ -248,7 +248,7 @@ Value FunctionPrototype::method_toString(ExecutionContext *ctx)
return Value::fromString(ctx, QStringLiteral("function() { [code] }"));
}
-Value FunctionPrototype::method_apply(ExecutionContext *ctx)
+Value FunctionPrototype::method_apply(CallContext *ctx)
{
Value thisArg = ctx->argument(0);
@@ -273,7 +273,7 @@ Value FunctionPrototype::method_apply(ExecutionContext *ctx)
return o->call(ctx, thisArg, args.data(), args.size());
}
-Value FunctionPrototype::method_call(ExecutionContext *ctx)
+Value FunctionPrototype::method_call(CallContext *ctx)
{
Value thisArg = ctx->argument(0);
@@ -289,7 +289,7 @@ Value FunctionPrototype::method_call(ExecutionContext *ctx)
return o->call(ctx, thisArg, args.data(), args.size());
}
-Value FunctionPrototype::method_bind(ExecutionContext *ctx)
+Value FunctionPrototype::method_bind(CallContext *ctx)
{
FunctionObject *target = ctx->thisObject.asFunctionObject();
if (!target)
@@ -306,7 +306,7 @@ Value FunctionPrototype::method_bind(ExecutionContext *ctx)
}
-static Value throwTypeError(ExecutionContext *ctx)
+static Value throwTypeError(CallContext *ctx)
{
ctx->throwTypeError();
return Value::undefinedValue();
@@ -414,7 +414,7 @@ Value ScriptFunction::call(Managed *that, ExecutionContext *context, const Value
DEFINE_MANAGED_VTABLE(BuiltinFunctionOld);
-BuiltinFunctionOld::BuiltinFunctionOld(ExecutionContext *scope, String *name, Value (*code)(ExecutionContext *))
+BuiltinFunctionOld::BuiltinFunctionOld(ExecutionContext *scope, String *name, Value (*code)(CallContext *))
: FunctionObject(scope)
, code(code)
{
@@ -432,7 +432,7 @@ Value BuiltinFunctionOld::construct(Managed *, ExecutionContext *ctx, Value *, i
Value BuiltinFunctionOld::call(Managed *that, ExecutionContext *context, const Value &thisObject, Value *args, int argc)
{
BuiltinFunctionOld *f = static_cast<BuiltinFunctionOld *>(that);
- ExecutionContext *ctx = context->engine->newCallContext(f, thisObject, args, argc);
+ CallContext *ctx = context->engine->newCallContext(f, thisObject, args, argc);
ctx->thisObject = thisObject;
if (!f->strictMode && !thisObject.isObject()) {
diff --git a/src/v4/qv4functionobject.h b/src/v4/qv4functionobject.h
index 8531afda20..d145fb26d3 100644
--- a/src/v4/qv4functionobject.h
+++ b/src/v4/qv4functionobject.h
@@ -243,16 +243,16 @@ struct FunctionPrototype: FunctionObject
FunctionPrototype(ExecutionContext *ctx): FunctionObject(ctx) {}
void init(ExecutionContext *ctx, const Value &ctor);
- static Value method_toString(ExecutionContext *ctx);
- static Value method_apply(ExecutionContext *ctx);
- static Value method_call(ExecutionContext *ctx);
- static Value method_bind(ExecutionContext *ctx);
+ static Value method_toString(CallContext *ctx);
+ static Value method_apply(CallContext *ctx);
+ static Value method_call(CallContext *ctx);
+ static Value method_bind(CallContext *ctx);
};
struct BuiltinFunctionOld: FunctionObject {
- Value (*code)(ExecutionContext *);
+ Value (*code)(CallContext *);
- BuiltinFunctionOld(ExecutionContext *scope, String *name, Value (*code)(ExecutionContext *));
+ BuiltinFunctionOld(ExecutionContext *scope, String *name, Value (*code)(CallContext *));
static Value construct(Managed *, ExecutionContext *context, Value *args, int argc);
static Value call(Managed *that, ExecutionContext *, const Value &, Value *, int);
diff --git a/src/v4/qv4globalobject.cpp b/src/v4/qv4globalobject.cpp
index f93d125229..3abcd230d1 100644
--- a/src/v4/qv4globalobject.cpp
+++ b/src/v4/qv4globalobject.cpp
@@ -526,7 +526,7 @@ static inline int toInt(const QChar &qc, int R)
}
// parseInt [15.1.2.2]
-Value GlobalFunctions::method_parseInt(ExecutionContext *context)
+Value GlobalFunctions::method_parseInt(CallContext *context)
{
Value string = context->argument(0);
Value radix = context->argument(1);
@@ -605,7 +605,7 @@ Value GlobalFunctions::method_parseInt(ExecutionContext *context)
}
// parseFloat [15.1.2.3]
-Value GlobalFunctions::method_parseFloat(ExecutionContext *context)
+Value GlobalFunctions::method_parseFloat(CallContext *context)
{
Value string = context->argument(0);
@@ -631,7 +631,7 @@ Value GlobalFunctions::method_parseFloat(ExecutionContext *context)
}
/// isNaN [15.1.2.4]
-Value GlobalFunctions::method_isNaN(ExecutionContext *context)
+Value GlobalFunctions::method_isNaN(CallContext *context)
{
const Value &v = context->argument(0);
if (v.integerCompatible())
@@ -642,7 +642,7 @@ Value GlobalFunctions::method_isNaN(ExecutionContext *context)
}
/// isFinite [15.1.2.5]
-Value GlobalFunctions::method_isFinite(ExecutionContext *context)
+Value GlobalFunctions::method_isFinite(CallContext *context)
{
const Value &v = context->argument(0);
if (v.integerCompatible())
@@ -712,7 +712,7 @@ Value GlobalFunctions::method_encodeURIComponent(ExecutionContext *parentCtx, Va
return Value::fromString(parentCtx, out);
}
-Value GlobalFunctions::method_escape(ExecutionContext *context)
+Value GlobalFunctions::method_escape(CallContext *context)
{
if (!context->argumentCount)
return Value::fromString(context, QStringLiteral("undefined"));
@@ -721,7 +721,7 @@ Value GlobalFunctions::method_escape(ExecutionContext *context)
return Value::fromString(context, escape(str));
}
-Value GlobalFunctions::method_unescape(ExecutionContext *context)
+Value GlobalFunctions::method_unescape(CallContext *context)
{
if (!context->argumentCount)
return Value::fromString(context, QStringLiteral("undefined"));
diff --git a/src/v4/qv4globalobject.h b/src/v4/qv4globalobject.h
index 8d9341f066..d67f6d63cc 100644
--- a/src/v4/qv4globalobject.h
+++ b/src/v4/qv4globalobject.h
@@ -73,16 +73,16 @@ protected:
struct GlobalFunctions
{
- static Value method_parseInt(ExecutionContext *context);
- static Value method_parseFloat(ExecutionContext *context);
- static Value method_isNaN(ExecutionContext *context);
- static Value method_isFinite(ExecutionContext *context);
+ static Value method_parseInt(CallContext *context);
+ static Value method_parseFloat(CallContext *context);
+ static Value method_isNaN(CallContext *context);
+ static Value method_isFinite(CallContext *context);
static Value method_decodeURI(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
static Value method_decodeURIComponent(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
static Value method_encodeURI(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
static Value method_encodeURIComponent(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
- static Value method_escape(ExecutionContext *context);
- static Value method_unescape(ExecutionContext *context);
+ static Value method_escape(CallContext *context);
+ static Value method_unescape(CallContext *context);
};
} // namespace VM
diff --git a/src/v4/qv4isel_masm.cpp b/src/v4/qv4isel_masm.cpp
index 2cb10315a3..45e9450187 100644
--- a/src/v4/qv4isel_masm.cpp
+++ b/src/v4/qv4isel_masm.cpp
@@ -157,7 +157,7 @@ Assembler::Pointer Assembler::loadTempAddress(RegisterID reg, V4IR::Temp *t)
}
if (t->index < 0) {
const int arg = -t->index - 1;
- loadPtr(Address(context, offsetof(ExecutionContext, arguments)), reg);
+ loadPtr(Address(context, offsetof(CallContext, arguments)), reg);
offset = arg * sizeof(Value);
} else if (t->index < f->locals.size()) {
loadPtr(Address(context, offsetof(CallContext, locals)), reg);
diff --git a/src/v4/qv4jsonobject.cpp b/src/v4/qv4jsonobject.cpp
index 4ecb735ff6..f37a432ebc 100644
--- a/src/v4/qv4jsonobject.cpp
+++ b/src/v4/qv4jsonobject.cpp
@@ -876,7 +876,7 @@ JsonObject::JsonObject(ExecutionContext *context)
}
-Value JsonObject::method_parse(ExecutionContext *ctx)
+Value JsonObject::method_parse(CallContext *ctx)
{
QString jtext = ctx->argument(0).toString(ctx)->toQString();
@@ -892,7 +892,7 @@ Value JsonObject::method_parse(ExecutionContext *ctx)
return result;
}
-Value JsonObject::method_stringify(ExecutionContext *ctx)
+Value JsonObject::method_stringify(CallContext *ctx)
{
Stringify stringify(ctx);
diff --git a/src/v4/qv4jsonobject.h b/src/v4/qv4jsonobject.h
index 0d1c776206..8e4e4ae75a 100644
--- a/src/v4/qv4jsonobject.h
+++ b/src/v4/qv4jsonobject.h
@@ -51,8 +51,8 @@ namespace VM {
struct JsonObject : Object {
JsonObject(ExecutionContext *context);
- static Value method_parse(ExecutionContext *ctx);
- static Value method_stringify(ExecutionContext *ctx);
+ static Value method_parse(CallContext *ctx);
+ static Value method_stringify(CallContext *ctx);
};
diff --git a/src/v4/qv4numberobject.cpp b/src/v4/qv4numberobject.cpp
index d95520fe43..22f2e40fb7 100644
--- a/src/v4/qv4numberobject.cpp
+++ b/src/v4/qv4numberobject.cpp
@@ -96,7 +96,7 @@ void NumberPrototype::init(ExecutionContext *ctx, const Value &ctor)
defineDefaultProperty(ctx, QStringLiteral("toPrecision"), method_toPrecision);
}
-Value NumberPrototype::method_toString(ExecutionContext *ctx)
+Value NumberPrototype::method_toString(CallContext *ctx)
{
double num;
if (ctx->thisObject.isNumber()) {
@@ -158,7 +158,7 @@ Value NumberPrototype::method_toString(ExecutionContext *ctx)
return Value::fromString(str);
}
-Value NumberPrototype::method_toLocaleString(ExecutionContext *ctx)
+Value NumberPrototype::method_toLocaleString(CallContext *ctx)
{
NumberObject *thisObject = ctx->thisObject.asNumberObject();
if (!thisObject)
@@ -168,7 +168,7 @@ Value NumberPrototype::method_toLocaleString(ExecutionContext *ctx)
return Value::fromString(str);
}
-Value NumberPrototype::method_valueOf(ExecutionContext *ctx)
+Value NumberPrototype::method_valueOf(CallContext *ctx)
{
NumberObject *thisObject = ctx->thisObject.asNumberObject();
if (!thisObject)
@@ -177,7 +177,7 @@ Value NumberPrototype::method_valueOf(ExecutionContext *ctx)
return thisObject->value;
}
-Value NumberPrototype::method_toFixed(ExecutionContext *ctx)
+Value NumberPrototype::method_toFixed(CallContext *ctx)
{
NumberObject *thisObject = ctx->thisObject.asNumberObject();
if (!thisObject)
@@ -207,7 +207,7 @@ Value NumberPrototype::method_toFixed(ExecutionContext *ctx)
return Value::fromString(ctx, str);
}
-Value NumberPrototype::method_toExponential(ExecutionContext *ctx)
+Value NumberPrototype::method_toExponential(CallContext *ctx)
{
NumberObject *thisObject = ctx->thisObject.asNumberObject();
if (!thisObject)
@@ -222,7 +222,7 @@ Value NumberPrototype::method_toExponential(ExecutionContext *ctx)
return Value::fromString(ctx, z);
}
-Value NumberPrototype::method_toPrecision(ExecutionContext *ctx)
+Value NumberPrototype::method_toPrecision(CallContext *ctx)
{
NumberObject *thisObject = ctx->thisObject.asNumberObject();
if (!thisObject)
diff --git a/src/v4/qv4numberobject.h b/src/v4/qv4numberobject.h
index 4677a77212..f273e0006e 100644
--- a/src/v4/qv4numberobject.h
+++ b/src/v4/qv4numberobject.h
@@ -66,12 +66,12 @@ struct NumberPrototype: NumberObject
NumberPrototype(ExecutionEngine *engine): NumberObject(engine, Value::fromDouble(0)) {}
void init(ExecutionContext *ctx, const Value &ctor);
- static Value method_toString(ExecutionContext *ctx);
- static Value method_toLocaleString(ExecutionContext *ctx);
- static Value method_valueOf(ExecutionContext *ctx);
- static Value method_toFixed(ExecutionContext *ctx);
- static Value method_toExponential(ExecutionContext *ctx);
- static Value method_toPrecision(ExecutionContext *ctx);
+ static Value method_toString(CallContext *ctx);
+ static Value method_toLocaleString(CallContext *ctx);
+ static Value method_valueOf(CallContext *ctx);
+ static Value method_toFixed(CallContext *ctx);
+ static Value method_toExponential(CallContext *ctx);
+ static Value method_toPrecision(CallContext *ctx);
};
diff --git a/src/v4/qv4object.cpp b/src/v4/qv4object.cpp
index acfa91f3ba..07d66ed58d 100644
--- a/src/v4/qv4object.cpp
+++ b/src/v4/qv4object.cpp
@@ -205,7 +205,7 @@ void Object::defineDefaultProperty(ExecutionContext *context, const QString &nam
defineDefaultProperty(context->engine->newIdentifier(name), value);
}
-void Object::defineDefaultProperty(ExecutionContext *context, const QString &name, Value (*code)(ExecutionContext *), int argumentCount)
+void Object::defineDefaultProperty(ExecutionContext *context, const QString &name, Value (*code)(CallContext *), int argumentCount)
{
Q_UNUSED(argumentCount);
String *s = context->engine->newIdentifier(name);
diff --git a/src/v4/qv4object.h b/src/v4/qv4object.h
index 800d709448..2f2d7579a4 100644
--- a/src/v4/qv4object.h
+++ b/src/v4/qv4object.h
@@ -80,6 +80,7 @@ struct RegExpObject;
struct ErrorObject;
struct ArgumentsObject;
struct ExecutionContext;
+struct CallContext;
struct ExecutionEngine;
class MemoryManager;
@@ -177,7 +178,7 @@ struct Q_V4_EXPORT Object: Managed {
/* The spec default: Writable: true, Enumerable: false, Configurable: true */
void defineDefaultProperty(String *name, Value value);
void defineDefaultProperty(ExecutionContext *context, const QString &name, Value value);
- void defineDefaultProperty(ExecutionContext *context, const QString &name, Value (*code)(ExecutionContext *), int count = 0);
+ void defineDefaultProperty(ExecutionContext *context, const QString &name, Value (*code)(CallContext *), int count = 0);
void defineDefaultProperty(ExecutionContext *context, const QString &name, Value (*code)(ExecutionContext *, Value, Value *, int), int argumentCount = 0);
/* Fixed: Writable: false, Enumerable: false, Configurable: false */
void defineReadonlyProperty(ExecutionEngine *engine, const QString &name, Value value);
diff --git a/src/v4/qv4objectproto.cpp b/src/v4/qv4objectproto.cpp
index 7094eb8e7a..43ada02f4d 100644
--- a/src/v4/qv4objectproto.cpp
+++ b/src/v4/qv4objectproto.cpp
@@ -128,7 +128,7 @@ void ObjectPrototype::init(ExecutionContext *ctx, const Value &ctor)
defineDefaultProperty(ctx, QStringLiteral("__defineSetter__"), method_defineSetter, 0);
}
-Value ObjectPrototype::method_getPrototypeOf(ExecutionContext *ctx)
+Value ObjectPrototype::method_getPrototypeOf(CallContext *ctx)
{
Value o = ctx->argument(0);
if (! o.isObject())
@@ -138,7 +138,7 @@ Value ObjectPrototype::method_getPrototypeOf(ExecutionContext *ctx)
return p ? Value::fromObject(p) : Value::nullValue();
}
-Value ObjectPrototype::method_getOwnPropertyDescriptor(ExecutionContext *ctx)
+Value ObjectPrototype::method_getOwnPropertyDescriptor(CallContext *ctx)
{
Value O = ctx->argument(0);
if (!O.isObject())
@@ -166,7 +166,7 @@ Value ObjectPrototype::method_getOwnPropertyNames(ExecutionContext *parentCtx, V
return Value::fromObject(array);
}
-Value ObjectPrototype::method_create(ExecutionContext *ctx)
+Value ObjectPrototype::method_create(CallContext *ctx)
{
Value O = ctx->argument(0);
if (!O.isObject() && !O.isNull())
@@ -184,7 +184,7 @@ Value ObjectPrototype::method_create(ExecutionContext *ctx)
return objValue;
}
-Value ObjectPrototype::method_defineProperty(ExecutionContext *ctx)
+Value ObjectPrototype::method_defineProperty(CallContext *ctx)
{
Value O = ctx->argument(0);
if (!O.isObject())
@@ -202,7 +202,7 @@ Value ObjectPrototype::method_defineProperty(ExecutionContext *ctx)
return O;
}
-Value ObjectPrototype::method_defineProperties(ExecutionContext *ctx)
+Value ObjectPrototype::method_defineProperties(CallContext *ctx)
{
Value O = ctx->argument(0);
if (!O.isObject())
@@ -231,7 +231,7 @@ Value ObjectPrototype::method_defineProperties(ExecutionContext *ctx)
return O;
}
-Value ObjectPrototype::method_seal(ExecutionContext *ctx)
+Value ObjectPrototype::method_seal(CallContext *ctx)
{
if (!ctx->argument(0).isObject())
ctx->throwTypeError();
@@ -251,7 +251,7 @@ Value ObjectPrototype::method_seal(ExecutionContext *ctx)
return ctx->argument(0);
}
-Value ObjectPrototype::method_freeze(ExecutionContext *ctx)
+Value ObjectPrototype::method_freeze(CallContext *ctx)
{
if (!ctx->argument(0).isObject())
ctx->throwTypeError();
@@ -273,7 +273,7 @@ Value ObjectPrototype::method_freeze(ExecutionContext *ctx)
return ctx->argument(0);
}
-Value ObjectPrototype::method_preventExtensions(ExecutionContext *ctx)
+Value ObjectPrototype::method_preventExtensions(CallContext *ctx)
{
if (!ctx->argument(0).isObject())
ctx->throwTypeError();
@@ -283,7 +283,7 @@ Value ObjectPrototype::method_preventExtensions(ExecutionContext *ctx)
return ctx->argument(0);
}
-Value ObjectPrototype::method_isSealed(ExecutionContext *ctx)
+Value ObjectPrototype::method_isSealed(CallContext *ctx)
{
if (!ctx->argument(0).isObject())
ctx->throwTypeError();
@@ -305,7 +305,7 @@ Value ObjectPrototype::method_isSealed(ExecutionContext *ctx)
return Value::fromBoolean(true);
}
-Value ObjectPrototype::method_isFrozen(ExecutionContext *ctx)
+Value ObjectPrototype::method_isFrozen(CallContext *ctx)
{
if (!ctx->argument(0).isObject())
ctx->throwTypeError();
@@ -327,7 +327,7 @@ Value ObjectPrototype::method_isFrozen(ExecutionContext *ctx)
return Value::fromBoolean(true);
}
-Value ObjectPrototype::method_isExtensible(ExecutionContext *ctx)
+Value ObjectPrototype::method_isExtensible(CallContext *ctx)
{
if (!ctx->argument(0).isObject())
ctx->throwTypeError();
@@ -336,7 +336,7 @@ Value ObjectPrototype::method_isExtensible(ExecutionContext *ctx)
return Value::fromBoolean(o->extensible);
}
-Value ObjectPrototype::method_keys(ExecutionContext *ctx)
+Value ObjectPrototype::method_keys(CallContext *ctx)
{
if (!ctx->argument(0).isObject())
ctx->throwTypeError();
@@ -365,7 +365,7 @@ Value ObjectPrototype::method_keys(ExecutionContext *ctx)
return Value::fromObject(a);
}
-Value ObjectPrototype::method_toString(ExecutionContext *ctx)
+Value ObjectPrototype::method_toString(CallContext *ctx)
{
if (ctx->thisObject.isUndefined()) {
return Value::fromString(ctx, QStringLiteral("[object Undefined]"));
@@ -378,7 +378,7 @@ Value ObjectPrototype::method_toString(ExecutionContext *ctx)
}
}
-Value ObjectPrototype::method_toLocaleString(ExecutionContext *ctx)
+Value ObjectPrototype::method_toLocaleString(CallContext *ctx)
{
Object *o = ctx->thisObject.toObject(ctx);
Value ts = o->get(ctx, ctx->engine->newString(QStringLiteral("toString")));
@@ -388,12 +388,12 @@ Value ObjectPrototype::method_toLocaleString(ExecutionContext *ctx)
return f->call(ctx, Value::fromObject(o), 0, 0);
}
-Value ObjectPrototype::method_valueOf(ExecutionContext *ctx)
+Value ObjectPrototype::method_valueOf(CallContext *ctx)
{
return Value::fromObject(ctx->thisObject.toObject(ctx));
}
-Value ObjectPrototype::method_hasOwnProperty(ExecutionContext *ctx)
+Value ObjectPrototype::method_hasOwnProperty(CallContext *ctx)
{
String *P = ctx->argument(0).toString(ctx);
Object *O = ctx->thisObject.toObject(ctx);
@@ -401,7 +401,7 @@ Value ObjectPrototype::method_hasOwnProperty(ExecutionContext *ctx)
return Value::fromBoolean(r);
}
-Value ObjectPrototype::method_isPrototypeOf(ExecutionContext *ctx)
+Value ObjectPrototype::method_isPrototypeOf(CallContext *ctx)
{
Value V = ctx->argument(0);
if (! V.isObject())
@@ -417,7 +417,7 @@ Value ObjectPrototype::method_isPrototypeOf(ExecutionContext *ctx)
return Value::fromBoolean(false);
}
-Value ObjectPrototype::method_propertyIsEnumerable(ExecutionContext *ctx)
+Value ObjectPrototype::method_propertyIsEnumerable(CallContext *ctx)
{
String *p = ctx->argument(0).toString(ctx);
@@ -426,7 +426,7 @@ Value ObjectPrototype::method_propertyIsEnumerable(ExecutionContext *ctx)
return Value::fromBoolean(pd && pd->isEnumerable());
}
-Value ObjectPrototype::method_defineGetter(ExecutionContext *ctx)
+Value ObjectPrototype::method_defineGetter(CallContext *ctx)
{
if (ctx->argumentCount < 2)
ctx->throwTypeError();
@@ -445,7 +445,7 @@ Value ObjectPrototype::method_defineGetter(ExecutionContext *ctx)
return Value::undefinedValue();
}
-Value ObjectPrototype::method_defineSetter(ExecutionContext *ctx)
+Value ObjectPrototype::method_defineSetter(CallContext *ctx)
{
if (ctx->argumentCount < 2)
ctx->throwTypeError();
diff --git a/src/v4/qv4objectproto.h b/src/v4/qv4objectproto.h
index c985a2627e..c9dba659ba 100644
--- a/src/v4/qv4objectproto.h
+++ b/src/v4/qv4objectproto.h
@@ -67,29 +67,29 @@ struct ObjectPrototype: Object
void init(ExecutionContext *ctx, const Value &ctor);
- static Value method_getPrototypeOf(ExecutionContext *ctx);
- static Value method_getOwnPropertyDescriptor(ExecutionContext *ctx);
+ static Value method_getPrototypeOf(CallContext *ctx);
+ static Value method_getOwnPropertyDescriptor(CallContext *ctx);
static Value method_getOwnPropertyNames(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
- static Value method_create(ExecutionContext *ctx);
- static Value method_defineProperty(ExecutionContext *ctx);
- static Value method_defineProperties(ExecutionContext *ctx);
- static Value method_seal(ExecutionContext *ctx);
- static Value method_freeze(ExecutionContext *ctx);
- static Value method_preventExtensions(ExecutionContext *ctx);
- static Value method_isSealed(ExecutionContext *ctx);
- static Value method_isFrozen(ExecutionContext *ctx);
- static Value method_isExtensible(ExecutionContext *ctx);
- static Value method_keys(ExecutionContext *ctx);
-
- static Value method_toString(ExecutionContext *ctx);
- static Value method_toLocaleString(ExecutionContext *ctx);
- static Value method_valueOf(ExecutionContext *ctx);
- static Value method_hasOwnProperty(ExecutionContext *ctx);
- static Value method_isPrototypeOf(ExecutionContext *ctx);
- static Value method_propertyIsEnumerable(ExecutionContext *ctx);
-
- static Value method_defineGetter(ExecutionContext *ctx);
- static Value method_defineSetter(ExecutionContext *ctx);
+ static Value method_create(CallContext *ctx);
+ static Value method_defineProperty(CallContext *ctx);
+ static Value method_defineProperties(CallContext *ctx);
+ static Value method_seal(CallContext *ctx);
+ static Value method_freeze(CallContext *ctx);
+ static Value method_preventExtensions(CallContext *ctx);
+ static Value method_isSealed(CallContext *ctx);
+ static Value method_isFrozen(CallContext *ctx);
+ static Value method_isExtensible(CallContext *ctx);
+ static Value method_keys(CallContext *ctx);
+
+ static Value method_toString(CallContext *ctx);
+ static Value method_toLocaleString(CallContext *ctx);
+ static Value method_valueOf(CallContext *ctx);
+ static Value method_hasOwnProperty(CallContext *ctx);
+ static Value method_isPrototypeOf(CallContext *ctx);
+ static Value method_propertyIsEnumerable(CallContext *ctx);
+
+ static Value method_defineGetter(CallContext *ctx);
+ static Value method_defineSetter(CallContext *ctx);
static void toPropertyDescriptor(ExecutionContext *ctx, Value v, PropertyDescriptor *desc);
static Value fromPropertyDescriptor(ExecutionContext *ctx, const PropertyDescriptor *desc);
diff --git a/src/v4/qv4regexpobject.cpp b/src/v4/qv4regexpobject.cpp
index 19be8d9792..1800e0eb42 100644
--- a/src/v4/qv4regexpobject.cpp
+++ b/src/v4/qv4regexpobject.cpp
@@ -179,7 +179,7 @@ void RegExpPrototype::init(ExecutionContext *ctx, const Value &ctor)
defineDefaultProperty(ctx, QStringLiteral("compile"), method_compile, 2);
}
-Value RegExpPrototype::method_exec(ExecutionContext *ctx)
+Value RegExpPrototype::method_exec(CallContext *ctx)
{
RegExpObject *r = ctx->thisObject.asRegExpObject();
if (!r)
@@ -222,13 +222,13 @@ Value RegExpPrototype::method_exec(ExecutionContext *ctx)
return Value::fromObject(array);
}
-Value RegExpPrototype::method_test(ExecutionContext *ctx)
+Value RegExpPrototype::method_test(CallContext *ctx)
{
Value r = method_exec(ctx);
return Value::fromBoolean(!r.isNull());
}
-Value RegExpPrototype::method_toString(ExecutionContext *ctx)
+Value RegExpPrototype::method_toString(CallContext *ctx)
{
RegExpObject *r = ctx->thisObject.asRegExpObject();
if (!r)
@@ -244,7 +244,7 @@ Value RegExpPrototype::method_toString(ExecutionContext *ctx)
return Value::fromString(ctx, result);
}
-Value RegExpPrototype::method_compile(ExecutionContext *ctx)
+Value RegExpPrototype::method_compile(CallContext *ctx)
{
RegExpObject *r = ctx->thisObject.asRegExpObject();
if (!r)
diff --git a/src/v4/qv4regexpobject.h b/src/v4/qv4regexpobject.h
index d83e686243..d9dc624f52 100644
--- a/src/v4/qv4regexpobject.h
+++ b/src/v4/qv4regexpobject.h
@@ -94,10 +94,10 @@ struct RegExpPrototype: RegExpObject
RegExpPrototype(ExecutionEngine* engine): RegExpObject(engine, RegExp::create(engine, QString()), false) {}
void init(ExecutionContext *ctx, const Value &ctor);
- static Value method_exec(ExecutionContext *ctx);
- static Value method_test(ExecutionContext *ctx);
- static Value method_toString(ExecutionContext *ctx);
- static Value method_compile(ExecutionContext *ctx);
+ static Value method_exec(CallContext *ctx);
+ static Value method_test(CallContext *ctx);
+ static Value method_toString(CallContext *ctx);
+ static Value method_compile(CallContext *ctx);
};
} // namespace VM
diff --git a/src/v4/qv4stringobject.cpp b/src/v4/qv4stringobject.cpp
index d2046fc956..7195d160b4 100644
--- a/src/v4/qv4stringobject.cpp
+++ b/src/v4/qv4stringobject.cpp
@@ -400,7 +400,7 @@ static QString makeReplacementString(const QString &input, const QString& replac
return result;
}
-Value StringPrototype::method_replace(ExecutionContext *ctx)
+Value StringPrototype::method_replace(CallContext *ctx)
{
QString string;
if (StringObject *thisString = ctx->thisObject.asStringObject())
@@ -488,7 +488,7 @@ Value StringPrototype::method_replace(ExecutionContext *ctx)
return Value::fromString(ctx, result);
}
-Value StringPrototype::method_search(ExecutionContext *ctx)
+Value StringPrototype::method_search(CallContext *ctx)
{
QString string;
if (StringObject *thisString = ctx->thisObject.asStringObject())
@@ -509,7 +509,7 @@ Value StringPrototype::method_search(ExecutionContext *ctx)
return Value::fromUInt32(result);
}
-Value StringPrototype::method_slice(ExecutionContext *ctx)
+Value StringPrototype::method_slice(CallContext *ctx)
{
const QString text = getThisString(ctx);
const double length = text.length();
@@ -535,7 +535,7 @@ Value StringPrototype::method_slice(ExecutionContext *ctx)
return Value::fromString(ctx, text.mid(intStart, count));
}
-Value StringPrototype::method_split(ExecutionContext *ctx)
+Value StringPrototype::method_split(CallContext *ctx)
{
QString text;
if (StringObject *thisObject = ctx->thisObject.asStringObject())
@@ -676,24 +676,24 @@ Value StringPrototype::method_substring(ExecutionContext *parentCtx, Value thisO
return Value::fromString(parentCtx, value.mid(x, y));
}
-Value StringPrototype::method_toLowerCase(ExecutionContext *ctx)
+Value StringPrototype::method_toLowerCase(CallContext *ctx)
{
QString value = getThisString(ctx);
return Value::fromString(ctx, value.toLower());
}
-Value StringPrototype::method_toLocaleLowerCase(ExecutionContext *ctx)
+Value StringPrototype::method_toLocaleLowerCase(CallContext *ctx)
{
return method_toLowerCase(ctx);
}
-Value StringPrototype::method_toUpperCase(ExecutionContext *ctx)
+Value StringPrototype::method_toUpperCase(CallContext *ctx)
{
QString value = getThisString(ctx);
return Value::fromString(ctx, value.toUpper());
}
-Value StringPrototype::method_toLocaleUpperCase(ExecutionContext *ctx)
+Value StringPrototype::method_toLocaleUpperCase(CallContext *ctx)
{
return method_toUpperCase(ctx);
}
@@ -709,7 +709,7 @@ Value StringPrototype::method_fromCharCode(ExecutionContext *parentCtx, Value, V
return Value::fromString(parentCtx, str);
}
-Value StringPrototype::method_trim(ExecutionContext *ctx)
+Value StringPrototype::method_trim(CallContext *ctx)
{
if (ctx->thisObject.isNull() || ctx->thisObject.isUndefined())
ctx->throwTypeError();
diff --git a/src/v4/qv4stringobject.h b/src/v4/qv4stringobject.h
index 67a59430dd..c879504d00 100644
--- a/src/v4/qv4stringobject.h
+++ b/src/v4/qv4stringobject.h
@@ -86,18 +86,18 @@ struct StringPrototype: StringObject
static Value method_lastIndexOf(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
static Value method_localeCompare(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
static Value method_match(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
- static Value method_replace(ExecutionContext *ctx);
- static Value method_search(ExecutionContext *ctx);
- static Value method_slice(ExecutionContext *ctx);
- static Value method_split(ExecutionContext *ctx);
+ static Value method_replace(CallContext *ctx);
+ static Value method_search(CallContext *ctx);
+ static Value method_slice(CallContext *ctx);
+ static Value method_split(CallContext *ctx);
static Value method_substr(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
static Value method_substring(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
- static Value method_toLowerCase(ExecutionContext *ctx);
- static Value method_toLocaleLowerCase(ExecutionContext *ctx);
- static Value method_toUpperCase(ExecutionContext *ctx);
- static Value method_toLocaleUpperCase(ExecutionContext *ctx);
+ static Value method_toLowerCase(CallContext *ctx);
+ static Value method_toLocaleLowerCase(CallContext *ctx);
+ static Value method_toUpperCase(CallContext *ctx);
+ static Value method_toLocaleUpperCase(CallContext *ctx);
static Value method_fromCharCode(ExecutionContext *parentCtx, Value thisObject, Value *argv, int argc);
- static Value method_trim(ExecutionContext *ctx);
+ static Value method_trim(CallContext *ctx);
};
} // end of namespace VM