From b93ddb95a74fff4bc61073b6b04e9dd7a7dc7f36 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 18 Oct 2013 15:36:40 +0200 Subject: Qml JavaScript code generation cleanups * Run the binding expressions, functions and signal handlers through the V4 codegen _per_ component, and run the isel at the end for the entire file. We need to do per-component codegen because we want to set up the correct id and object scopes, which are different for the root component and anonymous components. * Changed V4IR::Module to allow for the concept of "qml modules" where there is no root function defined. This is a logical consequence of running v4 codegen multiple times with different input but the same V4IR::Module. Change-Id: Ib3a719f83507cbab7c2e4e145ccad5b663c795cf Reviewed-by: Lars Knoll --- src/qml/compiler/qv4isel_p.cpp | 3 --- 1 file changed, 3 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 500c2bd26f..483cb8e6f9 100644 --- a/src/qml/compiler/qv4isel_p.cpp +++ b/src/qml/compiler/qv4isel_p.cpp @@ -80,9 +80,6 @@ EvalISelFactory::~EvalISelFactory() QV4::CompiledData::CompilationUnit *EvalInstructionSelection::compile(bool generateUnitData) { - Function *rootFunction = irModule->rootFunction; - if (!rootFunction) - return 0; for (int i = 0; i < irModule->functions.size(); ++i) run(i); -- cgit v1.2.3