In TopLevelCompiler, it looks like that "explanations" table is not needed
anymore here

        List libraries = env.getLibraries();
        Map explanations = env.getExplanations();
        for (Iterator iter = libraries.iterator();
             iter.hasNext(); ) {
            File file = (File) iter.next();
            Compiler.importLibrary(file, env);
        }


otherwise approved

On Fri, Jul 9, 2010 at 12:00 PM, P T Withington <[email protected]> wrote:

> Change 20100708-ptw-9 by [email protected] on 2010-07-08 20:39:17 EDT
>    in /Users/ptw/OpenLaszlo/trunk
>    for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Process autoincludes on un-transformed source
>
> Bugs Fixed:  LPP-8738 autoincludes broken by mixi implementation
>
> Technical Reviewer: [email protected] (pending)
> QA Reviewer: [email protected] (pending)
>
> Overview:
>
>    We call getLibraries 3 (!) times in compiling a file.  We should
>    only need to call it once, since the set of libraries is
>    determined by the source LZX.  The LZX mixin implementation
>    actually transforms the DOM to create the expected semantics,
>    which resulted in the auto-include mechanism finding different
>    references (and losing the source references) because it was
>    invoked on the transformed source.  This change caches the
>    libraries found by the `updateRootSchema` call and reuses them for
>    the `handleAutoincludes` call.
>
>    I did not address the 3rd call `computePropertiesAndGlobals` in
>    this change to reduce the risks.  We may want to try this in a
>    separate change as an improvement to the compiler.
>
> Details:
>
>    ClassCompiler:  Remove unused local, noticed in passing.
>
>    TopLevelCompiler:  Always compute the autoincludes, there is no
>    need for the conditional; this lets us get the correct list of
>    libraries and cache them for use in `handleAutoincludes`.
>
>    CompilationEnvironment:  Add slots for caching the libraries and
>    explanations.
>
>    Compiler:  Cache the libraries and explanations discovered by
>    `updateRootSchema`.
>
> Tests:
>    lztest, smoke, css and mixin tests, selection of demos
>
> Files:
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java
> M
> WEB-INF/lps/server/src/org/openlaszlo/compiler/ToplevelCompiler.java
> M
> WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
> M       WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100708-ptw-9.tar
>



-- 
Henry Minsky
Software Architect
[email protected]

Reply via email to