com.google.caja.ancillary.opt
Class ConstantPooler

java.lang.Object
  extended by com.google.caja.ancillary.opt.ConstantPooler

public class ConstantPooler
extends java.lang.Object

Collects frequently used literals, e.g. long strings and the like, into a constant pool at the top of each top level function.

Author:
mikesamuel@gmail.com

Nested Class Summary
private static class ConstantPooler.LitVal
           
 
Constructor Summary
ConstantPooler()
           
 
Method Summary
static Block optimize(Block program)
           
private static void optimizeTopLevelFunctions(ParseTreeNode node)
           
private static void optimizeWithin(FunctionConstructor fc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantPooler

public ConstantPooler()
Method Detail

optimize

public static Block optimize(Block program)

optimizeTopLevelFunctions

private static void optimizeTopLevelFunctions(ParseTreeNode node)

optimizeWithin

private static void optimizeWithin(FunctionConstructor fc)


Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0