Sitelet https://github.com/acornjs/acorn/compare/master...perf
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: acornjs/acorn
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: acornjs/acorn
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: perf
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 10 files changed
  • 1 contributor

Commits on May 20, 2017

  1. Speed up reading words

    RReverser committed May 20, 2017
    Configuration menu
    Copy the full SHA
    1bf0469 View commit details
    Browse the repository at this point in the history
  2. Optimize parseSubscripts

    RReverser committed May 20, 2017
    Configuration menu
    Copy the full SHA
    5d8cbfa View commit details
    Browse the repository at this point in the history
  3. Fix curPosition and enterFunctionScope deopts

    It's important to have a finalized object shape before calling methods that can be reused later, as otherwise they see two different object shapes when called at different times (in constructor and outside of it) and require recompilation.
    RReverser committed May 20, 2017
    Configuration menu
    Copy the full SHA
    0a89b47 View commit details
    Browse the repository at this point in the history
  4. Simplify isIdentifierStart|Char checks

     - Explain char codes with comments.
     - Try most likely ranges first.
     - Don't duplicate nonASCIIidentifier chars into *Start regexp - it's rare case that only requires more memory, we can instead inline regexps and try one by one.
    RReverser committed May 20, 2017
    Configuration menu
    Copy the full SHA
    b5603cf View commit details
    Browse the repository at this point in the history
  5. Use Object.create(null) for map-like objects

    Fallback to regular objects on legacy engines, but use prototype-less object for random access.
    
    This allows to avoid frequent deopt due to constantly changing object shape.
    RReverser committed May 20, 2017
    Configuration menu
    Copy the full SHA
    72dd9fe View commit details
    Browse the repository at this point in the history
  6. Fix frequent deopt in parseStatement

    When checking for labeled statement, we were testing expr.type first, which meant always accessing another object shape (depending on node type) whenever a statement started with an identifier.
    
    By simply reordering two checks, we can make sure that expr.type will be accessed only on the same node (Identifier) or on error, because it will be reached only if we saw a colon (":") right after it.
    RReverser committed May 20, 2017
    Configuration menu
    Copy the full SHA
    7d306ea View commit details
    Browse the repository at this point in the history
  7. Fix TokenType runtime shape

    This change makes all TokenType to have fields of same types which avoids deopt in checkLVal (and maybe other methods).
    RReverser committed May 20, 2017
    Configuration menu
    Copy the full SHA
    1601e6f View commit details
    Browse the repository at this point in the history
  8. Lint fix

    RReverser committed May 20, 2017
    Configuration menu
    Copy the full SHA
    070f36b View commit details
    Browse the repository at this point in the history
Loading