1. 11 Mar, 2021 1 commit
  2. 20 Jan, 2021 1 commit
    • Jakob Gruber's avatar
      [compiler] Rename type BailoutId to BytecodeOffset · 727d22be
      Jakob Gruber authored
      This reflects the actual contents of the type, which is an offset into
      the bytecode (or certain marker values). Historically, in the days of
      FCG the bailout id used to refer to node ids - this is why certain
      tracing output still calls the bailout id 'node id' and 'ast id'.
      These spots will be fixed in a follow-up CL.
      
      This change is mechanical:
      
       git grep -l BailoutId | while read f; do \
        sed -i 's/BailoutId/BytecodeOffset/g' $f; done
      
      With a manual component of updating the DeoptimizationData method
      name from 'BytecodeOffset' to 'GetBytecodeOffset'.
      
      Bug: v8:11332
      Change-Id: I956b947a480bf52263159c0eb1e895360bcbe6d2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639754
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72189}
      727d22be
  3. 30 Nov, 2020 1 commit
  4. 17 Aug, 2020 1 commit
  5. 28 Nov, 2019 1 commit
    • Michael Starzinger's avatar
      [wasm] Remove obsolete {Builtins::IsWasmRuntimeStub}. · 5d272cf8
      Michael Starzinger authored
      The last use of the predicate in question was to switch builtins that
      implement WebAssembly runtime stubs to use hard aborts instead of normal
      aborts like other builtins. This is no longer needed since the builtins
      in question are embedded and no longer copied into WebAssembly modules.
      
      This also allows to move the {WASM_RUNTIME_STUB_LIST} macro out of the
      builtins-defintions.h file and into the wasm-code-manager.h file.
      
      R=clemensb@chromium.org
      BUG=v8:10021
      
      Change-Id: Ib42d3731fc92df378cfce39d39e7fbdbbf722937
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1940266
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65238}
      5d272cf8
  6. 06 Nov, 2019 1 commit
  7. 04 Nov, 2019 1 commit
    • Dan Elphick's avatar
      Reland "Reland: [builtins] Move non-JS linkage builtins code objects into RO_SPACE" · 352bbb12
      Dan Elphick authored
      This is a reland of 855591a5
      
      Fixes break in builds that verify ReadOnlyHeap by relaxing the requirement for
      Code objects to be in CODE_SPACE in PagedSpaceObjectIterator::FromCurrentPage.
      
      Original change's description:
      > Reland: [builtins] Move non-JS linkage builtins code objects into RO_SPACE
      >
      > Reland of https://chromium-review.googlesource.com/c/v8/v8/+/1795358.
      >
      > [builtins] Move non-JS linkage builtins code objects into RO_SPACE
      >
      > Creates an allow-list of builtins that can still go in code_space
      > including all TFJ builtins and a small manual list that should be pared
      > down in the future.
      >
      > For builtins that go in RO_SPACE a Code object is created that contains an
      > immediate trap instruction. Generally these Code objects are still no
      > smaller than CODE_SPACE Code objects because of the Code object alignment
      > requirements. This will hopefully be addressed in a follow-up CL either by
      > relaxing them or removing the instruction stream completely.
      >
      > In the snapshot, this reduces code_space from ~152k to ~40k (-112k) and
      > increases by the same amount.
      >
      > Change-Id: I76661c35c7ea5866c1fb16e87e87122b3e3ca0ce
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893336
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#64700}
      
      Change-Id: I4eeb7dab3027b42fa58c5dfb2bad9873e9fff250
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1893192
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64728}
      352bbb12
  8. 31 Oct, 2019 3 commits
  9. 22 Oct, 2019 1 commit
  10. 18 Oct, 2019 2 commits
    • Sathya Gunasekaran's avatar
      Revert "[builtins] Move non-JS linkage builtins code objects into RO_SPACE" · f1ebde88
      Sathya Gunasekaran authored
      This reverts commit 83f8464f.
      
      Reason for revert: speculative revert for blink linux failure
      https://ci.chromium.org/p/v8/builders/ci/V8%20Blink%20Linux/1272
      
      Original change's description:
      > [builtins] Move non-JS linkage builtins code objects into RO_SPACE
      > 
      > Creates an allow-list of builtins that can still go in code_space
      > including all TFJ builtins and a small manual list that should be pared
      > down in the future.
      > 
      > For builtins that go in RO_SPACE a Code object is created that contains
      > no code at all (shrinking its size from 96 bytes to 64 bytes on x64),
      > but is there to allow the runtime to continue to work since it expects
      > a Code object.
      > 
      > This reduces code_space from ~152k to ~40k (-112k) and increases
      > read_only_space from 33k to 108k (+75k) in the snapshot.
      > 
      > Bug: v8:7464, v8:9821, v8:9338, v8:8127
      > Change-Id: Icc8bfc722bb267a2bcc17e2f1e27bef7f02f2376
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1795358
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#64377}
      
      TBR=mstarzinger@chromium.org,jgruber@chromium.org,delphick@chromium.org
      
      Change-Id: I4cf38e9370280acdd2de718ca527776ebc509003
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:7464, v8:9821, v8:9338, v8:8127
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1868621Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
      Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64383}
      f1ebde88
    • Dan Elphick's avatar
      [builtins] Move non-JS linkage builtins code objects into RO_SPACE · 83f8464f
      Dan Elphick authored
      Creates an allow-list of builtins that can still go in code_space
      including all TFJ builtins and a small manual list that should be pared
      down in the future.
      
      For builtins that go in RO_SPACE a Code object is created that contains
      no code at all (shrinking its size from 96 bytes to 64 bytes on x64),
      but is there to allow the runtime to continue to work since it expects
      a Code object.
      
      This reduces code_space from ~152k to ~40k (-112k) and increases
      read_only_space from 33k to 108k (+75k) in the snapshot.
      
      Bug: v8:7464, v8:9821, v8:9338, v8:8127
      Change-Id: Icc8bfc722bb267a2bcc17e2f1e27bef7f02f2376
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1795358
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64377}
      83f8464f
  11. 20 Aug, 2019 1 commit
    • Jakob Gruber's avatar
      [deoptimizer] Extract frame layout calculation into helper classes · 81642fa6
      Jakob Gruber authored
      The deoptimizer calculates frame layout based on the translation's
      `height` field, together with additional data (e.g.: are we looking at
      the topmost frame? what kind of deopt are we in?). The result is the
      final deoptimized frame size in bytes, together with a bunch of
      intermediate results such as the variable frame size (= without the
      fixed-size portion).
      
      In order to consider the deoptimized frame size in optimized stack
      checks, we will need to calculate the frame layout during compilation
      in addition to what we currently do during deoptimization. This CL
      moves in that direction by extracting relevant parts of frame layout
      calculation into classes that can be reused by both compiler and
      deoptimizer.
      
      These helpers will support both precise and conservative modes; the
      deoptimizer will use the precise mode (since it has full information),
      while the instruction selector will use the conservative mode.
      
      Bug: v8:9534
      Change-Id: I93d6c39f10d251733f4625d3cc161b2010652d02
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1760825
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63279}
      81642fa6
  12. 24 May, 2019 1 commit
  13. 23 May, 2019 1 commit
  14. 22 May, 2019 2 commits
  15. 13 May, 2019 1 commit
  16. 09 May, 2019 2 commits
  17. 04 Apr, 2019 1 commit
  18. 14 Dec, 2018 1 commit
  19. 13 Dec, 2018 1 commit
    • Jakob Gruber's avatar
      [builtins] Associate ASM builtins with descriptors · e61d3564
      Jakob Gruber authored
      Post-stub-to-builtin migration, all explicit connection between
      descriptors and their associated ASM code has been lost. This restores
      the connection where possible. Builtins without an associated
      descriptor are marked with the DummyDescriptor.
      
      Drive-by: alpha-sort the descriptor list.
      Drive-by: use Builtins::CallableFor in code factory.
      
      Bug: v8:8562, v8:8553
      Change-Id: If1f13bbaf7e42453b3235cc97c58ada91b5fa7b8
      Reviewed-on: https://chromium-review.googlesource.com/c/1373552Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58212}
      e61d3564
  20. 07 Dec, 2018 1 commit
    • Jakob Gruber's avatar
      [nojit] Migrate JSEntry variants to builtins · b89d4249
      Jakob Gruber authored
      This migrates the JSEntryStub to three dedicated builtins:
      
      JSEntry
      JSConstructEntry
      JSRunMicrotasksEntry
      
      Drive-by: Tweaks to make the code isolate-independent (e.g. using the
      correct macro assembler method to load and store external references
      through the kRootRegister).
      Drive-by: The context slot on x64/ia32 must be set up after
      kRootRegister is initialized, so we first reserve the slot and later
      load its value.
      Drive-by: Update all remaining comments referencing JSEntryStub.
      
      Bug: v8:7777
      Change-Id: Ie3ba17ffb3bde6f18ec1d26d778b258719b2d4ef
      Reviewed-on: https://chromium-review.googlesource.com/c/1365275Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58088}
      b89d4249
  21. 22 Nov, 2018 1 commit
  22. 16 Nov, 2018 1 commit
  23. 12 Nov, 2018 1 commit
  24. 05 Nov, 2018 1 commit
    • Tobias Tebbi's avatar
      [torque] cleanup generics and scopes · 06c8ce59
      Tobias Tebbi authored
      - Name lookup in module scopes has namespace semantics now: All
        overloads from all parent modules are combined before overload
        resolution.
      - Allow overloads of different callables: runtime-functions,
        macros, builtins, and generics.
      - The duplication between the DeclarationVisitor and the
        ImplementationVisitor is removed: The DeclarationVisitor creates
        declarables for everything except for implicit generic specializations.
        The ImplementationVisitor iterates over declarables.
        The DeclarationVisitor only looks at the header of declarations, not
        at the body.
      - Modules become Declarable's, which will enable them to be nested.
      - Modules replace the existing Scope chain mechanism, which will make it
        easier to inline macros.
      - The DeclarationVisitor and Declarations become stateless. All state is
        moved to contextual variables and the GlobalContext.
      - Implicit specializations are created directly from the
        ImplementationVisitor. This will enable template parameter inference.
      - As a consequence, the list of all builtins is only available after the
        ImplementationVisitor has run. Thus GenerateBuiltinDefinitions has to
        move to the ImplementationVisitor. Also, this makes it necessary to
        resolve the link from function pointer types to example builtins only
        at this point.
      
      
      Bug: v8:7793
      Change-Id: I61cef2fd3e954ab148c252974344a6e38ee2d01d
      Reviewed-on: https://chromium-review.googlesource.com/c/1304294
      Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
      Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57231}
      06c8ce59
  25. 31 Oct, 2018 1 commit
  26. 29 Oct, 2018 1 commit
  27. 24 Oct, 2018 1 commit
  28. 19 Oct, 2018 2 commits
    • Sigurd Schneider's avatar
      Revert "[embedded] Share a single RelocInfo between all trampolines" · bb54f999
      Sigurd Schneider authored
      This reverts commit 1bf6e735.
      
      Reason for revert: Breaks nosnap builds:
      https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/21209
      
      Original change's description:
      > [embedded] Share a single RelocInfo between all trampolines
      > 
      > Creates a single RelocInfo to be used by all builtin trampolines and
      > stores it as a root. All trampolines then substitute this for their
      > trampoline at generation time with DCHECKs to make sure it is
      > identical.
      > 
      > Also forces all non-trampoline RelocInfo ByteArrays for builtins to be
      > generated into RO_SPACE.
      > 
      > On x64, this results in the OLD_SPACE part of the startup snapshot
      > decreasing in size from 166096 to 131248 (-34848) bytes and RO_SPACE
      > (in the read-only snapshot) increasing from 31176 to 31248 (+72) bytes.
      > 
      > Bug: v8:8295
      > Change-Id: I69f4a899b738f2023ed42501c2b9797d34305b06
      > Reviewed-on: https://chromium-review.googlesource.com/c/1276468
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#56811}
      
      TBR=ulan@chromium.org,jgruber@chromium.org,delphick@chromium.org
      
      Change-Id: I57239af6f3fc9c403977da0561b8fe32c1a758e7
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:8295
      Reviewed-on: https://chromium-review.googlesource.com/c/1291070Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56814}
      bb54f999
    • Dan Elphick's avatar
      [embedded] Share a single RelocInfo between all trampolines · 1bf6e735
      Dan Elphick authored
      Creates a single RelocInfo to be used by all builtin trampolines and
      stores it as a root. All trampolines then substitute this for their
      trampoline at generation time with DCHECKs to make sure it is
      identical.
      
      Also forces all non-trampoline RelocInfo ByteArrays for builtins to be
      generated into RO_SPACE.
      
      On x64, this results in the OLD_SPACE part of the startup snapshot
      decreasing in size from 166096 to 131248 (-34848) bytes and RO_SPACE
      (in the read-only snapshot) increasing from 31176 to 31248 (+72) bytes.
      
      Bug: v8:8295
      Change-Id: I69f4a899b738f2023ed42501c2b9797d34305b06
      Reviewed-on: https://chromium-review.googlesource.com/c/1276468
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56811}
      1bf6e735
  29. 20 Sep, 2018 1 commit
    • Dan Elphick's avatar
      [interpreter] Always put bytecode handlers in builtins table · daa296b5
      Dan Elphick authored
      This always creates the bytecode handlers as part of the builtins table
      regardless of the V8_EMBEDDED_BYTECODE_HANDLERS definition.
      
      Lazy deserialization of bytecode handlers is enabled for this flow by
      moving the three lazy bytecode deserializers from the strong roots into
      the builtins table (ensuring that they not marked lazy themselves).
      
      To simplify lazy deserialization, the illegal bytecode handler is made
      non-lazy so that GetAndMaybeDeserializeBytecodeHandler doesn't to know
      about it.
      
      Since the bytecode handlers are now always part of the builtins table,
      many bytecode specific methods are removed, including logging and in
      BuiltinsSerializer and BuiltinsDeserializer.
      
      Removes setup-interpreter.h, setup-interpreter-internal.cc and
      builtin-snapshot-utils.*.
      
      Change-Id: Ie421aa897a04f7b3bcb964c476eb7ab149388d53
      Reviewed-on: https://chromium-review.googlesource.com/1220046Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56063}
      daa296b5
  30. 14 Sep, 2018 1 commit
    • Jakob Gruber's avatar
      Revert "[builtins] Add FastCallFunction builtin that elides some checks" · 74320a1b
      Jakob Gruber authored
      This reverts commit 99e13e58.
      
      Reason for revert: Reverting in favor of a general mechanism for this in Torque.
      
      Original change's description:
      > [builtins] Add FastCallFunction builtin that elides some checks
      > 
      > This CL adds a new "Call" stub that can be used by builtins that will
      > call the same JS call-back function often (e.g. compare function in
      > Array.p.sort). The checks have to be done upfront once, but can then
      > be omitted.
      > 
      > R=​jgruber@chromium.org
      > 
      > Bug: v8:7861
      > Change-Id: Id6e4ca27c3d488a7b1f708cbcb4cbe6cc382513e
      > Reviewed-on: https://chromium-review.googlesource.com/1208574
      > Commit-Queue: Simon Zünd <szuend@google.com>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#55769}
      
      TBR=cbruni@chromium.org,jgruber@chromium.org,szuend@google.com
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:7861
      Change-Id: I47260993ef2a16bd5348bb0b46da4d34d33ea10b
      Reviewed-on: https://chromium-review.googlesource.com/1226871
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55897}
      74320a1b
  31. 11 Sep, 2018 1 commit
  32. 10 Sep, 2018 1 commit
    • Dan Elphick's avatar
      [embedded handlers] Store the handlers without gaps · 5a9f0556
      Dan Elphick authored
      Previously the builtins table had a value for every single
      OperandScale/Bytecode combination regardless of whether it was valid.
      This change makes it so that only valid bytecode handlers are stored in
      the builtins table. This prevents placeholders being serialized into the
      snapshot (and embedded into the binary) saving 9KB in
      CODE_SPACE/OLD_SPACE and 2.5KB in the embedded data as well as 66
      entries in the builtins table.
      
      To do this, it generates a new header file bytecodes-builtins-list.h
      which is created from the BYTECODE_LIST and OPERAND_SCALE_LIST macros.
      Since list macros cannot be used to conditionally generate elements in
      the C-preprocessor, this is done by generator executable, compiled from
      interpreter/generate-flat-headers.cc.
      
      Additionally the generator creates the flat bytecode list so that it is
      transposed from the previous result, i.e. the results are grouped by
      bytecode and then operand scale rather than operand scale then bytecode.
      This should give better locality for commonly used bytecodes and may
      allow less commonly used ExtraWide bytecodes to never be mapped into
      memory at all.
      
      The cost to storing the handlers densely is that looking up a handler
      now requires a binary search through the builtins table, but this should
      only happen during debugging. It is also fixable at least for non-wide
      handlers and could be improved for wide ones if the need arises.
      
      Bug: v8:8068
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: Iaad22a952e2858f508030c5ddc082f91bf59f667
      Reviewed-on: https://chromium-review.googlesource.com/1209304
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55757}
      5a9f0556
  33. 03 Sep, 2018 1 commit
  34. 22 Aug, 2018 1 commit