Package com.google.gwt.dev.jjs.impl

Examples of com.google.gwt.dev.jjs.impl.JsNoopTransformer


        StatementRanges statementRanges = v.getStatementRanges();
        String code = out.toString();
        JsSourceMap infoMap = (sourceInfoMaps != null) ? v.getSourceInfoMap() : null;

        JsAbstractTextTransformer transformer =
            new JsNoopTransformer(code, statementRanges, infoMap);

        /**
         * Cut generated JS up on class boundaries and re-link the source (possibly making use of
         * source from previous compiles, thus making it possible to perform partial recompiles).
         */
        if (options.isIncrementalCompileEnabled()) {
          transformer = new JsTypeLinker(logger, transformer, v.getClassRanges(),
              v.getProgramClassRange(), getMinimalRebuildCache(), jprogram.typeOracle);
          transformer.exec();
        }

        /**
         * Reorder function decls to improve compression ratios. Also restructures the top level
         * blocks into sub-blocks if they exceed 32767 statements.
         */
        Event functionClusterEvent = SpeedTracerLogger.start(CompilerEventType.FUNCTION_CLUSTER);
        // TODO(cromwellian) move to the Js AST optimization, re-enable sourcemaps + clustering
        if (!sourceMapsEnabled && options.shouldClusterSimilarFunctions()
            && options.getNamespace() == JsNamespaceOption.NONE
            && options.getOutput() == JsOutputOption.OBFUSCATED) {
          transformer = new JsFunctionClusterer(transformer);
          transformer.exec();
        }
        functionClusterEvent.end();

        jsFragments[i] = transformer.getJs();
        ranges[i] = transformer.getStatementRanges();
        if (sizeBreakdowns != null) {
          sizeBreakdowns[i] = v.getSizeBreakdown();
        }
        if (sourceInfoMaps != null) {
          sourceInfoMaps.add(transformer.getSourceInfoMap());
        }
      }

      generateJavascriptEvent.end();
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.impl.JsNoopTransformer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.