diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-15 14:22:35 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-04 09:45:30 +0100 |
commit | 608a9600142878574a509964941413bb15c91201 (patch) | |
tree | a7ba1dd6acf5bcacce9032988cc61f3748cfc083 /src | |
parent | 20178758ae6aebd155ed0545a03a8b402e805e66 (diff) |
Remove unused inline wrapper
The wrapper method for Function::code() was still there
from the times we used C++ exceptions. It's not needed
any more, so get rid of it.
Change-Id: I2ec25fbca71eeef9d7a94a38b5adfa42e4de3a84
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/compiler/qv4isel_masm.cpp | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 6 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4function.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4function_p.h | 5 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 4 |
5 files changed, 9 insertions, 12 deletions
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp index 67c4f672c6..bdcfc11f56 100644 --- a/src/qml/compiler/qv4isel_masm.cpp +++ b/src/qml/compiler/qv4isel_masm.cpp @@ -68,7 +68,7 @@ using namespace QV4; CompilationUnit::~CompilationUnit() { foreach (Function *f, runtimeFunctions) - engine->allFunctions.remove(reinterpret_cast<quintptr>(f->codePtr)); + engine->allFunctions.remove(reinterpret_cast<quintptr>(f->code)); } void CompilationUnit::linkBackendToEngine(ExecutionEngine *engine) @@ -85,7 +85,7 @@ void CompilationUnit::linkBackendToEngine(ExecutionEngine *engine) } foreach (Function *f, runtimeFunctions) - engine->allFunctions.insert(reinterpret_cast<quintptr>(f->codePtr), f); + engine->allFunctions.insert(reinterpret_cast<quintptr>(f->code), f); } QV4::ExecutableAllocator::ChunkOfPages *CompilationUnit::chunkForFunction(int functionIndex) diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index a6184e6073..50db0e09fb 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -817,13 +817,13 @@ namespace { { bool operator()(Function *function, quintptr pc) { - return reinterpret_cast<quintptr>(function->codePtr) < pc - && (reinterpret_cast<quintptr>(function->codePtr) + function->codeSize) < pc; + return reinterpret_cast<quintptr>(function->code) < pc + && (reinterpret_cast<quintptr>(function->code) + function->codeSize) < pc; } bool operator()(quintptr pc, Function *function) { - return pc < reinterpret_cast<quintptr>(function->codePtr); + return pc < reinterpret_cast<quintptr>(function->code); } }; } diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp index ebe214ad72..950224386d 100644 --- a/src/qml/jsruntime/qv4function.cpp +++ b/src/qml/jsruntime/qv4function.cpp @@ -54,7 +54,7 @@ Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, ReturnedValue (*codePtr)(ExecutionContext *, const uchar *), quint32 _codeSize) : compiledFunction(function) , compilationUnit(unit) - , codePtr(codePtr) + , code(codePtr) , codeData(0) , codeSize(_codeSize) { diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h index 5d284f1b2b..a7b569cf7e 100644 --- a/src/qml/jsruntime/qv4function_p.h +++ b/src/qml/jsruntime/qv4function_p.h @@ -85,11 +85,8 @@ struct Function { const CompiledData::Function *compiledFunction; CompiledData::CompilationUnit *compilationUnit; - inline ReturnedValue code(ExecutionContext *ctx, const uchar *data) { - return codePtr(ctx, data); - } - ReturnedValue (*codePtr)(ExecutionContext *, const uchar *); + ReturnedValue (*code)(ExecutionContext *, const uchar *); const uchar *codeData; quint32 codeSize; diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 32ef98327b..194320528c 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -400,7 +400,7 @@ ScriptFunction::ScriptFunction(ExecutionContext *scope, Function *function) this->function = function; this->function->compilationUnit->ref(); Q_ASSERT(function); - Q_ASSERT(function->codePtr); + Q_ASSERT(function->code); // global function if (!scope) @@ -487,7 +487,7 @@ SimpleScriptFunction::SimpleScriptFunction(ExecutionContext *scope, Function *fu this->function = function; this->function->compilationUnit->ref(); Q_ASSERT(function); - Q_ASSERT(function->codePtr); + Q_ASSERT(function->code); // global function if (!scope) |