1. 23 Sep, 2016 1 commit
  2. 20 Sep, 2016 2 commits
  3. 19 Sep, 2016 1 commit
  4. 16 Sep, 2016 1 commit
    • vogelheim's avatar
      Rework scanner-character-streams. · 642d6d31
      vogelheim authored
      - Smaller, more consistent streams API (Advance, Back, pos, Seek)
      - Remove implementations from the header, in favor of creation functions.
      
      Observe:
      - Performance:
        - All Utf16CharacterStream methods have an inlinable V8_LIKELY w/ a
          body of only a few instructions. I expect most calls to end up there.
        - There used to be performance problems w/ bookmarking, particularly
          with copying too much data on SetBookmark w/ UTF-8 streaming streams.
          All those copies are gone.
        - The old streaming streams implementation used to copy data even for
          2-byte input. It no longer does.
        - The only remaining 'slow' method is the Seek(.) slow case for utf-8
          streaming streams. I don't expect this to be called a lot; and even if,
          I expect it to be offset by the gains in the (vastly more frequent)
          calls to the other methods or the 'fast path'.
        - If it still bothers us, there are several ways to speed it up.
      - API & code cleanliness:
        - I want to remove the 'old' API in a follow-up CL, which should mostly
          delete code, or replace it 1:1.
        - In a 2nd follow-up I want to delete much of the UTF-8 handling in Blink
          for streaming streams.
        - The "bookmark" is now always implemented (and mostly very fast), so we
          should be able to use it for more things.
      - Testing & correctness:
        - The unit tests now cover all stream implementations,
          and are pretty good and triggering all the edge cases.
        - Vastly more DCHECKs of the invariants.
      
      BUG=v8:4947
      
      Review-Url: https://codereview.chromium.org/2314663002
      Cr-Commit-Position: refs/heads/master@{#39464}
      642d6d31
  5. 06 Sep, 2016 1 commit
    • bakkot's avatar
      Split the AST representation of class properties from object properties. · 7bc200c7
      bakkot authored
      This introduces ClassLiteralProperty and a supertype LiteralProperty of
      it and ObjectLiteralProperty. It also splits the parsing of the two.
      This substiantially clarifies some logic, especially as classes
      continue to evolve, and is also about a 2% performance improvement to
      parsing either kind of property (since no work is wasted on logic
      only necessary for the other kind). Also, it saves a word on
      ObjectLiteralProperties.
      
      Review-Url: https://codereview.chromium.org/2302643002
      Cr-Commit-Position: refs/heads/master@{#39219}
      7bc200c7
  6. 25 Aug, 2016 1 commit
  7. 22 Aug, 2016 1 commit
  8. 19 Aug, 2016 1 commit
    • vogelheim's avatar
      Fix Scanner invariants w/ literal buffers. · b68df2d2
      vogelheim authored
      This isn't the most elegant fix, but I'd prefer to not rework the logic
      right now. What happens is:
      - Most parts of the Scanner use nullptr to mean, no literal buffer.
      - The bookmarking logic may end up with a state where there's a non-nullptr
        literal buffer, but it's empty. (length 0)
      - These are functionally equivalent, so there's no 'real' bug.
      - But it makes it hard to reason. This patch hence checks for length-0
        literal buffers, and uses nullptr instead.
      
      R=marja@chromium.org
      BUG=chromium:639191 v8:4947
      
      Review-Url: https://codereview.chromium.org/2258073003
      Cr-Commit-Position: refs/heads/master@{#38756}
      b68df2d2
  9. 17 Aug, 2016 1 commit
    • vogelheim's avatar
      Scanner::LiteralBuffer usage cleanup. · c677f813
      vogelheim authored
      1, restrict use of LiteralBuffers to the tokens that actually need it.
        - E.g., previously the Token::FUNCTION would have a literal buffer
          containing "function", which was never actually used.
        - This eliminates copies of the string data for every call to
          PeekAhead or SetBookmark.
      2, document & enforce the "secret" Scanner API contract w/ DCHECK
        - Document & check the correspondence of token value and literal buffer.
        - Document & check preconditions for calling PeekAhead, ScanRegExp*,
          ScanTemplate*.
      
      BUG=v8:4947
      
      Review-Url: https://codereview.chromium.org/2240513003
      Cr-Commit-Position: refs/heads/master@{#38677}
      c677f813
  10. 10 Aug, 2016 1 commit
  11. 02 Aug, 2016 1 commit
  12. 12 Jul, 2016 1 commit
  13. 09 Jun, 2016 2 commits
    • lpy's avatar
      Move hashmap into src/base. · 2fd55667
      lpy authored
      We ported hashmap.h into libsampler as a workaround before, so the main focus of
      this patch is to reduce code duplication. This patch moves the hashmap into
      src/base as well as creates DefaultAllocationPolicy using malloc and free.
      
      BUG=v8:5050
      LOG=n
      
      Review-Url: https://codereview.chromium.org/2010243003
      Cr-Commit-Position: refs/heads/master@{#36873}
      2fd55667
    • verwaest's avatar
      Speed up adding literal chars when the buffer is known to be one-byte · e7de678a
      verwaest authored
      We have fast-paths in identifier and string scanning that know that so far they have only handled one-byte input. In that case, we can add chars to the literal buffer assuming that it's still in one-byte state, avoiding 2 branches. This seemingly reduces identifier scanning from ~5% to ~4% on octane-codeload.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2044233004
      Cr-Commit-Position: refs/heads/master@{#36868}
      e7de678a
  14. 16 May, 2016 2 commits
  15. 13 May, 2016 1 commit
  16. 12 May, 2016 1 commit
  17. 03 May, 2016 1 commit
  18. 28 Apr, 2016 1 commit
  19. 21 Mar, 2016 2 commits
    • caitpotter88's avatar
      [parser] implement error reporting for Scanner · e6f4b749
      caitpotter88 authored
      Enables the Scanner to provide a better error message when errors occur
      in escape sequences, numbers, strings, etc.
      
      BUG=v8:4829, v8:3230
      LOG=N
      R=adamk@chromium.org, littledan@chromium.org
      
      Review URL: https://codereview.chromium.org/1793913002
      
      Cr-Commit-Position: refs/heads/master@{#34966}
      e6f4b749
    • vogelheim's avatar
      Revert of Parser: Make skipping HTML comments optional. (patchset #6 id:140001... · 09ac4f29
      vogelheim authored
      Revert of Parser: Make skipping HTML comments optional. (patchset #6 id:140001 of https://codereview.chromium.org/1801203002/ )
      
      Reason for revert:
      Violates ES6 spec (crbug.com/4850), and implementation was over-eager. Will revert for now.
      
      Original issue's description:
      > Parser: Make skipping HTML comments optional.
      >
      > API change: This adds a new flag skip_html_comments to v8::ScriptOriginOptions. This flag controls whether V8 will attempt to honour HTML-style comments in JS sources.
      >
      > (That is: Gracefully ignore <!-- ... ---> in JS sources, which was a popular technique in the early days of JavaScript, to prevent non-JS-enabled browsers from displaying script sources to uses.)
      >
      > The flag defaults to 'true' when using v8::ScriptOrigin constructor, which preserves the existing behaviour. Embedders which are happy with the existing behaviour will thus not need any changes.
      >
      > BUG=chromium:573887
      > LOG=Y
      >
      > Committed: https://crrev.com/91d344288aa51ed03eaaa1cb3e368ac1e82f0173
      > Cr-Commit-Position: refs/heads/master@{#34904}
      
      TBR=jochen@chromium.org,rossberg@chromium.org
      # Not skipping CQ checks because original CL landed more than 1 days ago.
      BUG=chromium:573887, v8:4850
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1817163003
      
      Cr-Commit-Position: refs/heads/master@{#34958}
      09ac4f29
  20. 18 Mar, 2016 2 commits
  21. 01 Mar, 2016 1 commit
  22. 27 Jan, 2016 1 commit
  23. 08 Jan, 2016 1 commit
  24. 26 Nov, 2015 1 commit
  25. 25 Nov, 2015 1 commit
    • bmeurer's avatar
      [es6] Correct parsing of regular expression literal flags. · 2732a6ad
      bmeurer authored
      ES6 section 12.2.8.1 states that flags for regular expression literals
      must be checked during parsing and invalid flags are early errors. This
      change adapts the Scanner and (Pre)Parser to act according to the spec.
      
      This is also a prerequisite to unify the handling of literal creation
      (for Objects, Arrays, Regexps, and at some point Classes).
      
      R=yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1472323002
      
      Cr-Commit-Position: refs/heads/master@{#32273}
      2732a6ad
  26. 17 Nov, 2015 1 commit
  27. 21 Oct, 2015 1 commit
    • vogelheim's avatar
      Always dispose backing store. · 7770e021
      vogelheim authored
      (With a v8::Vector, the client is responsible for memory management.
       I think there can be a situation where the Vector has a char[1] backing
       store with '\0' in it, in which case the current code would leak.
       If we always Dispose() the backing store this should be avoided.
       Since dispose will delete[] the actual backing store, this should
       also work then the backing store is nullptr.)
      
      R=jochen@chromium.org
      BUG=chromium:525885
      LOG=N
      
      Review URL: https://codereview.chromium.org/1410543005
      
      Cr-Commit-Position: refs/heads/master@{#31446}
      7770e021
  28. 30 Sep, 2015 1 commit
  29. 28 Aug, 2015 1 commit
    • littledan's avatar
      Sloppy-mode let parsing · decc7b09
      littledan authored
      This patch makes 'let' a contextual keyword in both strict and sloppy mode.
      It behaves as a keyword when used at the beginning of a StatementListItem
      or lexical declaration at the beginning of a for statement, if it is followed
      by an identifier, [ or {. Implementing this change requires an extra token
      look-ahead by the parser which is only invoked in certain cases (so as to
      avoid parsing RegExps as ECMAScript tokens). This might result in a slowdown
      of the scanner, but performance testing of this patch hasn't yet found much
      of a regression.
      
      BUG=v8:3305
      LOG=Y
      R=adamk,vogelheim
      
      Review URL: https://codereview.chromium.org/1315673009
      
      Cr-Commit-Position: refs/heads/master@{#30451}
      decc7b09
  30. 20 Aug, 2015 1 commit
    • mstarzinger's avatar
      Separate UnicodeCache out into an own file. · 4e39437a
      mstarzinger authored
      This make inclusion of unicode-inl.h in object.h absolete. Now most
      compilation units don't require that header. It also breaks a cycle
      within declarations of the scanner.h header.
      
      This tries to remove includes of "-inl.h" headers from normal ".h"
      headers, thereby reducing the chance of any cyclic dependencies and
      decreasing the average size of our compilation units.
      
      Note that this change still leaves 3 violations of that rule in the
      code, checked with the "tools/check-inline-includes.sh" tool.
      
      R=yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1287893006
      
      Cr-Commit-Position: refs/heads/master@{#30268}
      4e39437a
  31. 12 Aug, 2015 1 commit
    • mstarzinger's avatar
      Remove inline header includes from non-inline headers (1). · 00a07bc1
      mstarzinger authored
      This tries to remove includes of "-inl.h" headers from normal ".h"
      headers, thereby reducing the chance of any cyclic dependencies and
      decreasing the average size of our compilation units.
      
      Note that this change still leaves 7 violations of that rule in the
      code. However there now is the "tools/check-inline-includes.sh" tool
      detecting such violations.
      
      R=bmeurer@chromium.org
      
      Review URL: https://codereview.chromium.org/1283033003
      
      Cr-Commit-Position: refs/heads/master@{#30125}
      00a07bc1
  32. 05 Aug, 2015 2 commits
  33. 30 Jun, 2015 1 commit
  34. 26 Jun, 2015 1 commit