1. 09 Oct, 2018 1 commit
  2. 20 Sep, 2018 1 commit
    • Ross McIlroy's avatar
      [Compile] Refactor CompilerDispatcher for inner function compilation jobs · 80195fc5
      Ross McIlroy authored
      Refactors the CompilerDispatcher to be able to enqueue eager inner functions
      for off-thread compilation during top-level compilation of a script.
      
      Unoptimized compile jobs are simplified to only have two phases - compile
      and finalization. Only finalization requires heap access (and therefore
      needs to be run on the main thread). The change also introduces a requirement
      to register a SFI with a given compile job after that job is posted, this
      is due to the fact that an SFI won't necessarily exist at the point the job
      is posted, but is created later when top-level compile is being finalized.
      Logic in the compile dispatcher is update to deal with the fact that a job
      may not be able to progress if it doesn't yet have an associated SFI
      registered with it.
      
      BUG=v8:8041
      
      Change-Id: I66cccd626136738304a7cab0e501fc65cf342514
      Reviewed-on: https://chromium-review.googlesource.com/1215782
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56088}
      80195fc5
  3. 07 Sep, 2018 2 commits
    • Ross McIlroy's avatar
      [Parser] Split building logic out of ProducedPreParserScopeData. · 83dee31e
      Ross McIlroy authored
      Splits PreParsedScopeDataBuilder out of ProducedPreParserScopeData to make the split between
      building PreParsedScopeData and using already build PreParserScopeData more explicit.
      
      BUG=v8:8041
      
      Change-Id: Iab42cab84c247152c14ac39f3136f985753160ec
      Reviewed-on: https://chromium-review.googlesource.com/1202104
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55718}
      83dee31e
    • Ross McIlroy's avatar
      [Parser] Add support for Zone allocated ConsumedPreParsingScopeData. · 8da9dbbb
      Ross McIlroy authored
      Adds support for zone allocated (off-heap) ConsumedPreParsingScopeData to
      enable worker-thread access to PreParsingScopeData during parallel IIFE
      compile tasks.
      
      In order to avoid code-duplication, a templated
      BaseConsumedPreParsingScopeData is added which implements the logic for
      decoding the bytestream into scope data. Two implementations of this
      base class are instantiated for each of the underlying serialized scope date:
        - ZoneConsumedPreParsedScopeData for exposing ZonePreParsedScopeData
        - OnHeapConsumedPreParsedScopeData for exposing on-heap PreParsedScopeData
      The interface for each of these classes is the ConsumedPreParsingScopeData,
      which exposes the methods required by the parser to deserialize the required
      data.
      
      As a side-cleanup, moved Ucs2CharLength and Utf8LengthHelper implementations
      to cc file so that we don't get a linker error if one of them are unused by
      the cc file including the header.
      
      
      BUG=v8:8041
      
      Change-Id: Id502312d32fe4a9ddb6f5d2d9d3e3a9d30b9b27d
      Reviewed-on: https://chromium-review.googlesource.com/1199462
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55711}
      8da9dbbb
  4. 30 Jul, 2018 1 commit
  5. 18 Jul, 2018 1 commit
  6. 11 Jul, 2018 2 commits
  7. 10 Jul, 2018 2 commits
  8. 06 Jul, 2018 1 commit
    • Sigurd Schneider's avatar
      Revert "[parser] Move some PPSD sanity checks to debug" · b672210f
      Sigurd Schneider authored
      This reverts commit f45045cc.
      
      Reason for revert: <INSERT REASONING HERE>
      
      Original change's description:
      > [parser] Move some PPSD sanity checks to debug
      > 
      > Move some of PreParsedScopeData's santity checks, such as the magic
      > value separating skippable function data from scope data, to be debug
      > only, to save memory.
      > 
      > Start position of inner skippable functions is still kept, because it's
      > too good at catching bugs, but we may want to remove it in the future
      > as well.
      > 
      > Bug: chromium:818642
      > Change-Id: If86ff1b9845e8dd3b015b4e554d0033328b145bf
      > Reviewed-on: https://chromium-review.googlesource.com/1127046
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Marja Hölttä <marja@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#54263}
      
      TBR=marja@chromium.org,leszeks@chromium.org
      
      Change-Id: I15ceedd66d9ecb66cf65f5834d09975b41d3ed27
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:818642
      Reviewed-on: https://chromium-review.googlesource.com/1127859Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54290}
      b672210f
  9. 05 Jul, 2018 1 commit
    • Leszek Swirski's avatar
      [parser] Move some PPSD sanity checks to debug · f45045cc
      Leszek Swirski authored
      Move some of PreParsedScopeData's santity checks, such as the magic
      value separating skippable function data from scope data, to be debug
      only, to save memory.
      
      Start position of inner skippable functions is still kept, because it's
      too good at catching bugs, but we may want to remove it in the future
      as well.
      
      Bug: chromium:818642
      Change-Id: If86ff1b9845e8dd3b015b4e554d0033328b145bf
      Reviewed-on: https://chromium-review.googlesource.com/1127046
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54263}
      f45045cc
  10. 02 Jul, 2018 1 commit
  11. 26 Jun, 2018 1 commit
  12. 30 Apr, 2018 1 commit
  13. 15 Feb, 2018 1 commit
  14. 14 Feb, 2018 1 commit
  15. 02 Dec, 2017 1 commit
    • Mathias Bynens's avatar
      Normalize casing of hexadecimal digits · 822be9b2
      Mathias Bynens authored
      This patch normalizes the casing of hexadecimal digits in escape
      sequences of the form `\xNN` and integer literals of the form
      `0xNNNN`.
      
      Previously, the V8 code base used an inconsistent mixture of uppercase
      and lowercase.
      
      Google’s C++ style guide uses uppercase in its examples:
      https://google.github.io/styleguide/cppguide.html#Non-ASCII_Characters
      
      Moreover, uppercase letters more clearly stand out from the lowercase
      `x` (or `u`) characters at the start, as well as lowercase letters
      elsewhere in strings.
      
      BUG=v8:7109
      TBR=marja@chromium.org,titzer@chromium.org,mtrofin@chromium.org,mstarzinger@chromium.org,rossberg@chromium.org,yangguo@chromium.org,mlippautz@chromium.org
      NOPRESUBMIT=true
      
      Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I790e21c25d96ad5d95c8229724eb45d2aa9e22d6
      Reviewed-on: https://chromium-review.googlesource.com/804294
      Commit-Queue: Mathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49810}
      822be9b2
  16. 07 Nov, 2017 1 commit
  17. 25 Oct, 2017 1 commit
  18. 23 Oct, 2017 2 commits
    • Marja Hölttä's avatar
      Revert "[parser] Skipping inner funcs: Use less memory for variables." · 271e3b10
      Marja Hölttä authored
      This reverts commit 97ead433.
      
      Reason for revert: makes the PreParserScopeAnalysis test much slower.
      
      Original change's description:
      > [parser] Skipping inner funcs: Use less memory for variables.
      > 
      > - Make it possible to store quarter-bytes instead of full bytes.
      > 
      > - Don't store is_used; it can be recovered correctly based on the actual full
      >   parse (when a lazy function is eventually called) and
      >   has_forced_scope_allocation.
      > 
      > - With the is_used change, the old testing approach (which compared a scope for
      >   which we didn't do scope allocation to the baseline) no longer made
      >   sense. Replaced it with a new testing approach, which is also closer to the
      >   actual usage.
      > 
      > BUG=v8:5516
      > 
      > Change-Id: I02bac24e482126689dcdbabe8b3a04977be29b0c
      > Reviewed-on: https://chromium-review.googlesource.com/725422
      > Commit-Queue: Marja Hölttä <marja@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#48828}
      
      TBR=marja@chromium.org,verwaest@chromium.org
      
      Change-Id: I8cb87bcd55462b1cef4444dabb5cbfa2ecb24c7c
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:5516
      Reviewed-on: https://chromium-review.googlesource.com/732878Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48829}
      271e3b10
    • Marja Hölttä's avatar
      [parser] Skipping inner funcs: Use less memory for variables. · 97ead433
      Marja Hölttä authored
      - Make it possible to store quarter-bytes instead of full bytes.
      
      - Don't store is_used; it can be recovered correctly based on the actual full
        parse (when a lazy function is eventually called) and
        has_forced_scope_allocation.
      
      - With the is_used change, the old testing approach (which compared a scope for
        which we didn't do scope allocation to the baseline) no longer made
        sense. Replaced it with a new testing approach, which is also closer to the
        actual usage.
      
      BUG=v8:5516
      
      Change-Id: I02bac24e482126689dcdbabe8b3a04977be29b0c
      Reviewed-on: https://chromium-review.googlesource.com/725422
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48828}
      97ead433
  19. 19 Oct, 2017 1 commit
  20. 17 Oct, 2017 1 commit
    • Adam Klein's avatar
      [parser] Skipping inner funcs: accurately record NeedsHomeObject · 94a71d7c
      Adam Klein authored
      Inner functions which called eval, and were the kind of functions
      that can use `super`, were erroneously not marked as "uses_super_property",
      leading to downstream crashes when the runtime tried to load the
      [[HomeObject]] from them.
      
      This patch eliminates the public Scope::uses_super_property()
      API and ensures that callers always call Scope::NeedsHomeObject()
      instead.
      
      This is a minimal fix designed for easy merging; it's likely that
      in the long run we should remove most mentions of "uses super property"
      and replace them with "needs home object" for clarity.
      
      Bug: v8:5516, chromium:774994
      Change-Id: Id269dd33e35bd40f6b59a3d3e19330687afa64f8
      Reviewed-on: https://chromium-review.googlesource.com/721879Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Commit-Queue: Adam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48619}
      94a71d7c
  21. 16 Oct, 2017 2 commits
  22. 12 Oct, 2017 1 commit
  23. 29 Sep, 2017 1 commit
    • Marja Hölttä's avatar
      [parser] Skipping inner funcs: Make the data on heap smaller. · a0258063
      Marja Hölttä authored
      We were unnecessarily storing everything as uint32_t, even though many items in
      the preparsed scope data can be stored as uint8_t. This CL also adds an
      (internal) API which abstracts away the actual data storing, so the backing
      store can be made even more efficient (e.g., use only 1-3 bytes for some
      uint32_t values, if they fit) without affecting other parts of the code.
      
      BUG=v8:5516,chromium:762492
      
      Change-Id: I7cd4d91dc11f87f8aec9c7584044a6f2a59b73ba
      Reviewed-on: https://chromium-review.googlesource.com/684182
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48231}
      a0258063
  24. 21 Sep, 2017 1 commit
  25. 16 Aug, 2017 1 commit
  26. 09 Aug, 2017 1 commit
    • Adam Klein's avatar
      [scopes] Clarify and narrow when scopes care about an eval() call · 1c9de0b2
      Adam Klein authored
      There are two reasons for Scopes to need information about eval calls
      inside them:
      
        - Eval in a scope, or any of its inner scopes, turns off a bunch of
          scope analysis optimizations (e.g., all variables have to be treated
          as "used" and context-allocated).
        - Eval in a sloppy declaration scope means allows runtime addition
          of var declarations.
      
      This patch aims to make the code better-reflect this reality.
      It's meant as a pure cleanup, with no expected change in behavior.
      
      Change-Id: I744c5051bb7a90b11420930e9596e5d6c35eb440
      Reviewed-on: https://chromium-review.googlesource.com/602848
      Commit-Queue: Adam Klein <adamk@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47257}
      1c9de0b2
  27. 04 Aug, 2017 1 commit
    • Marja Hölttä's avatar
      [parser] Skipping inner funcs: implement a bailout. · e7a46253
      Marja Hölttä authored
      In some cases, PreParser cannot replicate the Scope structure created by
      Parser. It happens esp. with arrow function parameters, since the relevant
      information is already lost by the time we figure out it's an arrow function.
      
      In these cases, PreParser should bail out of trying to create data for skipping
      inner functions.
      
      Implementation notes:
      
      - The arrow function case is more fundamental; the non-arrow case could be
        hacked together somehow if we implemented tracking is_simple for each param
        separately; but now that it's possible to bail out consistently from both
        cases, I don't think the is_simple complication is worth it.
      
      - The added mjsunit test cases are based on the test262 test cases which exposed
        the problem.
      
      - cctest/preparser/PreParserScopeAnalysis was exercising similar cases, but the
        problem didn't show up because the function parameters didn't contain
        skippable functions. Those test cases have been repurposed for testing the
        bailout.
      
      - Extra precaution: the bailout tests are in a separate file, to guard from the
        bug that a bailout case results in bailing out of *all* data creation, which
        would make all skipping tests in the same file useless.
      
      BUG=v8:5516
      
      Change-Id: I4324749a5ec602fa5d7dc27647ade0284a6842fe
      Reviewed-on: https://chromium-review.googlesource.com/599849Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47170}
      e7a46253
  28. 03 Jul, 2017 1 commit
  29. 30 Jun, 2017 1 commit
  30. 22 Jun, 2017 3 commits
  31. 31 May, 2017 1 commit
    • Marja Hölttä's avatar
      [parser] Skipping inner funcs: make more functions skippable. · 06f05ec2
      Marja Hölttä authored
      - Enable aggressive lazy inner funcs (make non-declaration funcs lazy, ie let f =
        function() { ... } when --experimental-preparser-scope-analysis is on.
      - Turn on variable tracking for lazy top level functions: this makes their inner
        functions skippable.
      - Test fix for an testing bug uncovered by this work: when restoring the data
        for the relevant scope, don't assume it's the outermost scope for which we
        have data.
      - Fix: if we abort lazy parsing a function, we shouldn't produce any data for
        it.
      
      BUG=v8:5516
      
      Change-Id: I0606fbabb5886dc57dbb53ab5f3fb894ff5d032e
      Reviewed-on: https://chromium-review.googlesource.com/518165Reviewed-by: 's avatarDaniel Vogelheim <vogelheim@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45615}
      06f05ec2
  32. 29 May, 2017 1 commit
  33. 17 May, 2017 1 commit