From 062c43beedcae4beb1c1e3667178c3dfa56f38de Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 2 Oct 2012 08:53:47 +0200 Subject: [PATCH] Fix generation of multiple functions Sine we can't reset the MacroAssembler properly right now, reconstruct the isel for every function. --- main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 460663a..fa03e08 100644 --- a/main.cpp +++ b/main.cpp @@ -227,9 +227,10 @@ static void evaluate(QQmlJS::VM::Context *ctx, const QString &fileName, const QS foreach (IR::Function *function, module.functions) isel(function); } else { - MASM::InstructionSelection isel(vm, &module, code); - foreach (IR::Function *function, module.functions) + foreach (IR::Function *function, module.functions) { + MASM::InstructionSelection isel(vm, &module, code); isel(function); + } if (! protect(code, codeSize)) Q_UNREACHABLE(); -- 2.7.4