diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -213,6 +213,9 @@ void evaluate(QQmlJS::VM::ExecutionEngine *vm, const QString &fileName, const QS x86_64::InstructionSelection isel(vm, &module, code); foreach (IR::Function *function, module.functions) isel(function); + + if (! protect(code, codeSize)) + Q_UNREACHABLE(); } } @@ -220,11 +223,6 @@ void evaluate(QQmlJS::VM::ExecutionEngine *vm, const QString &fileName, const QS return; } - if (!useMoth) { - if (! protect(code, codeSize)) - Q_UNREACHABLE(); - } - VM::Context *ctx = vm->rootContext; ctx->varCount = globalCode->locals.size(); @@ -240,7 +238,7 @@ void evaluate(QQmlJS::VM::ExecutionEngine *vm, const QString &fileName, const QS Moth::VME vme; vme(ctx, code); } else { - globalCode->code(ctx); + globalCode->code(ctx, globalCode->codeData); } if (ctx->hasUncaughtException) { |