From bf22c55036f6429ccfc849ea71f33e757fae47fa Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 11 Sep 2013 11:26:32 +0200 Subject: Fix passing of exception table pointers to ARM runtime on unwinding Our synthetic exception unwind table for ARM is located at (char *)codeStart + function->codeSize; This relies on function->codeSize to contain the number of bytes of instructions the function has, not the size of the MacroAssemblerCodeRef (which contains the size of the entire area). This patch fixes the calculation of function->codeSize and also replaces the QHash for the IR::Function* -> CodeRef mapping in the masm backend with a simple vector that's perfectly sufficient. Bug spotted by Petr Nejedly Change-Id: I78a53599085c613c6d97aa2490922f54e0bb4f63 Reviewed-by: Lars Knoll --- src/qml/compiler/qv4isel_p.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/compiler/qv4isel_p.cpp') diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp index 66f8ca5327..df879f5796 100644 --- a/src/qml/compiler/qv4isel_p.cpp +++ b/src/qml/compiler/qv4isel_p.cpp @@ -78,8 +78,8 @@ QV4::CompiledData::CompilationUnit *EvalInstructionSelection::compile() Function *rootFunction = irModule->rootFunction; if (!rootFunction) return 0; - foreach (V4IR::Function *f, irModule->functions) - run(f); + for (int i = 0; i < irModule->functions.size(); ++i) + run(i); return backendCompileStep(); } -- cgit v1.2.3