1. 09 May, 2022 1 commit
  2. 03 May, 2022 1 commit
  3. 19 Apr, 2022 1 commit
  4. 10 Dec, 2021 1 commit
    • Leszek Swirski's avatar
      [parser] Split AstRawString and Parser zones · ef0b2aab
      Leszek Swirski authored
      This allows us to reuse AstValueFactory's string table across multiple
      parsers, while still releasing memory after each individual parse.
      
      This is mild overkill for all the single parses that don't reuse
      AstValueFactories, but there at least the AstRawStrings now end up
      grouped together in memory, so that might have mild cache benefits.
      
      Change-Id: I0b378760b601fa4ec6559a0dca5d7ed6f895e992
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3322764Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78338}
      ef0b2aab
  5. 08 Dec, 2021 1 commit
    • Leszek Swirski's avatar
      [compiler] Introduce ReusableUnoptimizedCompileState · b3e1eb0c
      Leszek Swirski authored
      Introduce a ReusableUnoptimizedCompileState class, passed to ParseInfo,
      which stores a couple of pointers and most importantly the Zone and
      AstValueFactory of the parse. This allows the Zone and AstValueFactory
      to be reused across multiple parses, rather than re-initialising
      per-Parse.
      
      With this, we can amend the LazyCompileDispatcher to initialise one
      LocalIsolate, Zone and AstValueFactory per background thread loop,
      rather than one per compile task, which allows us to reduce per-task
      costs and re-use the AstValueFactory's string table and previous String
      internalizations.
      
      Change-Id: Ia0e29c4e31fbe29af57674ebb10916865d38b2ce
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3313106Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78289}
      b3e1eb0c
  6. 06 Dec, 2021 1 commit
  7. 03 Dec, 2021 1 commit
    • Leszek Swirski's avatar
      [compiler] Create ParseInfo on BG thread · a66c7a38
      Leszek Swirski authored
      Rather than creating a ParseInfo when creating a BackgroundCompileTask
      (and passing ownership across to the BG thread which deallocates it),
      create one when running it.
      
      This allows the ParseInfo Zone to be both allocated and deallocated on
      the same thread, which will improve its allocator friendliness.
      
      As a side-effect, we now use the on-heap PreparseData from the
      SharedFunctionInfo, rather than cloning the in-Zone PreparseData. This
      means that we don't have to copy the PreparseData across Zones, but we
      do need to Unpark the LocalHeap when accessing preparse data.
      
      Change-Id: I16d976c1ad54c1090180f2936f40a23a6dbb5904
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312483Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78228}
      a66c7a38
  8. 01 Dec, 2021 1 commit
    • Leszek Swirski's avatar
      [compiler-dispatcher] Enqueue tasks for non-eager inner funcs · 5ab1ec1e
      Leszek Swirski authored
      Add suppose for compiling non-eager, non-top-level inner functions in
      parallel, using the compiler dispatcher. This behaviour can be enabled
      with --parallel-compile-tasks-for-lazy.
      
      There are a couple of consequences:
      
        * To support this we need support for off-thread ScopeInfo
          deserialization, so this adds that too.
        * The previous --parallel-compile-tasks flag is renamed to the more
          descriptive --parallel-compile-tasks-for-eager-toplevel.
        * Both parallel-compile-tasks flags are moved onto
          UnoptimizedCompileFlags so that they can be enabled/disabled on a
          per-compile basis (e.g. enabled for streaming, disabled for
          re-parsing).
        * asm.js compilations can now happen without an active Context (in
          the compiler dispatcher's idle finalization) so we can't get a
          ContextId for metric reporting; we'd need to somehow fix this if we
          wanted asm.js UKM but for now it's probably fine.
        * Took the opportunity to clean up some of the "can preparse" logic in
          the parser.
      
      Change-Id: I20b1ec6a6bacfe268808edc8d812b92370c5840d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3281924
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarEmanuel Ziegler <ecmziegler@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#78183}
      5ab1ec1e
  9. 30 Nov, 2021 2 commits
  10. 04 Nov, 2021 1 commit
    • Leszek Swirski's avatar
      [compiler-dispatcher] Move to full SFI keying · 14097e62
      Leszek Swirski authored
      Remove the concept of JobId from LazyCompileDispatcher, and make SFIs
      the canonical id for these jobs.
      
      This has several consequences:
      
        * We no longer split enqueing a job and registering a SFI with that
          job. We did this previously because we could not allocate SFIs in
          the Parser -- now with LocalHeap we can, so we do.
        * We remove the separate Job vector, and make the SFI IdentityMap
          hold pointers to Jobs directly. This requires a small amount of
          extra care to deallocate Jobs when removing them from the map,
          but it means not having to allocate new global handles for jobs.
        * The SFI is passed into the BackgroundCompileTask instead of the
          script, so our task finalization doesn't need the SFI anymore.
        * We no longer need to iterate ParallelTasks after compiling (to
          register SFIs), so we can get rid of ParallelTasks entirely and
          access the dispatcher directly from the parser.
      
      There are a few drive-bys since we're touching this code:
      
        * Jobs are move to have a "state" variable rather than a collection
          of bools, for stricter DCHECKing.
        * There's no longer a set of "currently running" jobs, since this
          was only used to check if a job is running, we can instead inspect
          the job's state directly.
        * s/LazyCompilerDispatcher/LazyCompileDispatcher/g
      
      Change-Id: I85e4bd6db108f5e8e7fe2e919c548ce45796dd50
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3259647
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77712}
      14097e62
  11. 03 Nov, 2021 1 commit
    • Leszek Swirski's avatar
      Reland "[off-thread] Allow off-thread top-level IIFE finalization" · 548c40ed
      Leszek Swirski authored
      This is a reland of 35a6eeec
      
      Reland fixes:
        * Add a SharedFunctionInfo::CopyFrom to encapsulate updating the SFI
          from the placeholder. This now includes copying scope_info (which
          wasn't included in the original CL and caused some of the issues)
        * Make sure that LocalHandleScope is initialised only inside of
          UnparkedScope (fixed TSAN issues)
        * Clean-up: Don't add `script_` to ParseInfo, but instead pass it
          separately to Parser. Eventually we'd ideally get rid of ParseInfo
          entirely (splitting it into input and output) so let's not add more
          fields to it. Reverts changing CreateScript to InitializeScript.
      
      Original change's description:
      > [off-thread] Allow off-thread top-level IIFE finalization
      >
      > Allow off-thread finalization for parallel compile tasks (i.e. for top-
      > level IIFEs).
      >
      > This allows us to merge the code paths in BackgroundCompileTask, and
      > re-enable the compiler dispatcher tests under the off-thread
      > finalization flag. Indeed, we can simplify further and get rid of that
      > flag entirely (it has been on-by-default for several releases now).
      >
      > Change-Id: I54f361997d651667fa813ec09790a6aab4d26774
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3226780
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#77615}
      
      Change-Id: If1a5b14900aa6753561e34e972a293be0be9a07d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3256692
      Commit-Queue: Toon Verwaest <verwaest@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77676}
      548c40ed
  12. 01 Nov, 2021 1 commit
  13. 29 Oct, 2021 2 commits
    • Leszek Swirski's avatar
      [compiler-dispatcher] Port to Jobs API · 15b1ce39
      Leszek Swirski authored
      Port the CompilerDispatcher to use the Jobs API, instead of its own
      hand-rolled worker management.
      
      This required some re-thinking of how testing is handled, since the
      tests want to be able to
      
        a) Defer calls to PostTask/Job, to actuall post the jobs later. This
           was easy enough with PostTask, since we could simply store the task
           in a list and no-op, but PostJob has to return a JobHandle. The
           tests now have a DelayedJobHandleWrapper, which defers all method
           calls on itself, and because of all the unique_ptrs, there's also
           now a SharedJobHandleWrapper.
      
        b) Wait until tasks/jobs complete. Returning from a Task meant that
           the task had completed, but this isn't necessarily the case with
           JobTasks; e.g. a job might be asked to yield. This patch hacks
           around this by Posting and Joining a non-owning copy of the
           requested JobTask, and then re-posting it once Join returns.
      
      Change-Id: If867b4122af52758ffabcfb78a6701f0f95d896d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2563664
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77618}
      15b1ce39
    • Leszek Swirski's avatar
      [off-thread] Allow off-thread top-level IIFE finalization · 35a6eeec
      Leszek Swirski authored
      Allow off-thread finalization for parallel compile tasks (i.e. for top-
      level IIFEs).
      
      This allows us to merge the code paths in BackgroundCompileTask, and
      re-enable the compiler dispatcher tests under the off-thread
      finalization flag. Indeed, we can simplify further and get rid of that
      flag entirely (it has been on-by-default for several releases now).
      
      Change-Id: I54f361997d651667fa813ec09790a6aab4d26774
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3226780Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#77615}
      35a6eeec
  14. 28 Oct, 2021 1 commit
  15. 06 Aug, 2021 1 commit
  16. 01 Jul, 2021 1 commit
  17. 21 May, 2021 1 commit
  18. 26 Apr, 2021 1 commit
  19. 15 Mar, 2021 1 commit
  20. 11 Mar, 2021 4 commits
    • Shu-yu Guo's avatar
      Remove shipped feature flags · 33c9fca3
      Shu-yu Guo authored
      Removes
      
      --harmony-string-replaceall (shipped since 8.5)
      --harmony-logical-assignment (shipped since 8.5)
      --harmony-atomics-waitasync (shipped since 8.7)
      
      Bug: v8:9801,v8:10372,v8:10239
      Change-Id: Ifb8db93948a067e75da5e581603acb916b91342a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2747201
      Commit-Queue: Shu-yu Guo <syg@chromium.org>
      Auto-Submit: Shu-yu Guo <syg@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73356}
      33c9fca3
    • Clemens Backes's avatar
      Reland "[no-wasm] Exclude src/wasm from compilation" · 3f9ff062
      Clemens Backes authored
      This is a reland of 80f5dfda. A condition
      in pipeline.cc was inverted, which lead to a CSA verifier error.
      
      Original change's description:
      > [no-wasm] Exclude src/wasm from compilation
      >
      > This is the biggest chunk, including
      > - all of src/wasm,
      > - torque file for wasm objects,
      > - torque file for wasm builtins,
      > - wasm builtins,
      > - wasm runtime functions,
      > - int64 lowering,
      > - simd scala lowering,
      > - WasmGraphBuilder (TF graph construction for wasm),
      > - wasm frame types,
      > - wasm interrupts,
      > - the JSWasmCall opcode,
      > - wasm backing store allocation.
      >
      > Those components are all recursively entangled, so I found no way to
      > split this change up further.
      >
      > Some includes that were recursively included by wasm headers needed to
      > be added explicitly now.
      >
      > backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
      > because it only tests wasm backing stores. This file is excluded from
      > no-wasm builds then.
      >
      > R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
      >
      > Bug: v8:11238
      > Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73344}
      
      TBR=jgruber@chromium.org
      
      Bug: v8:11238
      Change-Id: I20bd2847a59c68738b5a336cd42582b7b1499585
      Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      Cq-Include-Trybots: luci.v8.try:v8_linux_verify_csa_rel_ng
      Cq-Include-Trybots: luci.v8.try:v8_linux64_verify_csa_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752867Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73348}
      3f9ff062
    • Clemens Backes's avatar
      Revert "[no-wasm] Exclude src/wasm from compilation" · 92bc3d38
      Clemens Backes authored
      This reverts commit 80f5dfda.
      
      Reason for revert: Fails CSA verification: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20verify%20csa/21766/overview
      
      Original change's description:
      > [no-wasm] Exclude src/wasm from compilation
      >
      > This is the biggest chunk, including
      > - all of src/wasm,
      > - torque file for wasm objects,
      > - torque file for wasm builtins,
      > - wasm builtins,
      > - wasm runtime functions,
      > - int64 lowering,
      > - simd scala lowering,
      > - WasmGraphBuilder (TF graph construction for wasm),
      > - wasm frame types,
      > - wasm interrupts,
      > - the JSWasmCall opcode,
      > - wasm backing store allocation.
      >
      > Those components are all recursively entangled, so I found no way to
      > split this change up further.
      >
      > Some includes that were recursively included by wasm headers needed to
      > be added explicitly now.
      >
      > backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
      > because it only tests wasm backing stores. This file is excluded from
      > no-wasm builds then.
      >
      > R=​jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
      >
      > Bug: v8:11238
      > Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
      > Commit-Queue: Clemens Backes <clemensb@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#73344}
      
      Bug: v8:11238
      Change-Id: I93672002c1faa36bb0bb5b4a9cc2032ee2ccd814
      Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752866
      Auto-Submit: Clemens Backes <clemensb@chromium.org>
      Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Cr-Commit-Position: refs/heads/master@{#73346}
      92bc3d38
    • Clemens Backes's avatar
      [no-wasm] Exclude src/wasm from compilation · 80f5dfda
      Clemens Backes authored
      This is the biggest chunk, including
      - all of src/wasm,
      - torque file for wasm objects,
      - torque file for wasm builtins,
      - wasm builtins,
      - wasm runtime functions,
      - int64 lowering,
      - simd scala lowering,
      - WasmGraphBuilder (TF graph construction for wasm),
      - wasm frame types,
      - wasm interrupts,
      - the JSWasmCall opcode,
      - wasm backing store allocation.
      
      Those components are all recursively entangled, so I found no way to
      split this change up further.
      
      Some includes that were recursively included by wasm headers needed to
      be added explicitly now.
      
      backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
      because it only tests wasm backing stores. This file is excluded from
      no-wasm builds then.
      
      R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
      
      Bug: v8:11238
      Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
      Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73344}
      80f5dfda
  21. 23 Nov, 2020 1 commit
  22. 12 Nov, 2020 1 commit
  23. 03 Nov, 2020 2 commits
  24. 14 Aug, 2020 1 commit
    • Leszek Swirski's avatar
      [offthread] Change OffThreadIsolate to LocalIsolate · f1589bbe
      Leszek Swirski authored
      This patch introduces a new LocalIsolate and LocalFactory, which use
      LocalHeap and replace OffThreadIsolate and OffThreadFactory. This allows
      us to remove those classes, as well as the related OffThreadSpace,
      OffThreadLargeObjectSpace, OffThreadHeap, and OffThreadTransferHandle.
      OffThreadLogger becomes LocalLogger.
      
      LocalHeap behaves more like Heap than OffThreadHeap did, so this allows
      us to additionally remove the concept of "Finish" and "Publish" that the
      OffThreadIsolate had, and allows us to internalize strings directly with
      the newly-concurrent string table (where the implementation can now move
      to FactoryBase).
      
      This patch also removes the off-thread support from the deserializer
      entirely, as well as removing the LocalIsolateWrapper which allowed
      run-time distinction between Isolate and OffThreadIsolate. LocalHeap
      doesn't support the reservation model used by the deserializer, and we
      will likely move the deserializer to use LocalIsolate unconditionally
      once we figure out the details of how to do this.
      
      Bug: chromium:1011762
      
      Change-Id: I1a1a0a72952b19a8a4c167c11a863c153a1252fc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2315990
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69397}
      f1589bbe
  25. 28 Jul, 2020 1 commit
  26. 13 Jul, 2020 1 commit
  27. 24 Apr, 2020 2 commits
    • Leszek Swirski's avatar
      [offthread] Move line-end init to FinalizeScriptCompilation · 9f43850f
      Leszek Swirski authored
      Moves the Script line-end initialization for profiling out of
      CreateScript and into FinalizeScriptCompilation. This ensures that
      scripts created off-thread still get line-ends when necessary.
      
      Bug: chormium:1011762
      Change-Id: If16ad17b2b3ec96908420107bd5f9161eab9492f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122020
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67363}
      9f43850f
    • Leszek Swirski's avatar
      Reland "[offthread] Move stress-background-compile to compiler.cc" · 471b2001
      Leszek Swirski authored
      This is a reland of a441cbfb
      
      Disabling cctest/test-compiler/DeepEagerCompilationPeakMemory in stress
      mode since allocation is no longer deterministic.
      
      Original change's description:
      > [offthread] Move stress-background-compile to compiler.cc
      >
      > Make --stress-background-compile a V8 flag rather than a d8 flag, so
      > that it also tests unittests/cctests.
      >
      > Now, with this flag, every top-level script compile (that fulfills a
      > couple of restrictions) will be both main-thread and background-thread
      > compiled, taking the result of the background compile. In the future,
      > we'll probably want to verify that the two results are equivalent.
      >
      > One of the necessary changes to allow tests to pass was to introduce a
      > concept of a "temporary" script (with a temporary script id), which
      > doesn't get added to the script list. This is to avoid the main-thread
      > compile part of the stress-test having a debugger-visible side-effect,
      > e.g. in tests that enumerate scripts. We can't just create new ids for
      > such scripts, as then script-id expectation files no longer match.
      >
      > Bug: chromium:1011762
      > Change-Id: I500bbf2cabea762e69aca3dbae247daae71192cb
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120541
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#67332}
      
      TBR=rmcilroy@chromium.org
      
      Bug: chromium:1011762
      Change-Id: I5f9f0eb71caa4829e72b4a6d2824cbebd3698bd5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2162876Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67356}
      471b2001
  28. 23 Apr, 2020 4 commits
    • Bill Budge's avatar
      Revert "[offthread] Move stress-background-compile to compiler.cc" · 5f040f9b
      Bill Budge authored
      This reverts commit a441cbfb.
      
      Reason for revert: causes DeepEagerCompilationPeakMemory to fail.
      
      https://ci.chromium.org/p/v8/builders/ci/V8%20Linux/36681
      
      Original change's description:
      > [offthread] Move stress-background-compile to compiler.cc
      > 
      > Make --stress-background-compile a V8 flag rather than a d8 flag, so
      > that it also tests unittests/cctests.
      > 
      > Now, with this flag, every top-level script compile (that fulfills a
      > couple of restrictions) will be both main-thread and background-thread
      > compiled, taking the result of the background compile. In the future,
      > we'll probably want to verify that the two results are equivalent.
      > 
      > One of the necessary changes to allow tests to pass was to introduce a
      > concept of a "temporary" script (with a temporary script id), which
      > doesn't get added to the script list. This is to avoid the main-thread
      > compile part of the stress-test having a debugger-visible side-effect,
      > e.g. in tests that enumerate scripts. We can't just create new ids for
      > such scripts, as then script-id expectation files no longer match.
      > 
      > Bug: chromium:1011762
      > Change-Id: I500bbf2cabea762e69aca3dbae247daae71192cb
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120541
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#67332}
      
      TBR=rmcilroy@chromium.org,leszeks@chromium.org
      
      Change-Id: I8716b332b07fe4f394b5a32c986bbe652325582d
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:1011762
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2163143Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67347}
      5f040f9b
    • Leszek Swirski's avatar
      [offthread] Move stress-background-compile to compiler.cc · a441cbfb
      Leszek Swirski authored
      Make --stress-background-compile a V8 flag rather than a d8 flag, so
      that it also tests unittests/cctests.
      
      Now, with this flag, every top-level script compile (that fulfills a
      couple of restrictions) will be both main-thread and background-thread
      compiled, taking the result of the background compile. In the future,
      we'll probably want to verify that the two results are equivalent.
      
      One of the necessary changes to allow tests to pass was to introduce a
      concept of a "temporary" script (with a temporary script id), which
      doesn't get added to the script list. This is to avoid the main-thread
      compile part of the stress-test having a debugger-visible side-effect,
      e.g. in tests that enumerate scripts. We can't just create new ids for
      such scripts, as then script-id expectation files no longer match.
      
      Bug: chromium:1011762
      Change-Id: I500bbf2cabea762e69aca3dbae247daae71192cb
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2120541
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67332}
      a441cbfb
    • Gus Caplan's avatar
      Implement logical assignment · b151d8db
      Gus Caplan authored
      https://tc39.es/proposal-logical-assignment/
      
      Bug: v8:10372
      Change-Id: I538d54af6b4b24d450d1398c74f76dd57fdb0147
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2158119Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67330}
      b151d8db
    • Leszek Swirski's avatar
      [compile] Add an UnoptimizedCompileState class · 6458a529
      Leszek Swirski authored
      Move the persistent compilation state and Isolate inputs (such as the
      allocator, shared AST constants, hash seed, logger, etc.) which survives
      across both parse and compile, out of ParseInfo and into a new
      UnoptimizedCompileState class. Also add UnoptimizedCompilePerThreadState
      for per-thread state such as stack limit and RCS.
      
      In particular, this new state survives the ParseInfo being destructed,
      which means it is available after off-thread finalization. This allows a
      followup to access the PendingCompilationErrorHandler after finalization
      and report errors on merge.
      
      Bug: v8:10314
      Change-Id: Ia186bc0f267c704efd771aa1895f50a4525a8364
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2105636
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67329}
      6458a529
  29. 22 Apr, 2020 1 commit
    • Leszek Swirski's avatar
      Reland^5 "[parser] Introduce UnoptimizedCompileFlags" · a3228bfc
      Leszek Swirski authored
      This is a reland of e1b93a4f
      which was a reland of 313d4844
      which was a reland of 0a59e0cb
      which was a reland of 146f5375
      which was a reland of d91679bf
      
      Give up on using C++ bitfields, go back to having base::BitField and
      getters/setters.
      
      Original change's description:
      > [parser] Introduce UnoptimizedCompileFlags
      >
      > UnoptimizedCompileFlags defines the input flags shared between parse and
      > compile (currently parse-only). It is set initially with some values, and
      > is immutable after being passed to ParseInfo (ParseInfo still has getters
      > for the fields, but no setters).
      >
      > Since a few of the existing flags were output flags, ParseInfo now has a
      > new output_flags field, which will eventually migrate to a ParseOutputs
      > structure.
      >
      > Bug: v8:10314
      > Change-Id: If3890a5fad883bca80a97bf9dfe44d91797dc286
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2096580
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66782}
      
      TBR=ulan@chromium.org,szuend@chromium.org
      
      Bug: v8:10314
      Change-Id: I54bcd107a0e85cf1a2ddeef0759100547eb65652
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157378Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67309}
      a3228bfc
  30. 21 Apr, 2020 1 commit
    • Leszek Swirski's avatar
      Revert "Reland^4 "[parser] Introduce UnoptimizedCompileFlags"" · 33ea5e55
      Leszek Swirski authored
      This reverts commit e1b93a4f.
      
      Reason for revert: MSVC failing https://ci.chromium.org/p/v8/builders/ci/V8%20Win64%20-%20msvc/13274
      
      Original change's description:
      > Reland^4 "[parser] Introduce UnoptimizedCompileFlags"
      > 
      > This is a reland of 313d4844
      > which was a reland of 0a59e0cb
      > which was a reland of 146f5375
      > which was a reland of d91679bf
      > 
      > Manually zero out flags with memset, since GCC appears not to initialize
      > the bitfield values to zero even with a default constructor.
      > 
      > Original change's description:
      > > [parser] Introduce UnoptimizedCompileFlags
      > >
      > > UnoptimizedCompileFlags defines the input flags shared between parse and
      > > compile (currently parse-only). It is set initially with some values, and
      > > is immutable after being passed to ParseInfo (ParseInfo still has getters
      > > for the fields, but no setters).
      > >
      > > Since a few of the existing flags were output flags, ParseInfo now has a
      > > new output_flags field, which will eventually migrate to a ParseOutputs
      > > structure.
      > >
      > > Bug: v8:10314
      > > Change-Id: If3890a5fad883bca80a97bf9dfe44d91797dc286
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2096580
      > > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#66782}
      > 
      > TBR=ulan@chromium.org,szuend@chromium.org,rmcilroy@chromium.org
      > 
      > Bug: v8:10314
      > Change-Id: I23bd6f9f14e9d0bbdde91aad46be1a646fd9647d
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157372
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#67271}
      
      TBR=ulan@chromium.org,rmcilroy@chromium.org,leszeks@chromium.org,szuend@chromium.org
      
      Change-Id: I0f41e847d4edae67e131cc6d0f782137ab73bac2
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:10314
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157377Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67275}
      33ea5e55