1. 21 Aug, 2018 1 commit
    • Toon Verwaest's avatar
      [scanner] Go back to untemplatized scanning with buffering · fcfd995a
      Toon Verwaest authored
      This reverts the following 3 CLs:
      
      Revert "[scanner] Templatize scan functions by encoding"
      Revert "[asm] Remove invalid static cast of character stream"
      Revert "[scanner] Prepare CharacterStreams for specializing scanner and parser by character type"
      
      The original idea behind this work was to avoid copying, converting and
      buffering characters to be scanned by specializing the scanner functions. The
      additional benefit was for scanner functions to have a bigger window over the
      input. Even though we can get a pretty nice speedup from having a larger
      window, in practice this rarely helps. The cost is a larger binary.
      
      Since we can't eagerly convert utf8 to utf16 due to memory overhead, we'd also
      need to have a specialized version of the scanner just for utf8. That's pretty
      complex, and likely won't be better than simply bulk converting and buffering
      utf8 as utf16.
      
      Change-Id: Ic3564683932a0097e3f9f51cd88f62c6ac879dcb
      Reviewed-on: https://chromium-review.googlesource.com/1183190Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Commit-Queue: Toon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55258}
      fcfd995a
  2. 01 Aug, 2018 1 commit
  3. 12 Jul, 2018 1 commit
  4. 25 Sep, 2017 1 commit
  5. 22 Aug, 2017 2 commits
  6. 26 Jul, 2017 1 commit
  7. 25 Jul, 2017 1 commit
  8. 31 May, 2017 1 commit
  9. 30 May, 2017 1 commit
    • Clemens Hammacher's avatar
      [asm] Use ZoneVector instead of std::vector · f6f33f6f
      Clemens Hammacher authored
      This CL replaces the last usages of std::vector in the AsmJsParser by
      ZoneVector. This allows to also measure the memory consumption of these
      vectors, since it is now contained in the zone memory.
      ZoneVectors are reused to avoid accumulating lots of unused memory.
      
      This also saves 2.6% performance (avg over 1000 runs) on my local
      workstation.
      
      R=mstarzinger@chromium.org
      
      Change-Id: I04c96db558d9c362b1494ddd9e975edf2783403c
      Reviewed-on: https://chromium-review.googlesource.com/516985Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45591}
      f6f33f6f
  10. 19 May, 2017 1 commit
  11. 15 May, 2017 1 commit
  12. 05 May, 2017 2 commits
  13. 26 Apr, 2017 2 commits
  14. 25 Apr, 2017 1 commit
    • Michael Starzinger's avatar
      [asm.js] Refactor parser identifier memory management. · c2abd807
      Michael Starzinger authored
      This unifies the memory management of identifier strings passed between
      the scanner, parser and module builder. The following scheme is used:
       - The scanner does not create copies of identifier strings itself, it
         exposes a reference to the current identifier. This reference becomes
         invalid as soon as the scanner advanced.
       - The parser preserves a single copy of each identifier that is stored
         in any data structure. That copy is allocated in the zone, lifetime
         is coupled to that of the zone.
       - The module builder can use all such identifiers by reference, as long
         as its lifetime is also coupled to the same zone.
      
      Note that the module builder still creates redundant copies for some
      identifiers (in order to maintain backwards compatibility with the old
      AST-based parser). This can be fixed once the "old validator" has been
      removed.
      
      R=clemensh@chromium.org
      BUG=v8:6127
      
      Change-Id: I8611d162e87730045a6061d08c3fe841daae8a7d
      Reviewed-on: https://chromium-review.googlesource.com/484439
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44836}
      c2abd807
  15. 21 Apr, 2017 2 commits
  16. 19 Apr, 2017 2 commits
  17. 18 Apr, 2017 1 commit
  18. 13 Apr, 2017 1 commit
    • Michael Starzinger's avatar
      [asm.js] Test and fix "|0" annotation of calls. · f0946038
      Michael Starzinger authored
      This fixes the validation of "|0" annotations of call sites that are
      used to indicate a "signed" return type of functions. We use lookahead
      during call validation and request deferred validation as part of the
      actual OR-expression. Special care has to be taken to get precedence
      levels of all involved operators right.
      
      R=clemensh@chromium.org
      TEST=mjsunit/asm/call-annotation
      BUG=v8:6183
      
      Change-Id: If0586f669e7cee26a13425b0fd9f41098e852d68
      Reviewed-on: https://chromium-review.googlesource.com/475871
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44639}
      f0946038
  19. 05 Apr, 2017 1 commit
  20. 04 Apr, 2017 1 commit
  21. 03 Apr, 2017 1 commit
  22. 28 Mar, 2017 3 commits
    • bradnelson's avatar
      [wasm][asm.js] Fix and enable several asm.js tests with the new parser. · a84da1c3
      bradnelson authored
      Fix a few items broken during review of scanner + parser:
      * Make the scanner retain stale newline state on a rewind (as otherwise it must be able to correctly rewind that too, though it doesn't need it). (Probably should revisit).
      * Change StashCode in the builder skip to the zero case, as it crashes for some reason (added TODO).
      
      Also fix:
      * Drop test based on constant expression evaluation in main parser
      * Support constant defined based on existing constant.
      * Type constants as signed.
      * Added a check that all used functions are defined eventually.
      * Zone allocate strings for simplicity (TODOs to refactor better).
      
      BUG=v8:6090
      BUG=v8:4203
      R=mstarzinger@chromium.org,marja@chromium.org,vogelheim@chromium.org
      
      Review-Url: https://codereview.chromium.org/2771183002
      Cr-Original-Commit-Position: refs/heads/master@{#44200}
      Committed: https://chromium.googlesource.com/v8/v8/+/be0dbdd679b60c31d480d7635e579787a6a218df
      Review-Url: https://codereview.chromium.org/2771183002
      Cr-Commit-Position: refs/heads/master@{#44203}
      a84da1c3
    • bradnelson's avatar
      Revert of [wasm][asm.js] Fix and enable several asm.js tests with the new... · f8973f1c
      bradnelson authored
      Revert of [wasm][asm.js] Fix and enable several asm.js tests with the new parser. (patchset #10 id:180001 of https://codereview.chromium.org/2771183002/ )
      
      Reason for revert:
      Fails on gc-stress.
      
      Original issue's description:
      > [wasm][asm.js] Fix and enable several asm.js tests with the new parser.
      >
      > Fix a few items broken during review of scanner + parser:
      > * Make the scanner retain stale newline state on a rewind (as otherwise it must be able to correctly rewind that too, though it doesn't need it). (Probably should revisit).
      > * Change StashCode in the builder skip to the zero case, as it crashes for some reason (added TODO).
      >
      > Also fix:
      > * Drop test based on constant expression evaluation in main parser
      > * Support constant defined based on existing constant.
      > * Type constants as signed.
      > * Added a check that all used functions are defined eventually.
      > * Zone allocate strings for simplicity (TODOs to refactor better).
      >
      > BUG=v8:6090
      > BUG=v8:4203
      > R=mstarzinger@chromium.org,marja@chromium.org,vogelheim@chromium.org
      >
      > Review-Url: https://codereview.chromium.org/2771183002
      > Cr-Commit-Position: refs/heads/master@{#44200}
      > Committed: https://chromium.googlesource.com/v8/v8/+/be0dbdd679b60c31d480d7635e579787a6a218df
      
      TBR=clemensh@chromium.org,bradnelson@google.com,marja@chromium.org,mstarzinger@chromium.org,vogelheim@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:6090
      
      Review-Url: https://codereview.chromium.org/2782613002
      Cr-Commit-Position: refs/heads/master@{#44201}
      f8973f1c
    • bradnelson's avatar
      [wasm][asm.js] Fix and enable several asm.js tests with the new parser. · be0dbdd6
      bradnelson authored
      Fix a few items broken during review of scanner + parser:
      * Make the scanner retain stale newline state on a rewind (as otherwise it must be able to correctly rewind that too, though it doesn't need it). (Probably should revisit).
      * Change StashCode in the builder skip to the zero case, as it crashes for some reason (added TODO).
      
      Also fix:
      * Drop test based on constant expression evaluation in main parser
      * Support constant defined based on existing constant.
      * Type constants as signed.
      * Added a check that all used functions are defined eventually.
      * Zone allocate strings for simplicity (TODOs to refactor better).
      
      BUG=v8:6090
      BUG=v8:4203
      R=mstarzinger@chromium.org,marja@chromium.org,vogelheim@chromium.org
      
      Review-Url: https://codereview.chromium.org/2771183002
      Cr-Commit-Position: refs/heads/master@{#44200}
      be0dbdd6
  23. 24 Mar, 2017 1 commit
    • bradnelson's avatar
      [wasm][asm.js] Asm.js -> wasm custom parser. · 083a8d72
      bradnelson authored
      Add the --fast-validate-asm option, which directs asm.js code
      to a new parser + validator + wasm code generator,
      which is then compiled using WebAssembly.
      
      This parser takes advantage of asm.js structure to linearly parse
      asm.js code, keeping a scope stack + a few additional tables to track
      varibles.
      
      BUG=v8:6090
      BUG=v8:4203
      
      R=mstarzinger@chromium.org,marja@chromium.org,vogelheim@chromium.org,kschimpf@chromium.org
      
      Review-Url: https://codereview.chromium.org/2757693003
      Cr-Commit-Position: refs/heads/master@{#44084}
      083a8d72