Permalink
Switch branches/tags
Nothing to show
Commits on Feb 20, 2011
  1. reverted 687382e and updated testparser.js

    mishoo committed Feb 20, 2011
    to use valid code.
  2. renamed variable "strict_mode" to "exigent_mode", to avoid confusion …

    mishoo committed Feb 20, 2011
    …with
    
    ES5's "use strict;" (which, for the time being, we don't care about).
  3. support funny cases of for-in:

    mishoo committed Feb 20, 2011
    for (var x = 5 in y);
    for (a[i++] in z);
    
    (essentially ported Marijn's fix from
    marijnh/parse-js@3011e58
    and updated the walker/mangler/generator)
  4. allow new Date++

    mishoo committed Feb 20, 2011
  5. minor

    mishoo committed Feb 20, 2011
  6. fixed some regexps

    mishoo committed Feb 20, 2011
  7. disabled some checks by default (they're enabled in strict_mode):

    mishoo committed Feb 20, 2011
    - continue/break outside loop/switch
    - return outside of function
    - continue/break label not defined
  8. issue #96 (regular expression flags) -- accept any identifier charact…

    mishoo committed Feb 20, 2011
    …er for
    
    regular expression flags (ES-262, 7.8.5)
Commits on Feb 19, 2011
  1. fixes #92 -- added --reserved-names command line argument (pass one o…

    mishoo committed Feb 19, 2011
    …r more
    
    names separated by a comma to exclude them from compression)
Commits on Feb 18, 2011
  1. slightly better fix, in case your inline function is named toString,

    mishoo committed Feb 18, 2011
    hasOwnProperty or whatever.. :)
Commits on Feb 17, 2011
Commits on Feb 9, 2011
  1. resolved conflict

    mishoo committed Feb 9, 2011
Commits on Feb 8, 2011
  1. fixes #87 -- transform while(true){...} into for(;;){...}. Drop the b…

    mishoo committed Feb 8, 2011
    …lock
    
    if it's empty.
    
    Additionally improved evaluation of constant expressions, so that something
    like the following will stand too:
    
        while (typeof "foo" == "string") { bar() }  ==>  for(;;)bar()
    
    Also removed dead code (when we can determine that the condition of a
    while/do is constantly false, or the condition of an IF is constant)
    
    The savings, though, seem to be insignificant on real-world code.
Commits on Feb 7, 2011
Commits on Feb 5, 2011
  1. keep the first token in ast_walker, ast_add_scope and ast_mangle (use…

    mishoo committed Feb 5, 2011
    …ful for
    
    the case where we include the original token in the AST, see parse())
  2. fixes #65 -- moved the following transformations under --unsafe:

    mishoo committed Feb 5, 2011
        !(a<b)   ...  a>=b
        !(a<=b)  ...  a>b
        !(a>b)   ...  a<=b
        !(a>=b)  ...  a<b
    
    (11 bytes lost on DynarchLIB).
    
    Rationale: when a is NaN, both a<=0 and a>0 evaluate to *false*.  Thus, we
    cannot minify !(a<=0) to a>0 because the first one is *true*.
Commits on Feb 4, 2011
  1. removed more unused code

    mishoo committed Feb 4, 2011
  2. removed unused code

    mishoo committed Feb 4, 2011
  3. - Removed --extra because of bugs in the optimizations. After the bug…

    WizKid committed Feb 4, 2011
    …s are fixed I will move them into --unsafe so they get some testing.
    
    - Updated tests so all everything are green now
  4. mostly cosmetic change

    mishoo committed Feb 4, 2011
Commits on Feb 3, 2011
  1. minor optimizations:

    mishoo committed Feb 3, 2011
    - a && (b && c) ==> a && b && c (the only operators where we can discard the
      parens are &&, || and *)
    
    - if (foo) if (bar) return baz() ==> if (foo && bar) return baz()