aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp2
-rw-r--r--src/qml/jsapi/qjsengine.cpp2
-rw-r--r--src/qml/jsruntime/qv4debugging.cpp10
-rw-r--r--src/qml/jsruntime/qv4engine.cpp14
-rw-r--r--src/qml/jsruntime/qv4engine_p.h18
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp8
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp2
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp28
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h8
-rw-r--r--src/qml/jsruntime/qv4script.cpp2
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp8
-rw-r--r--src/qml/memory/qv4mm.cpp2
13 files changed, 53 insertions, 53 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
index 49dde9e8bf..f788a0a217 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
@@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE
QV4::Heap::CallContext *QV4DataCollector::findContext(QV4::ExecutionEngine *engine, int frame)
{
- QV4::ExecutionContext *ctx = engine->currentExecutionContext;
+ QV4::ExecutionContext *ctx = engine->currentContext;
while (ctx) {
QV4::CallContext *cCtxt = ctx->asCallContext();
if (cCtxt && cCtxt->d()->function) {
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 3ca05b90c1..b217d3fb4c 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -319,7 +319,7 @@ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, in
QV4::Scope scope(v4);
QV4::ExecutionContextSaver saver(scope);
- QV4::ExecutionContext *ctx = v4->currentExecutionContext;
+ QV4::ExecutionContext *ctx = v4->currentContext;
if (ctx->d() != v4->rootContext()->d())
ctx = v4->pushGlobalContext();
QV4::ScopedValue result(scope);
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp
index 687ea35808..79fd58f700 100644
--- a/src/qml/jsruntime/qv4debugging.cpp
+++ b/src/qml/jsruntime/qv4debugging.cpp
@@ -68,7 +68,7 @@ void Debugger::JavaScriptJob::run()
ExecutionContextSaver saver(scope);
- ExecutionContext *ctx = engine->currentExecutionContext;
+ ExecutionContext *ctx = engine->currentContext;
if (frameNr > 0) {
for (int i = 0; i < frameNr; ++i) {
ctx = engine->parentContext(ctx);
@@ -150,7 +150,7 @@ void Debugger::resume(Speed speed)
if (!m_returnedValue.isUndefined())
m_returnedValue.set(m_engine, Encode::undefined());
- m_currentContext.set(m_engine, *m_engine->currentExecutionContext);
+ m_currentContext.set(m_engine, *m_engine->currentContext);
m_stepping = speed;
m_runningCondition.wakeAll();
}
@@ -235,7 +235,7 @@ void Debugger::enteringFunction()
QMutexLocker locker(&m_lock);
if (m_stepping == StepIn) {
- m_currentContext.set(m_engine, *m_engine->currentExecutionContext);
+ m_currentContext.set(m_engine, *m_engine->currentContext);
}
}
@@ -248,7 +248,7 @@ void Debugger::leavingFunction(const ReturnedValue &retVal)
QMutexLocker locker(&m_lock);
if (m_stepping != NotStepping && m_currentContext.asManaged()->d() == m_engine->current) {
- m_currentContext.set(m_engine, *m_engine->parentContext(m_engine->currentExecutionContext));
+ m_currentContext.set(m_engine, *m_engine->parentContext(m_engine->currentContext));
m_stepping = StepOver;
m_returnedValue.set(m_engine, retVal);
}
@@ -269,7 +269,7 @@ void Debugger::aboutToThrow()
Function *Debugger::getFunction() const
{
Scope scope(m_engine);
- ExecutionContext *context = m_engine->currentExecutionContext;
+ ExecutionContext *context = m_engine->currentContext;
ScopedFunctionObject function(scope, context->getFunctionObject());
if (function)
return function->function();
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index cd3b60b77f..4254626d63 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -200,7 +200,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
, memoryManager(new QV4::MemoryManager(this))
, executableAllocator(new QV4::ExecutableAllocator)
, regExpAllocator(new QV4::ExecutableAllocator)
- , currentExecutionContext(0)
+ , currentContext(0)
, bumperPointerAllocator(new WTF::BumpPointerAllocator)
, jsStack(new WTF::PageAllocation)
, debugger(0)
@@ -512,8 +512,8 @@ void ExecutionEngine::initRootContext()
jsObjects[RootContect] = r;
jsObjects[IntegerNull] = Encode((int)0);
- currentExecutionContext = static_cast<ExecutionContext *>(jsObjects + RootContect);
- current = currentExecutionContext->d();
+ currentContext = static_cast<ExecutionContext *>(jsObjects + RootContect);
+ current = currentContext->d();
}
InternalClass *ExecutionEngine::newClass(const InternalClass &other)
@@ -526,7 +526,7 @@ ExecutionContext *ExecutionEngine::pushGlobalContext()
pushContext(rootContext()->d());
Q_ASSERT(current == rootContext()->d());
- return currentExecutionContext;
+ return currentContext;
}
ExecutionContext *ExecutionEngine::parentContext(ExecutionContext *context) const
@@ -741,7 +741,7 @@ Heap::QmlContext *ExecutionEngine::qmlContext() const
// get the correct context when we're within a builtin function
if (ctx->type == Heap::ExecutionContext::Type_SimpleCallContext && !ctx->outer)
- ctx = parentContext(currentExecutionContext)->d();
+ ctx = parentContext(currentContext)->d();
if (!ctx->outer)
return 0;
@@ -801,7 +801,7 @@ QVector<StackFrame> ExecutionEngine::stackTrace(int frameLimit) const
ScopedString name(scope);
QVector<StackFrame> stack;
- ExecutionContext *c = currentExecutionContext;
+ ExecutionContext *c = currentContext;
ScopedFunctionObject function(scope);
while (c && frameLimit) {
function = c->getFunctionObject();
@@ -889,7 +889,7 @@ QUrl ExecutionEngine::resolvedUrl(const QString &file)
return src;
QUrl base;
- ExecutionContext *c = currentExecutionContext;
+ ExecutionContext *c = currentContext;
while (c) {
CallContext *callCtx = c->asCallContext();
if (callCtx && callCtx->d()->function) {
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index eaa0439c74..eba60bf215 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -87,7 +87,7 @@ public:
ExecutableAllocator *regExpAllocator;
QScopedPointer<EvalISelFactory> iselFactory;
- ExecutionContext *currentExecutionContext;
+ ExecutionContext *currentContext;
Value *jsStackLimit;
quintptr cStackLimit;
@@ -446,12 +446,12 @@ public:
inline void ExecutionEngine::pushContext(Heap::ExecutionContext *context)
{
- Q_ASSERT(currentExecutionContext && context);
+ Q_ASSERT(currentContext && context);
Value *v = jsAlloca(2);
v[0] = Encode(context);
- v[1] = Encode((int)(v - static_cast<Value *>(currentExecutionContext)));
- currentExecutionContext = static_cast<ExecutionContext *>(v);
- current = currentExecutionContext->d();
+ v[1] = Encode((int)(v - static_cast<Value *>(currentContext)));
+ currentContext = static_cast<ExecutionContext *>(v);
+ current = currentContext->d();
}
inline void ExecutionEngine::pushContext(ExecutionContext *context)
@@ -462,13 +462,13 @@ inline void ExecutionEngine::pushContext(ExecutionContext *context)
inline void ExecutionEngine::popContext()
{
- Q_ASSERT(jsStackTop > currentExecutionContext);
- QV4::Value *offset = (currentExecutionContext + 1);
+ Q_ASSERT(jsStackTop > currentContext);
+ QV4::Value *offset = (currentContext + 1);
Q_ASSERT(offset->isInteger());
int o = offset->integerValue();
Q_ASSERT(o);
- currentExecutionContext -= o;
- current = currentExecutionContext->d();
+ currentContext -= o;
+ current = currentContext->d();
}
inline
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 5a03c9e201..acb0342fc2 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -443,7 +443,7 @@ ReturnedValue ScriptFunction::construct(const Managed *that, CallData *callData)
ScopedObject obj(scope, v4->newObject(ic, proto));
callData->thisObject = obj.asReturnedValue();
- Scoped<CallContext> ctx(scope, v4->currentExecutionContext->newCallContext(f, callData));
+ Scoped<CallContext> ctx(scope, v4->currentContext->newCallContext(f, callData));
v4->pushContext(ctx);
ScopedValue result(scope, Q_V4_PROFILE(v4, f->function()));
@@ -470,7 +470,7 @@ ReturnedValue ScriptFunction::call(const Managed *that, CallData *callData)
ExecutionContextSaver ctxSaver(scope);
Scoped<ScriptFunction> f(scope, static_cast<const ScriptFunction *>(that));
- Scoped<CallContext> ctx(scope, v4->currentExecutionContext->newCallContext(f, callData));
+ Scoped<CallContext> ctx(scope, v4->currentContext->newCallContext(f, callData));
v4->pushContext(ctx);
ScopedValue result(scope, Q_V4_PROFILE(v4, f->function()));
@@ -640,7 +640,7 @@ ReturnedValue BuiltinFunction::call(const Managed *that, CallData *callData)
v4->pushContext(&ctx);
Q_ASSERT(v4->current == &ctx);
- return f->d()->code(static_cast<QV4::CallContext *>(v4->currentExecutionContext));
+ return f->d()->code(static_cast<QV4::CallContext *>(v4->currentContext));
}
ReturnedValue IndexedBuiltinFunction::call(const Managed *that, CallData *callData)
@@ -664,7 +664,7 @@ ReturnedValue IndexedBuiltinFunction::call(const Managed *that, CallData *callDa
v4->pushContext(&ctx);
Q_ASSERT(v4->current == &ctx);
- return f->d()->code(static_cast<QV4::CallContext *>(v4->currentExecutionContext), f->d()->index);
+ return f->d()->code(static_cast<QV4::CallContext *>(v4->currentContext), f->d()->index);
}
DEFINE_OBJECT_VTABLE(IndexedBuiltinFunction);
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index 5fcaa6265e..110a2c9089 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -341,7 +341,7 @@ ReturnedValue EvalFunction::evalCall(CallData *callData, bool directCall) const
Scope scope(v4);
ExecutionContextSaver ctxSaver(scope);
- ExecutionContext *currentContext = v4->currentExecutionContext;
+ ExecutionContext *currentContext = v4->currentContext;
ExecutionContext *ctx = currentContext;
if (!directCall) {
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index a762ed35d1..7553e46e9b 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -1813,7 +1813,7 @@ ReturnedValue QObjectMethod::call(const Managed *m, CallData *callData)
ReturnedValue QObjectMethod::callInternal(CallData *callData) const
{
Scope scope(engine());
- ExecutionContext *context = scope.engine->currentExecutionContext;
+ ExecutionContext *context = scope.engine->currentContext;
if (d()->index == DestroyMethod)
return method_destroy(context, callData->args, callData->argc);
else if (d()->index == ToStringMethod)
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index f17f4e04f6..7312a57049 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -270,7 +270,7 @@ ReturnedValue Runtime::closure(ExecutionEngine *engine, int functionId)
{
QV4::Function *clos = engine->current->compilationUnit->runtimeFunctions[functionId];
Q_ASSERT(clos);
- return FunctionObject::createScriptFunction(engine->currentExecutionContext, clos)->asReturnedValue();
+ return FunctionObject::createScriptFunction(engine->currentContext, clos)->asReturnedValue();
}
ReturnedValue Runtime::deleteElement(ExecutionEngine *engine, const Value &base, const Value &index)
@@ -308,7 +308,7 @@ ReturnedValue Runtime::deleteName(ExecutionEngine *engine, int nameIndex)
{
Scope scope(engine);
ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[nameIndex]);
- return Encode(engine->currentExecutionContext->deleteProperty(name));
+ return Encode(engine->currentContext->deleteProperty(name));
}
QV4::ReturnedValue Runtime::instanceof(ExecutionEngine *engine, const Value &left, const Value &right)
@@ -662,7 +662,7 @@ void Runtime::setActivationProperty(ExecutionEngine *engine, int nameIndex, cons
{
Scope scope(engine);
ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[nameIndex]);
- engine->currentExecutionContext->setProperty(name, value);
+ engine->currentContext->setProperty(name, value);
}
ReturnedValue Runtime::getProperty(ExecutionEngine *engine, const Value &object, int nameIndex)
@@ -689,7 +689,7 @@ ReturnedValue Runtime::getActivationProperty(ExecutionEngine *engine, int nameIn
{
Scope scope(engine);
ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[nameIndex]);
- return engine->currentExecutionContext->getProperty(name);
+ return engine->currentContext->getProperty(name);
}
#endif // V4_BOOTSTRAP
@@ -925,7 +925,7 @@ ReturnedValue Runtime::callActivationProperty(ExecutionEngine *engine, int nameI
ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[nameIndex]);
ScopedObject base(scope);
- ScopedValue func(scope, engine->currentExecutionContext->getPropertyAndBase(name, base.getRef()));
+ ScopedValue func(scope, engine->currentContext->getPropertyAndBase(name, base.getRef()));
if (scope.engine->hasException)
return Encode::undefined();
@@ -1054,7 +1054,7 @@ ReturnedValue Runtime::constructActivationProperty(ExecutionEngine *engine, int
{
Scope scope(engine);
ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[nameIndex]);
- ScopedValue func(scope, engine->currentExecutionContext->getProperty(name));
+ ScopedValue func(scope, engine->currentContext->getProperty(name));
if (scope.engine->hasException)
return Encode::undefined();
@@ -1140,7 +1140,7 @@ QV4::ReturnedValue Runtime::typeofName(ExecutionEngine *engine, int nameIndex)
{
Scope scope(engine);
ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[nameIndex]);
- ScopedValue prop(scope, engine->currentExecutionContext->getProperty(name));
+ ScopedValue prop(scope, engine->currentContext->getProperty(name));
// typeof doesn't throw. clear any possible exception
scope.engine->hasException = false;
return Runtime::typeofValue(engine, prop);
@@ -1182,20 +1182,20 @@ ReturnedValue Runtime::unwindException(ExecutionEngine *engine)
*/
void Runtime::pushWithScope(const Value &o, ExecutionEngine *engine)
{
- engine->pushContext(engine->currentExecutionContext->newWithContext(o.toObject(engine)));
- Q_ASSERT(engine->jsStackTop = engine->currentExecutionContext + 2);
+ engine->pushContext(engine->currentContext->newWithContext(o.toObject(engine)));
+ Q_ASSERT(engine->jsStackTop = engine->currentContext + 2);
}
void Runtime::pushCatchScope(NoThrowEngine *engine, int exceptionVarNameIndex)
{
- ExecutionContext *c = engine->currentExecutionContext;
+ ExecutionContext *c = engine->currentContext;
engine->pushContext(c->newCatchContext(c->d()->compilationUnit->runtimeStrings[exceptionVarNameIndex], engine->catchException(0)));
- Q_ASSERT(engine->jsStackTop = engine->currentExecutionContext + 2);
+ Q_ASSERT(engine->jsStackTop = engine->currentContext + 2);
}
void Runtime::popScope(ExecutionEngine *engine)
{
- Q_ASSERT(engine->jsStackTop = engine->currentExecutionContext + 2);
+ Q_ASSERT(engine->jsStackTop = engine->currentContext + 2);
engine->popContext();
engine->jsStackTop -= 2;
}
@@ -1204,7 +1204,7 @@ void Runtime::declareVar(ExecutionEngine *engine, bool deletable, int nameIndex)
{
Scope scope(engine);
ScopedString name(scope, engine->current->compilationUnit->runtimeStrings[nameIndex]);
- engine->currentExecutionContext->createMutableBinding(name, deletable);
+ engine->currentContext->createMutableBinding(name, deletable);
}
ReturnedValue Runtime::arrayLiteral(ExecutionEngine *engine, Value *values, uint length)
@@ -1265,7 +1265,7 @@ ReturnedValue Runtime::objectLiteral(ExecutionEngine *engine, const QV4::Value *
QV4::ReturnedValue Runtime::setupArgumentsObject(ExecutionEngine *engine)
{
Q_ASSERT(engine->current->type == Heap::ExecutionContext::Type_CallContext);
- QV4::CallContext *c = static_cast<QV4::CallContext *>(engine->currentExecutionContext);
+ QV4::CallContext *c = static_cast<QV4::CallContext *>(engine->currentContext);
return engine->memoryManager->alloc<ArgumentsObject>(c)->asReturnedValue();
}
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 221c4e23c8..0c79897015 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -67,7 +67,7 @@ struct Scope {
~Scope() {
#ifndef QT_NO_DEBUG
Q_ASSERT(engine->jsStackTop >= mark);
- Q_ASSERT(engine->currentExecutionContext < mark);
+ Q_ASSERT(engine->currentContext < mark);
memset(mark, 0, (engine->jsStackTop - mark)*sizeof(Value));
#endif
#ifdef V4_USE_VALGRIND
@@ -363,12 +363,12 @@ struct ExecutionContextSaver
ExecutionContextSaver(Scope &scope)
: engine(scope.engine)
{
- savedContext = engine->currentExecutionContext;
+ savedContext = engine->currentContext;
}
~ExecutionContextSaver()
{
- Q_ASSERT(engine->jsStackTop > engine->currentExecutionContext);
- engine->currentExecutionContext = savedContext;
+ Q_ASSERT(engine->jsStackTop > engine->currentContext);
+ engine->currentContext = savedContext;
engine->current = savedContext->d();
}
};
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 4c5a560aed..a9cbb58ad6 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -123,7 +123,7 @@ ReturnedValue QmlBindingWrapper::call(const Managed *that, CallData *callData)
if (!f)
return QV4::Encode::undefined();
- Scoped<CallContext> ctx(scope, v4->currentExecutionContext->newCallContext(This, callData));
+ Scoped<CallContext> ctx(scope, v4->currentContext->newCallContext(This, callData));
v4->pushContext(ctx);
ScopedValue result(scope, Q_V4_PROFILE(v4, f));
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 00a181640c..68f996c4c7 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -375,7 +375,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
const uchar *exceptionHandler = 0;
QV4::Scope scope(engine);
- QV4::ExecutionContext *context = engine->currentExecutionContext;
+ QV4::ExecutionContext *context = engine->currentContext;
engine->current->lineNumber = -1;
#ifdef DO_TRACE_INSTR
@@ -650,18 +650,18 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code
MOTH_BEGIN_INSTR(CallBuiltinPushCatchScope)
Runtime::pushCatchScope(static_cast<QV4::NoThrowEngine*>(engine), instr.name);
- context = engine->currentExecutionContext;
+ context = engine->currentContext;
MOTH_END_INSTR(CallBuiltinPushCatchScope)
MOTH_BEGIN_INSTR(CallBuiltinPushScope)
Runtime::pushWithScope(VALUE(instr.arg), engine);
- context = engine->currentExecutionContext;
+ context = engine->currentContext;
CHECK_EXCEPTION;
MOTH_END_INSTR(CallBuiltinPushScope)
MOTH_BEGIN_INSTR(CallBuiltinPopScope)
Runtime::popScope(engine);
- context = engine->currentExecutionContext;
+ context = engine->currentContext;
MOTH_END_INSTR(CallBuiltinPopScope)
MOTH_BEGIN_INSTR(CallBuiltinForeachIteratorObject)
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index 26a705961b..106c1e4fba 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -483,7 +483,7 @@ void MemoryManager::sweep(bool lastSweep)
// some execution contexts are allocated on the stack, make sure we clear their markBit as well
if (!lastSweep) {
- QV4::ExecutionContext *ctx = engine()->currentExecutionContext;
+ QV4::ExecutionContext *ctx = engine()->currentContext;
while (ctx) {
ctx->d()->clearMarkBit();
ctx = engine()->parentContext(ctx);