aboutsummaryrefslogtreecommitdiffstats
path: root/moth
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-11-16 23:07:10 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-19 10:28:56 +0100
commitd7416a80faa4e8b32824975b712f6756eda7b18f (patch)
treea3a865df1e636bee34c00ff03d18509b485be28c /moth
parentd6553a206bf3c263159764ab222cb7f43ed1da10 (diff)
Rename Context to ExecutionContext
This is so it'll map to the name used in the ECMAScript spec once the other refactorings are in. Change-Id: I8dcc7ad43b457ce50e7123c57bc4c770bcda8d11 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'moth')
-rw-r--r--moth/qv4instr_moth_p.h10
-rw-r--r--moth/qv4isel_moth.cpp10
-rw-r--r--moth/qv4vme_moth.cpp10
-rw-r--r--moth/qv4vme_moth_p.h8
4 files changed, 19 insertions, 19 deletions
diff --git a/moth/qv4instr_moth_p.h b/moth/qv4instr_moth_p.h
index d6500352cc..6fba81496e 100644
--- a/moth/qv4instr_moth_p.h
+++ b/moth/qv4instr_moth_p.h
@@ -240,13 +240,13 @@ union Instr
};
struct instr_unop {
MOTH_INSTR_HEADER
- VM::Value (*alu)(const VM::Value value, VM::Context *ctx);
+ VM::Value (*alu)(const VM::Value value, VM::ExecutionContext *ctx);
int e;
int targetTempIndex;
};
struct instr_binop {
MOTH_INSTR_HEADER
- VM::Value (*alu)(const VM::Value , const VM::Value, VM::Context *);
+ VM::Value (*alu)(const VM::Value , const VM::Value, VM::ExecutionContext *);
int targetTempIndex;
ValueOrTemp lhs;
ValueOrTemp rhs;
@@ -259,7 +259,7 @@ union Instr
};
struct instr_inplaceElementOp {
MOTH_INSTR_HEADER
- void (*alu)(VM::Value, VM::Value, VM::Value, VM::Context *);
+ void (*alu)(VM::Value, VM::Value, VM::Value, VM::ExecutionContext *);
int targetBase;
int targetIndex;
ValueOrTemp source;
@@ -267,7 +267,7 @@ union Instr
};
struct instr_inplaceMemberOp {
MOTH_INSTR_HEADER
- void (*alu)(VM::Value, VM::Value, VM::String *, VM::Context *);
+ void (*alu)(VM::Value, VM::Value, VM::String *, VM::ExecutionContext *);
int targetBase;
VM::String *targetMember;
ValueOrTemp source;
@@ -275,7 +275,7 @@ union Instr
};
struct instr_inplaceNameOp {
MOTH_INSTR_HEADER
- void (*alu)(VM::Value, VM::String *, VM::Context *);
+ void (*alu)(VM::Value, VM::String *, VM::ExecutionContext *);
VM::String *targetName;
ValueOrTemp source;
unsigned sourceIsTemp:1;
diff --git a/moth/qv4isel_moth.cpp b/moth/qv4isel_moth.cpp
index 849cd293d3..318b227df1 100644
--- a/moth/qv4isel_moth.cpp
+++ b/moth/qv4isel_moth.cpp
@@ -307,7 +307,7 @@ void InstructionSelection::visitLeave(IR::Leave *)
Q_UNREACHABLE();
}
-typedef VM::Value (*ALUFunction)(const VM::Value, const VM::Value, VM::Context*);
+typedef VM::Value (*ALUFunction)(const VM::Value, const VM::Value, VM::ExecutionContext*);
static inline ALUFunction aluOpFunction(IR::AluOp op)
{
switch (op) {
@@ -461,7 +461,7 @@ void InstructionSelection::visitMove(IR::Move *s)
addInstruction(load);
} else if (IR::Unop *u = s->source->asUnop()) {
if (IR::Temp *e = u->expr->asTemp()) {
- VM::Value (*op)(const VM::Value value, VM::Context *ctx) = 0;
+ VM::Value (*op)(const VM::Value value, VM::ExecutionContext *ctx) = 0;
switch (u->op) {
case IR::OpIfTrue: assert(!"unreachable"); break;
case IR::OpNot: op = VM::__qmljs_not; break;
@@ -506,7 +506,7 @@ void InstructionSelection::visitMove(IR::Move *s)
return;
} else if (IR::Name *n = s->target->asName()) {
if (s->source->asTemp() || s->source->asConst()) {
- void (*op)(VM::Value value, VM::String *name, VM::Context *ctx) = 0;
+ void (*op)(VM::Value value, VM::String *name, VM::ExecutionContext *ctx) = 0;
switch (s->op) {
case IR::OpBitAnd: op = VM::__qmljs_inplace_bit_and_name; break;
case IR::OpBitOr: op = VM::__qmljs_inplace_bit_or_name; break;
@@ -540,7 +540,7 @@ void InstructionSelection::visitMove(IR::Move *s)
qWarning("NAME");
} else if (IR::Subscript *ss = s->target->asSubscript()) {
if (s->source->asTemp() || s->source->asConst()) {
- void (*op)(VM::Value base, VM::Value index, VM::Value value, VM::Context *ctx) = 0;
+ void (*op)(VM::Value base, VM::Value index, VM::Value value, VM::ExecutionContext *ctx) = 0;
switch (s->op) {
case IR::OpBitAnd: op = VM::__qmljs_inplace_bit_and_element; break;
case IR::OpBitOr: op = VM::__qmljs_inplace_bit_or_element; break;
@@ -576,7 +576,7 @@ void InstructionSelection::visitMove(IR::Move *s)
qWarning("SUBSCRIPT");
} else if (IR::Member *m = s->target->asMember()) {
if (s->source->asTemp() || s->source->asConst()) {
- void (*op)(VM::Value value, VM::Value base, VM::String *name, VM::Context *ctx) = 0;
+ void (*op)(VM::Value value, VM::Value base, VM::String *name, VM::ExecutionContext *ctx) = 0;
switch (s->op) {
case IR::OpBitAnd: op = VM::__qmljs_inplace_bit_and_member; break;
case IR::OpBitOr: op = VM::__qmljs_inplace_bit_or_member; break;
diff --git a/moth/qv4vme_moth.cpp b/moth/qv4vme_moth.cpp
index 07860c24a0..c058002aa2 100644
--- a/moth/qv4vme_moth.cpp
+++ b/moth/qv4vme_moth.cpp
@@ -47,7 +47,7 @@ using namespace QQmlJS::Moth;
#endif
-static inline VM::Value *tempValue(QQmlJS::VM::Context *context, QVector<VM::Value> &stack, int index)
+static inline VM::Value *tempValue(QQmlJS::VM::ExecutionContext *context, QVector<VM::Value> &stack, int index)
{
#ifdef DO_TRACE_INSTR
const char *kind;
@@ -79,7 +79,7 @@ static inline VM::Value *tempValue(QQmlJS::VM::Context *context, QVector<VM::Val
#define TEMP(index) *tempValue(context, stack, index)
-void VME::operator()(QQmlJS::VM::Context *context, const uchar *code
+void VME::operator()(QQmlJS::VM::ExecutionContext *context, const uchar *code
#ifdef MOTH_THREADED_INTERPRETER
, void ***storeJumpTable
#endif
@@ -345,20 +345,20 @@ void **VME::instructionJumpTable()
}
#endif
-void VME::exec(VM::Context *ctxt, const uchar *code)
+void VME::exec(VM::ExecutionContext *ctxt, const uchar *code)
{
VME vme;
vme(ctxt, code);
}
-void VME::restoreState(VM::Context *context, int &targetTempIndex, const uchar *&code)
+void VME::restoreState(VM::ExecutionContext *context, int &targetTempIndex, const uchar *&code)
{
VM::ExecutionEngine::ExceptionHandler &handler = context->engine->unwindStack.last();
targetTempIndex = handler.targetTempIndex;
code = handler.code;
}
-void VME::saveState(VM::Context *context, int targetTempIndex, const uchar *code)
+void VME::saveState(VM::ExecutionContext *context, int targetTempIndex, const uchar *code)
{
VM::ExecutionEngine::ExceptionHandler &handler = context->engine->unwindStack.last();
handler.targetTempIndex = targetTempIndex;
diff --git a/moth/qv4vme_moth_p.h b/moth/qv4vme_moth_p.h
index e3a2347c34..428cd4e31d 100644
--- a/moth/qv4vme_moth_p.h
+++ b/moth/qv4vme_moth_p.h
@@ -10,9 +10,9 @@ namespace Moth {
class VME
{
public:
- static void exec(VM::Context *, const uchar *);
+ static void exec(VM::ExecutionContext *, const uchar *);
- void operator()(QQmlJS::VM::Context *, const uchar *code
+ void operator()(QQmlJS::VM::ExecutionContext *, const uchar *code
#ifdef MOTH_THREADED_INTERPRETER
, void ***storeJumpTable = 0
#endif
@@ -23,8 +23,8 @@ public:
#endif
private:
- static void restoreState(VM::Context *context, int &targetTempIndex, const uchar *&code);
- static void saveState(VM::Context *context, int targetTempIndex, const uchar *code);
+ static void restoreState(VM::ExecutionContext *context, int &targetTempIndex, const uchar *&code);
+ static void saveState(VM::ExecutionContext *context, int targetTempIndex, const uchar *code);
};
} // namespace Moth