aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-09 13:15:45 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-10 08:19:49 +0000
commitfdc031530ea84b150b008ffad58fafe1302b6483 (patch)
tree66ebd6305d30709b43cbdb6881a64137406b7790
parent25c5e356353aab15dbf144391a455811c160c3e4 (diff)
More consistent naming of instructions and runtime methods
Change-Id: Ib8af10a48749b16c48d75c91ad215396b201a9d5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qml/compiler/qv4codegen.cpp32
-rw-r--r--src/qml/compiler/qv4compilercontrolflow_p.h10
-rw-r--r--src/qml/compiler/qv4instr_moth.cpp76
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h114
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp30
-rw-r--r--src/qml/jsruntime/qv4runtimeapi_p.h32
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp110
7 files changed, 202 insertions, 202 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 8ede8a6818..f62e1672da 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -616,7 +616,7 @@ bool Codegen::visit(ArrayLiteral *ast)
args = 0;
}
- Instruction::CallBuiltinDefineArray call;
+ Instruction::DefineArray call;
call.argc = argc;
call.args = Moth::StackSlot::createRegister(args);
bytecodeGenerator->addInstruction(call);
@@ -1093,7 +1093,7 @@ bool Codegen::visit(CallExpression *ast)
call.callData = calldata;
bytecodeGenerator->addInstruction(call);
} else {
- Instruction::CallActivationProperty call;
+ Instruction::CallName call;
call.name = base.unqualifiedNameIndex;
call.callData = calldata;
bytecodeGenerator->addInstruction(call);
@@ -1191,7 +1191,7 @@ bool Codegen::visit(DeleteExpression *ast)
throwSyntaxError(ast->deleteToken, QStringLiteral("Delete of an unqualified identifier in strict mode."));
return false;
}
- Instruction::CallBuiltinDeleteName del;
+ Instruction::DeleteName del;
del.name = expr.unqualifiedNameIndex;
bytecodeGenerator->addInstruction(del);
_expr.setResult(Reference::fromAccumulator(this));
@@ -1200,7 +1200,7 @@ bool Codegen::visit(DeleteExpression *ast)
case Reference::Member: {
//### maybe add a variant where the base can be in the accumulator?
expr = expr.asLValue();
- Instruction::CallBuiltinDeleteMember del;
+ Instruction::DeleteMember del;
del.base = expr.propertyBase.stackSlot();
del.member = expr.propertyNameIndex;
bytecodeGenerator->addInstruction(del);
@@ -1210,7 +1210,7 @@ bool Codegen::visit(DeleteExpression *ast)
case Reference::Subscript: {
//### maybe add a variant where the index can be in the accumulator?
expr = expr.asLValue();
- Instruction::CallBuiltinDeleteSubscript del;
+ Instruction::DeleteSubscript del;
del.base = expr.elementBase;
del.index = expr.elementSubscript.stackSlot();
bytecodeGenerator->addInstruction(del);
@@ -1554,7 +1554,7 @@ bool Codegen::visit(ObjectLiteral *ast)
if (args == -1)
args = 0;
- Instruction::CallBuiltinDefineObjectLiteral call;
+ Instruction::DefineObjectLiteral call;
call.internalClassId = classId;
call.arrayValueCount = arrayKeyWithValue.size();
call.arrayGetterSetterCountAndFlags = arrayGetterSetterCountAndFlags;
@@ -1711,12 +1711,12 @@ bool Codegen::visit(TypeOfExpression *ast)
if (expr.type == Reference::Name) {
// special handling as typeof doesn't throw here
- Instruction::CallBuiltinTypeofName instr;
+ Instruction::TypeofName instr;
instr.name = expr.unqualifiedNameIndex;
bytecodeGenerator->addInstruction(instr);
} else {
expr.loadInAccumulator();
- Instruction::CallBuiltinTypeofValue instr;
+ Instruction::TypeofValue instr;
bytecodeGenerator->addInstruction(instr);
}
_expr.setResult(Reference::fromAccumulator(this));
@@ -1823,7 +1823,7 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast,
for (Context::MemberMap::const_iterator it = _context->members.constBegin(), cend = _context->members.constEnd(); it != cend; ++it) {
const QString &local = it.key();
- Instruction::CallBuiltinDeclareVar declareVar;
+ Instruction::DeclareVar declareVar;
declareVar.isDeletable = false;
declareVar.varName = registerString(local);
bytecodeGenerator->addInstruction(declareVar);
@@ -1862,7 +1862,7 @@ int Codegen::defineFunction(const QString &name, AST::Node *ast,
}
if (_context->usesThis && !_context->isStrict) {
// make sure we convert this to an object
- Instruction::CallBuiltinConvertThisToObject convert;
+ Instruction::ConvertThisToObject convert;
bytecodeGenerator->addInstruction(convert);
}
@@ -2046,7 +2046,7 @@ bool Codegen::visit(ForEachStatement *ast)
return true;
expr.loadInAccumulator();
- Instruction::CallBuiltinForeachIteratorObject iteratorObjInstr;
+ Instruction::ForeachIteratorObject iteratorObjInstr;
bytecodeGenerator->addInstruction(iteratorObjInstr);
obj.storeConsumeAccumulator();
@@ -2066,7 +2066,7 @@ bool Codegen::visit(ForEachStatement *ast)
Reference lhs = expression(ast->initialiser);
obj.loadInAccumulator();
- Instruction::CallBuiltinForeachNextPropertyName nextPropInstr;
+ Instruction::ForeachNextPropertyName nextPropInstr;
bytecodeGenerator->addInstruction(nextPropInstr);
lhs = lhs.storeRetainAccumulator().storeOnStack();
@@ -2185,7 +2185,7 @@ bool Codegen::visit(LocalForEachStatement *ast)
variableDeclaration(ast->declaration);
expr.loadInAccumulator();
- Instruction::CallBuiltinForeachIteratorObject iteratorObjInstr;
+ Instruction::ForeachIteratorObject iteratorObjInstr;
bytecodeGenerator->addInstruction(iteratorObjInstr);
obj.storeConsumeAccumulator();
@@ -2203,7 +2203,7 @@ bool Codegen::visit(LocalForEachStatement *ast)
in.link();
obj.loadInAccumulator();
- Instruction::CallBuiltinForeachNextPropertyName nextPropInstr;
+ Instruction::ForeachNextPropertyName nextPropInstr;
bytecodeGenerator->addInstruction(nextPropInstr);
auto lhs = it.storeRetainAccumulator().storeOnStack();
@@ -2366,7 +2366,7 @@ bool Codegen::visit(ThrowStatement *ast)
_context->controlFlow->handleThrow(expr);
} else {
expr.loadInAccumulator();
- Instruction::CallBuiltinThrow instr;
+ Instruction::ThrowException instr;
bytecodeGenerator->addInstruction(instr);
}
return false;
@@ -2951,7 +2951,7 @@ void Codegen::Reference::loadInAccumulator() const
}
case Name:
if (codegen->useFastLookups && global) {
- Instruction::GetGlobalLookup load;
+ Instruction::LoadGlobalLookup load;
load.index = codegen->registerGlobalGetterLookup(unqualifiedNameIndex);
codegen->bytecodeGenerator->addInstruction(load);
} else {
diff --git a/src/qml/compiler/qv4compilercontrolflow_p.h b/src/qml/compiler/qv4compilercontrolflow_p.h
index bbfe9e2deb..f8efd010a3 100644
--- a/src/qml/compiler/qv4compilercontrolflow_p.h
+++ b/src/qml/compiler/qv4compilercontrolflow_p.h
@@ -151,7 +151,7 @@ struct ControlFlow {
Reference::storeConstOnStack(cg, QV4::Encode(h.value), h.tempIndex);
}
e.loadInAccumulator();
- Instruction::CallBuiltinThrow instr;
+ Instruction::ThrowException instr;
generator()->addInstruction(instr);
}
@@ -278,7 +278,7 @@ struct ControlFlowWith : public ControlFlowUnwind
savedContextRegister = Moth::StackSlot::createRegister(generator()->newRegister());
// assumes the with object is in the accumulator
- Instruction::CallBuiltinPushWithContext pushScope;
+ Instruction::PushWithContext pushScope;
pushScope.reg = savedContextRegister;
generator()->addInstruction(pushScope);
generator()->setExceptionHandler(&unwindLabel);
@@ -289,7 +289,7 @@ struct ControlFlowWith : public ControlFlowUnwind
unwindLabel.link();
generator()->setExceptionHandler(parentExceptionHandler());
- Instruction::CallBuiltinPopContext pop;
+ Instruction::PopContext pop;
pop.reg = savedContextRegister;
generator()->addInstruction(pop);
@@ -345,7 +345,7 @@ struct ControlFlowCatch : public ControlFlowUnwind
exceptionLabel.link();
Reference name = Reference::fromName(cg, catchExpression->name.toString());
Moth::StackSlot savedContextReg = Moth::StackSlot::createRegister(generator()->newRegister());
- Instruction::CallBuiltinPushCatchContext pushCatch;
+ Instruction::PushCatchContext pushCatch;
pushCatch.name = name.unqualifiedNameIndex;
pushCatch.reg = savedContextReg;
generator()->addInstruction(pushCatch);
@@ -360,7 +360,7 @@ struct ControlFlowCatch : public ControlFlowUnwind
// exceptions inside catch and break/return statements go here
catchUnwindLabel.link();
- Instruction::CallBuiltinPopContext pop;
+ Instruction::PopContext pop;
pop.reg = savedContextReg;
generator()->addInstruction(pop);
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp
index 52f2190959..b3034e8b81 100644
--- a/src/qml/compiler/qv4instr_moth.cpp
+++ b/src/qml/compiler/qv4instr_moth.cpp
@@ -169,9 +169,9 @@ void dumpBytecode(const char *code, int len, int nFormals)
d << instr.name;
MOTH_END_INSTR(LoadName)
- MOTH_BEGIN_INSTR(GetGlobalLookup)
+ MOTH_BEGIN_INSTR(LoadGlobalLookup)
d << instr.index;
- MOTH_END_INSTR(GetGlobalLookup)
+ MOTH_END_INSTR(LoadGlobalLookup)
MOTH_BEGIN_INSTR(StoreNameSloppy)
d << instr.name;
@@ -253,9 +253,9 @@ void dumpBytecode(const char *code, int len, int nFormals)
d << instr.base.dump(nFormals) << "[" << instr.index.dump(nFormals) << "]" << "(" << instr.callData.dump(nFormals) << ")";
MOTH_END_INSTR(CallElement)
- MOTH_BEGIN_INSTR(CallActivationProperty)
+ MOTH_BEGIN_INSTR(CallName)
d << instr.name << "(" << instr.callData.dump(nFormals) << ")";
- MOTH_END_INSTR(CallActivationProperty)
+ MOTH_END_INSTR(CallName)
MOTH_BEGIN_INSTR(CallGlobalLookup)
d << instr.index << "(" << instr.callData.dump(nFormals) << ")";
@@ -268,8 +268,8 @@ void dumpBytecode(const char *code, int len, int nFormals)
d << "<null>";
MOTH_END_INSTR(SetExceptionHandler)
- MOTH_BEGIN_INSTR(CallBuiltinThrow)
- MOTH_END_INSTR(CallBuiltinThrow)
+ MOTH_BEGIN_INSTR(ThrowException)
+ MOTH_END_INSTR(ThrowException)
MOTH_BEGIN_INSTR(GetException)
MOTH_END_INSTR(HasException)
@@ -277,60 +277,60 @@ void dumpBytecode(const char *code, int len, int nFormals)
MOTH_BEGIN_INSTR(SetException)
MOTH_END_INSTR(SetExceptionFlag)
- MOTH_BEGIN_INSTR(CallBuiltinUnwindException)
- MOTH_END_INSTR(CallBuiltinUnwindException)
+ MOTH_BEGIN_INSTR(UnwindException)
+ MOTH_END_INSTR(UnwindException)
- MOTH_BEGIN_INSTR(CallBuiltinPushCatchContext)
+ MOTH_BEGIN_INSTR(PushCatchContext)
d << instr.reg.dump(nFormals) << ", " << instr.name;
- MOTH_END_INSTR(CallBuiltinPushCatchContext)
+ MOTH_END_INSTR(PushCatchContext)
- MOTH_BEGIN_INSTR(CallBuiltinPushWithContext)
+ MOTH_BEGIN_INSTR(PushWithContext)
d << instr.reg.dump(nFormals);
- MOTH_END_INSTR(CallBuiltinPushWithContext)
+ MOTH_END_INSTR(PushWithContext)
- MOTH_BEGIN_INSTR(CallBuiltinPopContext)
+ MOTH_BEGIN_INSTR(PopContext)
d << instr.reg.dump(nFormals);
- MOTH_END_INSTR(CallBuiltinPopContext)
+ MOTH_END_INSTR(PopContext)
- MOTH_BEGIN_INSTR(CallBuiltinForeachIteratorObject)
- MOTH_END_INSTR(CallBuiltinForeachIteratorObject)
+ MOTH_BEGIN_INSTR(ForeachIteratorObject)
+ MOTH_END_INSTR(ForeachIteratorObject)
- MOTH_BEGIN_INSTR(CallBuiltinForeachNextPropertyName)
- MOTH_END_INSTR(CallBuiltinForeachNextPropertyName)
+ MOTH_BEGIN_INSTR(ForeachNextPropertyName)
+ MOTH_END_INSTR(ForeachNextPropertyName)
- MOTH_BEGIN_INSTR(CallBuiltinDeleteMember)
+ MOTH_BEGIN_INSTR(DeleteMember)
d << instr.base.dump(nFormals) << "[" << instr.member << "]";
- MOTH_END_INSTR(CallBuiltinDeleteMember)
+ MOTH_END_INSTR(DeleteMember)
- MOTH_BEGIN_INSTR(CallBuiltinDeleteSubscript)
+ MOTH_BEGIN_INSTR(DeleteSubscript)
d << instr.base.dump(nFormals) << "[" << instr.index.dump(nFormals) << "]";
- MOTH_END_INSTR(CallBuiltinDeleteSubscript)
+ MOTH_END_INSTR(DeleteSubscript)
- MOTH_BEGIN_INSTR(CallBuiltinDeleteName)
+ MOTH_BEGIN_INSTR(DeleteName)
d << instr.name;
- MOTH_END_INSTR(CallBuiltinDeleteName)
+ MOTH_END_INSTR(DeleteName)
- MOTH_BEGIN_INSTR(CallBuiltinTypeofName)
+ MOTH_BEGIN_INSTR(TypeofName)
d << instr.name;
- MOTH_END_INSTR(CallBuiltinTypeofName)
+ MOTH_END_INSTR(TypeofName)
- MOTH_BEGIN_INSTR(CallBuiltinTypeofValue)
- MOTH_END_INSTR(CallBuiltinTypeofValue)
+ MOTH_BEGIN_INSTR(TypeofValue)
+ MOTH_END_INSTR(TypeofValue)
- MOTH_BEGIN_INSTR(CallBuiltinDeclareVar)
+ MOTH_BEGIN_INSTR(DeclareVar)
d << instr.isDeletable << ", " << instr.varName;
- MOTH_END_INSTR(CallBuiltinDeclareVar)
+ MOTH_END_INSTR(DeclareVar)
- MOTH_BEGIN_INSTR(CallBuiltinDefineArray)
+ MOTH_BEGIN_INSTR(DefineArray)
d << instr.args.dump(nFormals) << ", " << instr.argc;
- MOTH_END_INSTR(CallBuiltinDefineArray)
+ MOTH_END_INSTR(DefineArray)
- MOTH_BEGIN_INSTR(CallBuiltinDefineObjectLiteral)
+ MOTH_BEGIN_INSTR(DefineObjectLiteral)
d << instr.args.dump(nFormals)
<< ", " << instr.internalClassId
<< ", " << instr.arrayValueCount
<< ", " << instr.arrayGetterSetterCountAndFlags;
- MOTH_END_INSTR(CallBuiltinDefineObjectLiteral)
+ MOTH_END_INSTR(DefineObjectLiteral)
MOTH_BEGIN_INSTR(CreateMappedArgumentsObject)
MOTH_END_INSTR(CreateMappedArgumentsObject)
@@ -338,8 +338,8 @@ void dumpBytecode(const char *code, int len, int nFormals)
MOTH_BEGIN_INSTR(CreateUnmappedArgumentsObject)
MOTH_END_INSTR(CreateUnmappedArgumentsObject)
- MOTH_BEGIN_INSTR(CallBuiltinConvertThisToObject)
- MOTH_END_INSTR(CallBuiltinConvertThisToObject)
+ MOTH_BEGIN_INSTR(ConvertThisToObject)
+ MOTH_END_INSTR(ConvertThisToObject)
MOTH_BEGIN_INSTR(CreateValue)
d << "new" << instr.func.dump(nFormals) << "(" << instr.callData.dump(nFormals) << ")";
@@ -353,9 +353,9 @@ void dumpBytecode(const char *code, int len, int nFormals)
d << "new" << instr.index << "(" << instr.callData.dump(nFormals) << instr.argc << ")";
MOTH_END_INSTR(ConstructPropertyLookup)
- MOTH_BEGIN_INSTR(CreateActivationProperty)
+ MOTH_BEGIN_INSTR(CreateName)
d << "new" << instr.name << "(" << instr.callData.dump(nFormals) << instr.argc << ")";
- MOTH_END_INSTR(CreateActivationProperty)
+ MOTH_END_INSTR(CreateName)
MOTH_BEGIN_INSTR(ConstructGlobalLookup)
d << "new" << instr.index << "(" << instr.callData.dump(nFormals) << instr.argc << ")";
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index d840cda090..63b117dc0e 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -84,7 +84,7 @@ QT_BEGIN_NAMESPACE
F(LoadRegExp, loadRegExp) \
F(LoadClosure, loadClosure) \
F(LoadName, loadName) \
- F(GetGlobalLookup, getGlobalLookup) \
+ F(LoadGlobalLookup, loadGlobalLookup) \
F(StoreNameSloppy, storeNameSloppy) \
F(StoreNameStrict, storeNameStrict) \
F(LoadElement, loadElement) \
@@ -105,33 +105,33 @@ QT_BEGIN_NAMESPACE
F(CallProperty, callProperty) \
F(CallPropertyLookup, callPropertyLookup) \
F(CallElement, callElement) \
- F(CallActivationProperty, callActivationProperty) \
+ F(CallName, callName) \
F(CallGlobalLookup, callGlobalLookup) \
F(SetExceptionHandler, setExceptionHandler) \
- F(CallBuiltinThrow, callBuiltinThrow) \
+ F(ThrowException, throwException) \
F(GetException, getException) \
F(SetException, setException) \
- F(CallBuiltinUnwindException, callBuiltinUnwindException) \
- F(CallBuiltinPushCatchContext, callBuiltinPushCatchContext) \
- F(CallBuiltinPushWithContext, callBuiltinPushWithContext) \
- F(CallBuiltinPopContext, callBuiltinPopContext) \
- F(CallBuiltinForeachIteratorObject, callBuiltinForeachIteratorObject) \
- F(CallBuiltinForeachNextPropertyName, callBuiltinForeachNextPropertyName) \
- F(CallBuiltinDeleteMember, callBuiltinDeleteMember) \
- F(CallBuiltinDeleteSubscript, callBuiltinDeleteSubscript) \
- F(CallBuiltinDeleteName, callBuiltinDeleteName) \
- F(CallBuiltinTypeofName, callBuiltinTypeofName) \
- F(CallBuiltinTypeofValue, callBuiltinTypeofValue) \
- F(CallBuiltinDeclareVar, callBuiltinDeclareVar) \
- F(CallBuiltinDefineArray, callBuiltinDefineArray) \
- F(CallBuiltinDefineObjectLiteral, callBuiltinDefineObjectLiteral) \
+ F(UnwindException, unwindException) \
+ F(PushCatchContext, pushCatchContext) \
+ F(PushWithContext, pushWithContext) \
+ F(PopContext, popContext) \
+ F(ForeachIteratorObject, foreachIteratorObject) \
+ F(ForeachNextPropertyName, foreachNextPropertyName) \
+ F(DeleteMember, deleteMember) \
+ F(DeleteSubscript, deleteSubscript) \
+ F(DeleteName, deleteName) \
+ F(TypeofName, typeofName) \
+ F(TypeofValue, typeofValue) \
+ F(DeclareVar, declareVar) \
+ F(DefineArray, defineArray) \
+ F(DefineObjectLiteral, defineObjectLiteral) \
F(CreateMappedArgumentsObject, createMappedArgumentsObject) \
F(CreateUnmappedArgumentsObject, createUnmappedArgumentsObject) \
- F(CallBuiltinConvertThisToObject, callBuiltinConvertThisToObject) \
+ F(ConvertThisToObject, convertThisToObject) \
F(CreateValue, createValue) \
F(CreateProperty, createProperty) \
F(ConstructPropertyLookup, constructPropertyLookup) \
- F(CreateActivationProperty, createActivationProperty) \
+ F(CreateName, createName) \
F(ConstructGlobalLookup, constructGlobalLookup) \
F(Jump, jump) \
F(JumpEq, jumpEq) \
@@ -319,7 +319,7 @@ union Instr
MOTH_INSTR_HEADER
int name;
};
- struct instr_getGlobalLookup {
+ struct instr_loadGlobalLookup {
MOTH_INSTR_HEADER
int index;
};
@@ -422,7 +422,7 @@ union Instr
StackSlot index;
StackSlot callData;
};
- struct instr_callActivationProperty {
+ struct instr_callName {
MOTH_INSTR_HEADER
int name;
StackSlot callData;
@@ -436,7 +436,7 @@ union Instr
MOTH_INSTR_HEADER
qptrdiff offset;
};
- struct instr_callBuiltinThrow {
+ struct instr_throwException {
MOTH_INSTR_HEADER
};
struct instr_getException {
@@ -445,60 +445,60 @@ union Instr
struct instr_setException {
MOTH_INSTR_HEADER
};
- struct instr_callBuiltinUnwindException {
+ struct instr_unwindException {
MOTH_INSTR_HEADER
};
- struct instr_callBuiltinPushCatchContext {
+ struct instr_pushCatchContext {
MOTH_INSTR_HEADER
int name;
StackSlot reg;
};
- struct instr_callBuiltinPushWithContext {
+ struct instr_pushWithContext {
MOTH_INSTR_HEADER
StackSlot reg;
};
- struct instr_callBuiltinPopContext {
+ struct instr_popContext {
MOTH_INSTR_HEADER
StackSlot reg;
};
- struct instr_callBuiltinForeachIteratorObject {
+ struct instr_foreachIteratorObject {
MOTH_INSTR_HEADER
};
- struct instr_callBuiltinForeachNextPropertyName {
+ struct instr_foreachNextPropertyName {
MOTH_INSTR_HEADER
};
- struct instr_callBuiltinDeleteMember {
+ struct instr_deleteMember {
MOTH_INSTR_HEADER
int member;
StackSlot base;
};
- struct instr_callBuiltinDeleteSubscript {
+ struct instr_deleteSubscript {
MOTH_INSTR_HEADER
StackSlot base;
StackSlot index;
};
- struct instr_callBuiltinDeleteName {
+ struct instr_deleteName {
MOTH_INSTR_HEADER
int name;
};
- struct instr_callBuiltinTypeofName {
+ struct instr_typeofName {
MOTH_INSTR_HEADER
int name;
};
- struct instr_callBuiltinTypeofValue {
+ struct instr_typeofValue {
MOTH_INSTR_HEADER
};
- struct instr_callBuiltinDeclareVar {
+ struct instr_declareVar {
MOTH_INSTR_HEADER
int varName;
bool isDeletable;
};
- struct instr_callBuiltinDefineArray {
+ struct instr_defineArray {
MOTH_INSTR_HEADER
uint argc;
StackSlot args;
};
- struct instr_callBuiltinDefineObjectLiteral {
+ struct instr_defineObjectLiteral {
MOTH_INSTR_HEADER
int internalClassId;
int arrayValueCount;
@@ -511,7 +511,7 @@ union Instr
struct instr_createUnmappedArgumentsObject {
MOTH_INSTR_HEADER
};
- struct instr_callBuiltinConvertThisToObject {
+ struct instr_convertThisToObject {
MOTH_INSTR_HEADER
};
struct instr_createValue {
@@ -533,7 +533,7 @@ union Instr
StackSlot callData;
StackSlot base;
};
- struct instr_createActivationProperty {
+ struct instr_createName {
MOTH_INSTR_HEADER
int name;
int argc;
@@ -710,7 +710,7 @@ union Instr
instr_loadRegExp loadRegExp;
instr_loadClosure loadClosure;
instr_loadName loadName;
- instr_getGlobalLookup getGlobalLookup;
+ instr_loadGlobalLookup loadGlobalLookup;
instr_storeNameSloppy storeNameSloppy;
instr_storeNameStrict storeNameStrict;
instr_loadElement loadElement;
@@ -731,33 +731,33 @@ union Instr
instr_callProperty callProperty;
instr_callPropertyLookup callPropertyLookup;
instr_callElement callElement;
- instr_callActivationProperty callActivationProperty;
+ instr_callName callName;
instr_callGlobalLookup callGlobalLookup;
- instr_callBuiltinThrow callBuiltinThrow;
+ instr_throwException throwException;
instr_getException getException;
instr_setException setException;
instr_setExceptionHandler setExceptionHandler;
- instr_callBuiltinUnwindException callBuiltinUnwindException;
- instr_callBuiltinPushCatchContext callBuiltinPushCatchContext;
- instr_callBuiltinPushWithContext callBuiltinPushWithContext;
- instr_callBuiltinPopContext callBuiltinPopContext;
- instr_callBuiltinForeachIteratorObject callBuiltinForeachIteratorObject;
- instr_callBuiltinForeachNextPropertyName callBuiltinForeachNextPropertyName;
- instr_callBuiltinDeleteMember callBuiltinDeleteMember;
- instr_callBuiltinDeleteSubscript callBuiltinDeleteSubscript;
- instr_callBuiltinDeleteName callBuiltinDeleteName;
- instr_callBuiltinTypeofName callBuiltinTypeofName;
- instr_callBuiltinTypeofValue callBuiltinTypeofValue;
- instr_callBuiltinDeclareVar callBuiltinDeclareVar;
- instr_callBuiltinDefineArray callBuiltinDefineArray;
- instr_callBuiltinDefineObjectLiteral callBuiltinDefineObjectLiteral;
+ instr_unwindException unwindException;
+ instr_pushCatchContext pushCatchContext;
+ instr_pushWithContext pushWithContext;
+ instr_popContext popContext;
+ instr_foreachIteratorObject foreachIteratorObject;
+ instr_foreachNextPropertyName foreachNextPropertyName;
+ instr_deleteMember deleteMember;
+ instr_deleteSubscript deleteSubscript;
+ instr_deleteName deleteName;
+ instr_typeofName typeofName;
+ instr_typeofValue typeofValue;
+ instr_declareVar declareVar;
+ instr_defineArray defineArray;
+ instr_defineObjectLiteral defineObjectLiteral;
instr_createMappedArgumentsObject createMappedArgumentsObject;
instr_createUnmappedArgumentsObject createUnmappedArgumentsObject;
- instr_callBuiltinConvertThisToObject callBuiltinConvertThisToObject;
+ instr_convertThisToObject convertThisToObject;
instr_createValue createValue;
instr_createProperty createProperty;
instr_constructPropertyLookup constructPropertyLookup;
- instr_createActivationProperty createActivationProperty;
+ instr_createName createName;
instr_constructGlobalLookup constructGlobalLookup;
instr_jump jump;
instr_jumpEq jumpEq;
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 9cb2ca049c..ac1faae6c9 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -589,7 +589,7 @@ QV4::ReturnedValue Runtime::method_addString(ExecutionEngine *engine, const Valu
return (mm->alloc<String>(sleft->d(), sright->d()))->asReturnedValue();
}
-bool Runtime::method_setProperty(ExecutionEngine *engine, const Value &object, int nameIndex, const Value &value)
+bool Runtime::method_storeProperty(ExecutionEngine *engine, const Value &object, int nameIndex, const Value &value)
{
Scope scope(engine);
ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
@@ -654,7 +654,7 @@ static Q_NEVER_INLINE ReturnedValue getElementFallback(ExecutionEngine *engine,
return o->get(name);
}
-ReturnedValue Runtime::method_getElement(ExecutionEngine *engine, const Value &object, const Value &index)
+ReturnedValue Runtime::method_loadElement(ExecutionEngine *engine, const Value &object, const Value &index)
{
uint idx;
if (index.asArrayIndex(idx)) {
@@ -698,7 +698,7 @@ static Q_NEVER_INLINE bool setElementFallback(ExecutionEngine *engine, const Val
return o->put(name, value);
}
-bool Runtime::method_setElement(ExecutionEngine *engine, const Value &object, const Value &index, const Value &value)
+bool Runtime::method_storeElement(ExecutionEngine *engine, const Value &object, const Value &index, const Value &value)
{
uint idx;
if (index.asArrayIndex(idx)) {
@@ -760,7 +760,7 @@ void Runtime::method_storeNameStrict(ExecutionEngine *engine, int nameIndex, con
engine->throwReferenceError(name);
}
-ReturnedValue Runtime::method_getProperty(ExecutionEngine *engine, const Value &object, int nameIndex)
+ReturnedValue Runtime::method_loadProperty(ExecutionEngine *engine, const Value &object, int nameIndex)
{
Scope scope(engine);
ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
@@ -780,7 +780,7 @@ ReturnedValue Runtime::method_getProperty(ExecutionEngine *engine, const Value &
return o->get(name);
}
-ReturnedValue Runtime::method_getActivationProperty(ExecutionEngine *engine, int nameIndex)
+ReturnedValue Runtime::method_loadName(ExecutionEngine *engine, int nameIndex)
{
Scope scope(engine);
ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
@@ -1031,7 +1031,7 @@ ReturnedValue Runtime::method_callGlobalLookup(ExecutionEngine *engine, uint ind
}
-ReturnedValue Runtime::method_callActivationProperty(ExecutionEngine *engine, int nameIndex, CallData *callData)
+ReturnedValue Runtime::method_callName(ExecutionEngine *engine, int nameIndex, CallData *callData)
{
Q_ASSERT(callData->thisObject.isUndefined());
Scope scope(engine);
@@ -1140,7 +1140,7 @@ ReturnedValue Runtime::method_constructGlobalLookup(ExecutionEngine *engine, uin
}
-ReturnedValue Runtime::method_constructActivationProperty(ExecutionEngine *engine, int nameIndex, CallData *callData)
+ReturnedValue Runtime::method_constructName(ExecutionEngine *engine, int nameIndex, CallData *callData)
{
Scope scope(engine);
ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
@@ -1342,7 +1342,7 @@ QV4::ReturnedValue Runtime::method_createUnmappedArgumentsObject(ExecutionEngine
return engine->memoryManager->allocObject<ArgumentsObject>(ic, engine->objectPrototype(), c, true)->asReturnedValue();
}
-ReturnedValue Runtime::method_getQmlContext(NoThrowEngine *engine)
+ReturnedValue Runtime::method_loadQmlContext(NoThrowEngine *engine)
{
return engine->qmlContext()->asReturnedValue();
}
@@ -1352,19 +1352,19 @@ ReturnedValue Runtime::method_regexpLiteral(ExecutionEngine *engine, int id)
return static_cast<CompiledData::CompilationUnit*>(engine->currentStackFrame->v4Function->compilationUnit)->runtimeRegularExpressions[id].asReturnedValue();
}
-ReturnedValue Runtime::method_getQmlScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)
+ReturnedValue Runtime::method_loadQmlScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)
{
const QmlContext &c = static_cast<const QmlContext &>(context);
return QV4::QObjectWrapper::getProperty(engine, c.d()->qml()->scopeObject, propertyIndex, captureRequired);
}
-ReturnedValue Runtime::method_getQmlContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)
+ReturnedValue Runtime::method_loadQmlContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)
{
const QmlContext &c = static_cast<const QmlContext &>(context);
return QV4::QObjectWrapper::getProperty(engine, (*c.d()->qml()->context)->contextObject, propertyIndex, captureRequired);
}
-ReturnedValue Runtime::method_getQmlIdObject(ExecutionEngine *engine, const Value &c, uint index)
+ReturnedValue Runtime::method_loadQmlIdObject(ExecutionEngine *engine, const Value &c, uint index)
{
const QmlContext &qmlContext = static_cast<const QmlContext &>(c);
QQmlContextData *context = *qmlContext.d()->qml()->context;
@@ -1378,19 +1378,19 @@ ReturnedValue Runtime::method_getQmlIdObject(ExecutionEngine *engine, const Valu
return QObjectWrapper::wrap(engine, context->idValues[index].data());
}
-void Runtime::method_setQmlScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)
+void Runtime::method_storeQmlScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)
{
const QmlContext &c = static_cast<const QmlContext &>(context);
return QV4::QObjectWrapper::setProperty(engine, c.d()->qml()->scopeObject, propertyIndex, value);
}
-void Runtime::method_setQmlContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)
+void Runtime::method_storeQmlContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)
{
const QmlContext &c = static_cast<const QmlContext &>(context);
return QV4::QObjectWrapper::setProperty(engine, (*c.d()->qml()->context)->contextObject, propertyIndex, value);
}
-ReturnedValue Runtime::method_getQmlImportedScripts(NoThrowEngine *engine)
+ReturnedValue Runtime::method_loadQmlImportedScripts(NoThrowEngine *engine)
{
QQmlContextData *context = engine->callingQmlContext();
if (!context)
@@ -1398,7 +1398,7 @@ ReturnedValue Runtime::method_getQmlImportedScripts(NoThrowEngine *engine)
return context->importedScripts.value();
}
-QV4::ReturnedValue Runtime::method_getQmlSingleton(QV4::NoThrowEngine *engine, int nameIndex)
+QV4::ReturnedValue Runtime::method_loadQmlSingleton(QV4::NoThrowEngine *engine, int nameIndex)
{
Scope scope(engine);
ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
diff --git a/src/qml/jsruntime/qv4runtimeapi_p.h b/src/qml/jsruntime/qv4runtimeapi_p.h
index 406f1a3ab5..caaefa2f75 100644
--- a/src/qml/jsruntime/qv4runtimeapi_p.h
+++ b/src/qml/jsruntime/qv4runtimeapi_p.h
@@ -93,7 +93,7 @@ struct ExceptionCheck<void (*)(QV4::NoThrowEngine *, A, B, C)> {
#define FOR_EACH_RUNTIME_METHOD(F) \
/* call */ \
F(ReturnedValue, callGlobalLookup, (ExecutionEngine *engine, uint index, CallData *callData)) \
- F(ReturnedValue, callActivationProperty, (ExecutionEngine *engine, int nameIndex, CallData *callData)) \
+ F(ReturnedValue, callName, (ExecutionEngine *engine, int nameIndex, CallData *callData)) \
F(ReturnedValue, callProperty, (ExecutionEngine *engine, int nameIndex, CallData *callData)) \
F(ReturnedValue, callPropertyLookup, (ExecutionEngine *engine, uint index, CallData *callData)) \
F(ReturnedValue, callElement, (ExecutionEngine *engine, const Value &index, CallData *callData)) \
@@ -101,19 +101,19 @@ struct ExceptionCheck<void (*)(QV4::NoThrowEngine *, A, B, C)> {
\
/* construct */ \
F(ReturnedValue, constructGlobalLookup, (ExecutionEngine *engine, uint index, CallData *callData)) \
- F(ReturnedValue, constructActivationProperty, (ExecutionEngine *engine, int nameIndex, CallData *callData)) \
+ F(ReturnedValue, constructName, (ExecutionEngine *engine, int nameIndex, CallData *callData)) \
F(ReturnedValue, constructProperty, (ExecutionEngine *engine, int nameIndex, CallData *callData)) \
F(ReturnedValue, constructPropertyLookup, (ExecutionEngine *engine, uint index, CallData *callData)) \
F(ReturnedValue, constructValue, (ExecutionEngine *engine, const Value &func, CallData *callData)) \
\
- /* set & get */ \
+ /* load & store */ \
F(void, storeNameStrict, (ExecutionEngine *engine, int nameIndex, const Value &value)) \
F(void, storeNameSloppy, (ExecutionEngine *engine, int nameIndex, const Value &value)) \
- F(bool, setProperty, (ExecutionEngine *engine, const Value &object, int nameIndex, const Value &value)) \
- F(bool, setElement, (ExecutionEngine *engine, const Value &object, const Value &index, const Value &value)) \
- F(ReturnedValue, getProperty, (ExecutionEngine *engine, const Value &object, int nameIndex)) \
- F(ReturnedValue, getActivationProperty, (ExecutionEngine *engine, int nameIndex)) \
- F(ReturnedValue, getElement, (ExecutionEngine *engine, const Value &object, const Value &index)) \
+ F(bool, storeProperty, (ExecutionEngine *engine, const Value &object, int nameIndex, const Value &value)) \
+ F(bool, storeElement, (ExecutionEngine *engine, const Value &object, const Value &index, const Value &value)) \
+ F(ReturnedValue, loadProperty, (ExecutionEngine *engine, const Value &object, int nameIndex)) \
+ F(ReturnedValue, loadName, (ExecutionEngine *engine, int nameIndex)) \
+ F(ReturnedValue, loadElement, (ExecutionEngine *engine, const Value &object, const Value &index)) \
\
/* typeof */ \
F(ReturnedValue, typeofValue, (ExecutionEngine *engine, const Value &val)) \
@@ -188,15 +188,15 @@ struct ExceptionCheck<void (*)(QV4::NoThrowEngine *, A, B, C)> {
F(Bool, compareIn, (ExecutionEngine *engine, const Value &left, const Value &right)) \
\
/* qml */ \
- F(ReturnedValue, getQmlContext, (NoThrowEngine *engine)) \
- F(ReturnedValue, getQmlImportedScripts, (NoThrowEngine *engine)) \
- F(ReturnedValue, getQmlSingleton, (NoThrowEngine *engine, int nameIndex)) \
- F(ReturnedValue, getQmlScopeObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)) \
- F(ReturnedValue, getQmlContextObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)) \
- F(ReturnedValue, getQmlIdObject, (ExecutionEngine *engine, const Value &context, uint index)) \
+ F(ReturnedValue, loadQmlContext, (NoThrowEngine *engine)) \
+ F(ReturnedValue, loadQmlImportedScripts, (NoThrowEngine *engine)) \
+ F(ReturnedValue, loadQmlSingleton, (NoThrowEngine *engine, int nameIndex)) \
+ F(ReturnedValue, loadQmlScopeObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)) \
+ F(ReturnedValue, loadQmlContextObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)) \
+ F(ReturnedValue, loadQmlIdObject, (ExecutionEngine *engine, const Value &context, uint index)) \
\
- F(void, setQmlScopeObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)) \
- F(void, setQmlContextObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)) \
+ F(void, storeQmlScopeObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)) \
+ F(void, storeQmlContextObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)) \
struct Q_QML_PRIVATE_EXPORT Runtime {
Runtime();
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index b772055787..5454356da0 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -508,13 +508,13 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
MOTH_END_INSTR(LoadClosure)
MOTH_BEGIN_INSTR(LoadName)
- STORE_ACCUMULATOR(Runtime::method_getActivationProperty(engine, instr.name));
+ STORE_ACCUMULATOR(Runtime::method_loadName(engine, instr.name));
MOTH_END_INSTR(LoadName)
- MOTH_BEGIN_INSTR(GetGlobalLookup)
+ MOTH_BEGIN_INSTR(LoadGlobalLookup)
QV4::Lookup *l = function->compilationUnit->runtimeLookups + instr.index;
STORE_ACCUMULATOR(l->globalGetter(l, engine));
- MOTH_END_INSTR(GetGlobalLookup)
+ MOTH_END_INSTR(LoadGlobalLookup)
MOTH_BEGIN_INSTR(StoreNameStrict)
Runtime::method_storeNameStrict(engine, instr.name, accumulator);
@@ -527,25 +527,25 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
MOTH_END_INSTR(StoreNameSloppy)
MOTH_BEGIN_INSTR(LoadElement)
- STORE_ACCUMULATOR(Runtime::method_getElement(engine, STACK_VALUE(instr.base), STACK_VALUE(instr.index)));
+ STORE_ACCUMULATOR(Runtime::method_loadElement(engine, STACK_VALUE(instr.base), STACK_VALUE(instr.index)));
MOTH_END_INSTR(LoadElement)
MOTH_BEGIN_INSTR(LoadElementA)
- STORE_ACCUMULATOR(Runtime::method_getElement(engine, STACK_VALUE(instr.base), accumulator));
+ STORE_ACCUMULATOR(Runtime::method_loadElement(engine, STACK_VALUE(instr.base), accumulator));
MOTH_END_INSTR(LoadElementA)
MOTH_BEGIN_INSTR(StoreElement)
- if (!Runtime::method_setElement(engine, STACK_VALUE(instr.base), STACK_VALUE(instr.index), accumulator) && function->isStrict())
+ if (!Runtime::method_storeElement(engine, STACK_VALUE(instr.base), STACK_VALUE(instr.index), accumulator) && function->isStrict())
engine->throwTypeError();
CHECK_EXCEPTION;
MOTH_END_INSTR(StoreElement)
MOTH_BEGIN_INSTR(LoadProperty)
- STORE_ACCUMULATOR(Runtime::method_getProperty(engine, STACK_VALUE(instr.base), instr.name));
+ STORE_ACCUMULATOR(Runtime::method_loadProperty(engine, STACK_VALUE(instr.base), instr.name));
MOTH_END_INSTR(LoadProperty)
MOTH_BEGIN_INSTR(LoadPropertyA)
- STORE_ACCUMULATOR(Runtime::method_getProperty(engine, accumulator, instr.name));
+ STORE_ACCUMULATOR(Runtime::method_loadProperty(engine, accumulator, instr.name));
MOTH_END_INSTR(LoadPropertyA)
MOTH_BEGIN_INSTR(GetLookup)
@@ -559,7 +559,7 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
MOTH_END_INSTR(GetLookupA)
MOTH_BEGIN_INSTR(StoreProperty)
- if (!Runtime::method_setProperty(engine, STACK_VALUE(instr.base), instr.name, accumulator) && function->isStrict())
+ if (!Runtime::method_storeProperty(engine, STACK_VALUE(instr.base), instr.name, accumulator) && function->isStrict())
engine->throwTypeError();
CHECK_EXCEPTION;
MOTH_END_INSTR(StoreProperty)
@@ -572,25 +572,25 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
MOTH_END_INSTR(SetLookup)
MOTH_BEGIN_INSTR(StoreScopeObjectProperty)
- Runtime::method_setQmlScopeObjectProperty(engine, STACK_VALUE(instr.base), instr.propertyIndex, accumulator);
+ Runtime::method_storeQmlScopeObjectProperty(engine, STACK_VALUE(instr.base), instr.propertyIndex, accumulator);
CHECK_EXCEPTION;
MOTH_END_INSTR(StoreScopeObjectProperty)
MOTH_BEGIN_INSTR(LoadScopeObjectProperty)
- STORE_ACCUMULATOR(Runtime::method_getQmlScopeObjectProperty(engine, STACK_VALUE(instr.base), instr.propertyIndex, instr.captureRequired));
+ STORE_ACCUMULATOR(Runtime::method_loadQmlScopeObjectProperty(engine, STACK_VALUE(instr.base), instr.propertyIndex, instr.captureRequired));
MOTH_END_INSTR(LoadScopeObjectProperty)
MOTH_BEGIN_INSTR(StoreContextObjectProperty)
- Runtime::method_setQmlContextObjectProperty(engine, STACK_VALUE(instr.base), instr.propertyIndex, accumulator);
+ Runtime::method_storeQmlContextObjectProperty(engine, STACK_VALUE(instr.base), instr.propertyIndex, accumulator);
CHECK_EXCEPTION;
MOTH_END_INSTR(StoreContextObjectProperty)
MOTH_BEGIN_INSTR(LoadContextObjectProperty)
- STORE_ACCUMULATOR(Runtime::method_getQmlContextObjectProperty(engine, STACK_VALUE(instr.base), instr.propertyIndex, instr.captureRequired));
+ STORE_ACCUMULATOR(Runtime::method_loadQmlContextObjectProperty(engine, STACK_VALUE(instr.base), instr.propertyIndex, instr.captureRequired));
MOTH_END_INSTR(LoadContextObjectProperty)
MOTH_BEGIN_INSTR(LoadIdObject)
- STORE_ACCUMULATOR(Runtime::method_getQmlIdObject(engine, STACK_VALUE(instr.base), instr.index));
+ STORE_ACCUMULATOR(Runtime::method_loadQmlIdObject(engine, STACK_VALUE(instr.base), instr.index));
MOTH_END_INSTR(LoadIdObject)
MOTH_BEGIN_INSTR(CallValue)
@@ -616,10 +616,10 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
STORE_ACCUMULATOR(Runtime::method_callElement(engine, STACK_VALUE(instr.index), callData));
MOTH_END_INSTR(CallElement)
- MOTH_BEGIN_INSTR(CallActivationProperty)
+ MOTH_BEGIN_INSTR(CallName)
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData.stackSlot());
- STORE_ACCUMULATOR(Runtime::method_callActivationProperty(engine, instr.name, callData));
- MOTH_END_INSTR(CallActivationProperty)
+ STORE_ACCUMULATOR(Runtime::method_callName(engine, instr.name, callData));
+ MOTH_END_INSTR(CallName)
MOTH_BEGIN_INSTR(CallGlobalLookup)
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData.stackSlot());
@@ -631,10 +631,10 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
: nullptr;
MOTH_END_INSTR(SetExceptionHandler)
- MOTH_BEGIN_INSTR(CallBuiltinThrow)
+ MOTH_BEGIN_INSTR(ThrowException)
Runtime::method_throwException(engine, accumulator);
CHECK_EXCEPTION;
- MOTH_END_INSTR(CallBuiltinThrow)
+ MOTH_END_INSTR(ThrowException)
MOTH_BEGIN_INSTR(GetException)
accumulator = engine->hasException ? *engine->exceptionValue : Primitive::emptyValue();
@@ -646,33 +646,33 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
engine->hasException = true;
MOTH_END_INSTR(SetException)
- MOTH_BEGIN_INSTR(CallBuiltinUnwindException)
+ MOTH_BEGIN_INSTR(UnwindException)
STORE_ACCUMULATOR(Runtime::method_unwindException(engine));
- MOTH_END_INSTR(CallBuiltinUnwindException)
+ MOTH_END_INSTR(UnwindException)
- MOTH_BEGIN_INSTR(CallBuiltinPushCatchContext)
+ MOTH_BEGIN_INSTR(PushCatchContext)
STACK_VALUE(instr.reg) = Runtime::method_pushCatchContext(static_cast<QV4::NoThrowEngine*>(engine), instr.name);
- MOTH_END_INSTR(CallBuiltinPushCatchContext)
+ MOTH_END_INSTR(PushCatchContext)
- MOTH_BEGIN_INSTR(CallBuiltinPushWithContext)
+ MOTH_BEGIN_INSTR(PushWithContext)
accumulator = accumulator.toObject(engine);
CHECK_EXCEPTION;
STACK_VALUE(instr.reg) = Runtime::method_pushWithContext(accumulator, static_cast<QV4::NoThrowEngine*>(engine));
- MOTH_END_INSTR(CallBuiltinPushWithContext)
+ MOTH_END_INSTR(PushWithContext)
- MOTH_BEGIN_INSTR(CallBuiltinPopContext)
+ MOTH_BEGIN_INSTR(PopContext)
Runtime::method_popContext(static_cast<QV4::NoThrowEngine*>(engine), STACK_VALUE(instr.reg));
- MOTH_END_INSTR(CallBuiltinPopContext)
+ MOTH_END_INSTR(PopContext)
- MOTH_BEGIN_INSTR(CallBuiltinForeachIteratorObject)
+ MOTH_BEGIN_INSTR(ForeachIteratorObject)
STORE_ACCUMULATOR(Runtime::method_foreachIterator(engine, accumulator));
- MOTH_END_INSTR(CallBuiltinForeachIteratorObject)
+ MOTH_END_INSTR(ForeachIteratorObject)
- MOTH_BEGIN_INSTR(CallBuiltinForeachNextPropertyName)
+ MOTH_BEGIN_INSTR(ForeachNextPropertyName)
STORE_ACCUMULATOR(Runtime::method_foreachNextPropertyName(accumulator));
- MOTH_END_INSTR(CallBuiltinForeachNextPropertyName)
+ MOTH_END_INSTR(ForeachNextPropertyName)
- MOTH_BEGIN_INSTR(CallBuiltinDeleteMember)
+ MOTH_BEGIN_INSTR(DeleteMember)
if (!Runtime::method_deleteMember(engine, STACK_VALUE(instr.base), instr.member)) {
if (function->isStrict()) {
engine->throwTypeError();
@@ -682,9 +682,9 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
} else {
accumulator = Encode(true);
}
- MOTH_END_INSTR(CallBuiltinDeleteMember)
+ MOTH_END_INSTR(DeleteMember)
- MOTH_BEGIN_INSTR(CallBuiltinDeleteSubscript)
+ MOTH_BEGIN_INSTR(DeleteSubscript)
if (!Runtime::method_deleteElement(engine, STACK_VALUE(instr.base), STACK_VALUE(instr.index))) {
if (function->isStrict()) {
engine->throwTypeError();
@@ -694,9 +694,9 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
} else {
accumulator = Encode(true);
}
- MOTH_END_INSTR(CallBuiltinDeleteSubscript)
+ MOTH_END_INSTR(DeleteSubscript)
- MOTH_BEGIN_INSTR(CallBuiltinDeleteName)
+ MOTH_BEGIN_INSTR(DeleteName)
if (!Runtime::method_deleteName(engine, instr.name)) {
if (function->isStrict()) {
QString name = function->compilationUnit->runtimeStrings[instr.name]->toQString();
@@ -707,29 +707,29 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
} else {
accumulator = Encode(true);
}
- MOTH_END_INSTR(CallBuiltinDeleteName)
+ MOTH_END_INSTR(DeleteName)
- MOTH_BEGIN_INSTR(CallBuiltinTypeofName)
+ MOTH_BEGIN_INSTR(TypeofName)
STORE_ACCUMULATOR(Runtime::method_typeofName(engine, instr.name));
- MOTH_END_INSTR(CallBuiltinTypeofName)
+ MOTH_END_INSTR(TypeofName)
- MOTH_BEGIN_INSTR(CallBuiltinTypeofValue)
+ MOTH_BEGIN_INSTR(TypeofValue)
STORE_ACCUMULATOR(Runtime::method_typeofValue(engine, accumulator));
- MOTH_END_INSTR(CallBuiltinTypeofValue)
+ MOTH_END_INSTR(TypeofValue)
- MOTH_BEGIN_INSTR(CallBuiltinDeclareVar)
+ MOTH_BEGIN_INSTR(DeclareVar)
Runtime::method_declareVar(engine, instr.isDeletable, instr.varName);
- MOTH_END_INSTR(CallBuiltinDeclareVar)
+ MOTH_END_INSTR(DeclareVar)
- MOTH_BEGIN_INSTR(CallBuiltinDefineArray)
+ MOTH_BEGIN_INSTR(DefineArray)
QV4::Value *args = stack + instr.args.stackSlot();
STORE_ACCUMULATOR(Runtime::method_arrayLiteral(engine, args, instr.argc));
- MOTH_END_INSTR(CallBuiltinDefineArray)
+ MOTH_END_INSTR(DefineArray)
- MOTH_BEGIN_INSTR(CallBuiltinDefineObjectLiteral)
+ MOTH_BEGIN_INSTR(DefineObjectLiteral)
QV4::Value *args = stack + instr.args.stackSlot();
STORE_ACCUMULATOR(Runtime::method_objectLiteral(engine, args, instr.internalClassId, instr.arrayValueCount, instr.arrayGetterSetterCountAndFlags));
- MOTH_END_INSTR(CallBuiltinDefineObjectLiteral)
+ MOTH_END_INSTR(DefineObjectLiteral)
MOTH_BEGIN_INSTR(CreateMappedArgumentsObject)
STORE_ACCUMULATOR(Runtime::method_createMappedArgumentsObject(engine));
@@ -739,7 +739,7 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
STORE_ACCUMULATOR(Runtime::method_createUnmappedArgumentsObject(engine));
MOTH_END_INSTR(CreateUnmappedArgumentsObject)
- MOTH_BEGIN_INSTR(CallBuiltinConvertThisToObject)
+ MOTH_BEGIN_INSTR(ConvertThisToObject)
if (function->canUseSimpleFunction()) {
Value *t = &stack[-(int)function->nFormals - 1];
if (!t->isObject()) {
@@ -753,7 +753,7 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
Runtime::method_convertThisToObject(engine);
}
CHECK_EXCEPTION;
- MOTH_END_INSTR(CallBuiltinConvertThisToObject)
+ MOTH_END_INSTR(ConvertThisToObject)
MOTH_BEGIN_INSTR(CreateValue)
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData.stackSlot());
@@ -776,13 +776,13 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
STORE_ACCUMULATOR(Runtime::method_constructPropertyLookup(engine, instr.index, callData));
MOTH_END_INSTR(ConstructPropertyLookup)
- MOTH_BEGIN_INSTR(CreateActivationProperty)
+ MOTH_BEGIN_INSTR(CreateName)
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData.stackSlot());
callData->tag = quint32(Value::ValueTypeInternal::Integer);
callData->argc = instr.argc;
callData->thisObject = QV4::Primitive::undefinedValue();
- STORE_ACCUMULATOR(Runtime::method_constructActivationProperty(engine, instr.name, callData));
- MOTH_END_INSTR(CreateActivationProperty)
+ STORE_ACCUMULATOR(Runtime::method_constructName(engine, instr.name, callData));
+ MOTH_END_INSTR(CreateName)
MOTH_BEGIN_INSTR(ConstructGlobalLookup)
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData.stackSlot());
@@ -1080,15 +1080,15 @@ QV4::ReturnedValue VME::exec(Heap::ExecutionContext *context, Function *function
MOTH_END_INSTR(LoadThis)
MOTH_BEGIN_INSTR(LoadQmlContext)
- STACK_VALUE(instr.result) = Runtime::method_getQmlContext(static_cast<QV4::NoThrowEngine*>(engine));
+ STACK_VALUE(instr.result) = Runtime::method_loadQmlContext(static_cast<QV4::NoThrowEngine*>(engine));
MOTH_END_INSTR(LoadQmlContext)
MOTH_BEGIN_INSTR(LoadQmlImportedScripts)
- STACK_VALUE(instr.result) = Runtime::method_getQmlImportedScripts(static_cast<QV4::NoThrowEngine*>(engine));
+ STACK_VALUE(instr.result) = Runtime::method_loadQmlImportedScripts(static_cast<QV4::NoThrowEngine*>(engine));
MOTH_END_INSTR(LoadQmlImportedScripts)
MOTH_BEGIN_INSTR(LoadQmlSingleton)
- accumulator = Runtime::method_getQmlSingleton(static_cast<QV4::NoThrowEngine*>(engine), instr.name);
+ accumulator = Runtime::method_loadQmlSingleton(static_cast<QV4::NoThrowEngine*>(engine), instr.name);
MOTH_END_INSTR(LoadQmlSingleton)
#ifdef MOTH_THREADED_INTERPRETER