A code minifier that can eliminate code that is not reached on a particular user agent.
Most of this code is in ancillary. Please review the non ancillary bits.
See http://code.google.com/p/google-caja/wiki/UserAgentContext
Submitted @3827
LGTM http://codereview.appspot.com/130086/diff/7001/7012 File src/com/google/caja/ancillary/opt/ParseTreeKB.java (right): http://codereview.appspot.com/130086/diff/7001/7012#newcode52 Line 52: public class ParseTreeKB { Does KB stand ...
16 years, 8 months ago
(2009-10-26 23:20:11 UTC)
#1
http://codereview.appspot.com/130086/diff/7001/7012 File src/com/google/caja/ancillary/opt/ParseTreeKB.java (right): http://codereview.appspot.com/130086/diff/7001/7012#newcode52 Line 52: public class ParseTreeKB { On 2009/10/26 23:20:11, metaweta ...
16 years, 8 months ago
(2009-10-27 00:49:19 UTC)
#2
http://codereview.appspot.com/130086/diff/7001/7012
File src/com/google/caja/ancillary/opt/ParseTreeKB.java (right):
http://codereview.appspot.com/130086/diff/7001/7012#newcode52
Line 52: public class ParseTreeKB {
On 2009/10/26 23:20:11, metaweta wrote:
> Does KB stand for "knowledge base"?
yes. And kibbles & bits.
http://codereview.appspot.com/130086/diff/7001/7006
File src/com/google/caja/parser/quasiliteral/Scope.java (right):
http://codereview.appspot.com/130086/diff/7001/7006#newcode467
Line 467: * @return whether 'name' is defined as a declared function within this
On 2009/10/26 23:20:11, metaweta wrote:
> You seem to be talking about four different cases:
> 1) local var: var name = value;
> 2) formal parameter: function (name) { ... }
> 3) declared function: function name() { ... }
> 4) undefined
>
> What does this method distinguish between? (any of 1-3) vs 4?
LocalType does not distinguish between 1 and 2.
(3) would be LocalType.FUNCTION_DECLARED.
(4) would be a null LocalType.
Issue 130086: Adds to the minifier an optimization which takes into account user-agent info.
(Closed)
Created 16 years, 8 months ago by MikeSamuel
Modified 16 years, 7 months ago
Reviewers: metaweta
Base URL: http://google-caja.googlecode.com/svn/trunk/
Comments: 4