diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2012-06-12 18:13:55 +0100 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2012-06-12 18:14:13 +0100 |
commit | 6ce83a38c9ba4b5b76ed1bdf223d471b886b5c72 (patch) | |
tree | 792ebbafbf008b2d73c27f988fef5430d1b631dc /main.cpp | |
parent | 684ed0dc14de1bfba249a322b14e16c586740626 (diff) |
Begin to implement moth vm
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) { |