1. 28 Oct, 2021 1 commit
  2. 27 Sep, 2021 1 commit
  3. 18 Aug, 2021 1 commit
  4. 16 Aug, 2021 1 commit
  5. 13 Aug, 2021 1 commit
    • Nicolò Ribaudo's avatar
      [class] Improve errors for reinitialized private elements · b3b9466a
      Nicolò Ribaudo authored
      Previously V8 was reusing the error fur duplicate declarations, using
      the private name for class fields or the class name for class methods
      as the redeclared identifier.
      
          class A { constructor(o) { return o } }
          class B extends A { #x }
          class C extends A { #x() {} }
          let D = (0, class extends A { #x() {} });
      
          new B(new B({})) // Identifier '#x' has already been declared
          new C(new C({})) // Identifier 'C' has already been declared
          new D(new D({})) // Identifier '' has already been declared
      
      This patch changes it to use error messages that better explain what's
      happening:
      
          new B(new B({})) // Cannot initialize #x twice on the same object
          new C(new C({})) // Cannot initialize private methods of
                           // class C twice on the same object
          new D(new D({})) // Cannot initialize private methods of
                           // class anonymous twice on the same object
      
      I initially tried to use the same message for both fields and methods,
      but the problem with that is that when initializing fields we only
      have access to the field name, while when initializing methods we only
      have access to the class name (using the "private brand" symbol).
      However, almost all the error messages are different for private fields
      and for methods so this shouldn't be a problem.
      
      Bug: v8:12042
      Change-Id: Iaa50c16e4fa5c0646ad9ef2aa7e65bb649b3fce2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3078362Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarJoyee Cheung <joyee@igalia.com>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76279}
      b3b9466a
  6. 07 Jul, 2021 1 commit
  7. 23 Jun, 2021 1 commit
    • Mihir Shah's avatar
      A jump-table implementation for constant case switch statements · 9711289d
      Mihir Shah authored
      The change is made since for switch statements with lots of cases,
      where each case is a constant integer, the emitted bytecode is still
      a series of jumps, when we can instead use a jump table.
      
      If there are 6 or more cases (similar to GCC) of Smi literals, and
      if the max Smi case minus the min Smi case is not more than 3 times
      the number of cases, we use a jump table up front to handle Smi's,
      and then use traditional if-else logic for the rest of the cases.
      
      We then use the jump table in interpreter/bytecode-jump-table to
      do the optimization.
      
      This tries to go off issue 9738 in v8's issue tracker. It is not
      exactly the same, since that recommends doing the work at JIT-time,
      but has similar ideas. It also partially goes off issue 10764.
      
      Bug: v8:9738
      Change-Id: Ic805682ee3abf9ce464bb733b427fa0c83a6e10c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904926Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#75323}
      9711289d
  8. 09 Jun, 2021 1 commit
  9. 02 Jun, 2021 1 commit
  10. 31 May, 2021 1 commit
  11. 14 May, 2021 1 commit
  12. 27 Apr, 2021 1 commit
  13. 20 Apr, 2021 1 commit
  14. 12 Apr, 2021 2 commits
    • Wenyu Zhao's avatar
      Allowing map word to be used for other state in GC header. · 5e0b94c4
      Wenyu Zhao authored
      This CL adds features to pack/unpack map words.
      
      Currently V8 cannot store extra metadata in object headers -- because V8
      objects do not have a proper header, but only a map pointer at the start
      of the object. To store per-object metadata like marking data, a side
      table is required as the per-object metadata storage.
      
      This CL enables V8 to use higher unused bits in a 64-bit map word as
      per-object metadata storage. Map pointer stores come with an extra step
      to encode the metadata into the pointer (we call it "map packing").
      Map pointer loads will also remove the metadata bits as well (we call it
      "map packing").
      
      Since the map word is no longer a valid pointer after packing, we also
      change the tag of the packed map word to make it looks like a Smi. This
      helps various GC and barrier code to correctly skip them instead of
      blindly dereferencing this invalid pointer.
      
      A ninja flag `v8_enable_map_packing` is provided to turn this
      map-packing feature on and off. It is disabled by default.
      
      * Only works on x64 platform, with `v8_enable_pointer_compression`
        set to `false`
      
      Bug: v8:11624
      Change-Id: Ia2bdf79553945e5fc0b0874c87803d2cc733e073
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2247561Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73915}
      5e0b94c4
    • Brendon Tiszka's avatar
      [builtins] Harden Array.prototype.concat. · 8284359e
      Brendon Tiszka authored
      Defence in depth patch to prevent JavaScript from executing
      from within IterateElements.
      
      R=ishell@chromium.org
      R=cbruni@chromium.org
      
      Bug: chromium:1195977
      Change-Id: Ie59d468b73b94818cea986a3ded0804f6dddd10b
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2819941Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#73898}
      8284359e
  15. 08 Apr, 2021 2 commits
  16. 29 Mar, 2021 1 commit
  17. 24 Mar, 2021 1 commit
  18. 22 Feb, 2021 1 commit
  19. 09 Feb, 2021 1 commit
  20. 08 Dec, 2020 1 commit
  21. 07 Dec, 2020 1 commit
  22. 09 Nov, 2020 1 commit
  23. 27 Oct, 2020 1 commit
  24. 13 Oct, 2020 2 commits
  25. 16 Sep, 2020 1 commit
  26. 07 Sep, 2020 1 commit
  27. 03 Sep, 2020 1 commit
    • Jakob Kummerow's avatar
      Revert "Check interrupts in runtime BigInt parser" · ec49e377
      Jakob Kummerow authored
      This reverts commit 825c61d8.
      
      Reason for revert: Processing interrupts triggers a DisallowHeapAllocation scope failure.
      
      Original change's description:
      > Check interrupts in runtime BigInt parser
      > 
      > The BigInt constructor has quadratic complexity while parsing strings,
      > and the input is unbounded. Interrupts should be checked during this
      > operation to ensure the host has control over runaway execution.
      > 
      > Change-Id: I15db9adeeafadc7b866a395dd8263aa8c2109ce8
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2384166
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#69679}
      
      TBR=jkummerow@chromium.org,leszeks@chromium.org,marcel@laverdet.com
      
      Bug: chromium:1124477
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Change-Id: I1ba8c1de1f809f71a1c4fae9b56a8bd40f9f7e7f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2392815Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69703}
      ec49e377
  28. 02 Sep, 2020 3 commits
  29. 31 Aug, 2020 2 commits
    • Brendan Shanks's avatar
      Use NtCurrentTeb() in GetStackStart() to fix 64-bit Wine on macOS · c40c8f7d
      Brendan Shanks authored
      When running 64-bit Windows binaries on macOS using Wine, there is a
      conflict between macOS's use of GS to point to pthread thread-specific
      data, and Windows' use of GS to point to the TEB.
      
      Apple has reserved some TSD slots for use by Wine to store commonly-used
      TEB members (such as 0x30, the 'Self' pointer to the TEB).
      But, other direct GS accesses by Windows programs (such as to
      'StackBase') will return macOS pthread data rather than the TEB member.
      This was causing a V8 unit test to crash on macOS under Wine.
      
      Using NtCurrentTeb() gets the 'Self' pointer first, then dereferences
      it to access the correct 'StackBase', fixing the crash.
      This turns GetStackStart() from one instruction into two.
      
      Chrome (http://crrev.com/c/2380425) and Crashpad also use
      NtCurrentTeb().
      
      The 32-bit change isn't needed, but is just for consistency.
      
      Bug: chromium:1121842
      Change-Id: I824f893aa451d8570142226be91840c964426f38
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2381941Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69627}
      c40c8f7d
    • Tianping Yang's avatar
      [test] Add a test case to the snaphot with all function code · a96715b0
      Tianping Yang authored
      By eager compile all functions in the startup snapshot, the startup
      snapshot can contain all function codes without warm-up.
      
      BUG=v8:4836
      R=yangguo@chromium.org
      
      Change-Id: I07e86b6940c2fe75816df8ae429d110272216d0a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2379535Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69624}
      a96715b0
  30. 05 Aug, 2020 1 commit
  31. 07 Jul, 2020 1 commit
  32. 18 Jun, 2020 1 commit
  33. 25 May, 2020 1 commit
  34. 14 May, 2020 1 commit