Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Aug 15, 2010
  1. fixed doc rendering for github

    authored
  2. README for github, take 3

    authored
  3. README.org for github

    authored
  4. added some documentation

    authored
Commits on Aug 14, 2010
  1. minor

    authored
  2. comments + small cleanups

    authored
  3. further optimizations for IFs:

    authored
    - if (cond) foo(); else bar();  ==> cond?foo():bar();
    - if (cond) foo();              ==> cond&&foo();
  4. another fix: don't shadow a name that is referenced but not defined -…

    authored
    …- it's possibly a global defined elsewhere
  5. lots of other fixes while testing on jQuery:

    authored
    - name mangling is now smarter -- don't shadow previously mangled names when
      they're referenced from sub-scopes
    
    - use a simpler algorithm to 'compute' mangled names (base54)
    
    - add parens around sequences when they are operands in a binary operator
    
    - add parens around expression in "sub" when it's not a simple one
    
    - disabled removal of brackets in a "then" clause (needs more thinking)
    
    On minifying jQuery we're better than YUI by 5.8K:
    
    -rw-r--r-- 1 mishoo mishoo 79337 2010-08-14 13:39 /tmp/jq-yui
    -rw-r--r-- 1 mishoo mishoo 73444 2010-08-14 13:38 /tmp/jq-mine
  6. Fixed bug that showed up when processing jQuery: I was using the "tok…

    authored
    …en in
    
    KEYWORDS" construct everywhere, and it doesn't work well because jQuery
    defines a lot of variables using names that have some standard meaning in
    JS, such as "toString".  "toString" in OBJECT will always evaluate to true,
    since all objects have a "toString" method, but it's not what we expect.
    
    Take two was to replace all these constructs with foo.hasOwnProperty(bar),
    which didn't work either for jQuery because it defines a variable called
    "hasOwnProperty".  When parsing the scope, I put all the variable names in a
    hash and later I'm calling that hash.hasOwnProperty(varname) to determine
    wether the variable is in scope or not.  But "hasOwnProperty" was already
    something else in that hash. :-)
    
    Cool, isn't it.  So I added the HOP function which does:
    
        return Object.prototype.hasOwnProperty.call(hash, key);
    
    and now we're flawless.
Commits on Aug 13, 2010
  1. minor

    authored
  2. some reorganization, some fixes (moved gen_code to process.js, handle

    authored
    consecutive var decls in switch blocks)
  3. rewrote proper mangler/compressor (in process.js); revised code gener…

    authored
    …ator.
    
    It's now beating YUI compressor by 2.4KB (and by many long seconds :-p) on the DynarchLIB code.
Commits on Aug 11, 2010
  1. minor style changes

    authored
Commits on Aug 10, 2010
  1. minor

    authored
  2. minor

    authored
Commits on Aug 9, 2010
  1. minor

    authored
  2. display empty blocks as "{}"

    authored
Commits on Aug 8, 2010
  1. disorganized tests

    authored
  2. minor

    authored
Something went wrong with that request. Please try again.