1. 12 Jun, 2018 1 commit
  2. 05 Jun, 2018 1 commit
  3. 04 Jun, 2018 1 commit
  4. 30 May, 2018 2 commits
  5. 29 May, 2018 1 commit
  6. 24 May, 2018 2 commits
  7. 17 May, 2018 1 commit
  8. 14 May, 2018 2 commits
    • jgruber's avatar
      [api] Add a dedicated UnboundModuleScript type · 8ec92f51
      jgruber authored
      Module and script SharedFunctionInfos can't be used interchangeably
      (e.g.: it should not be possible to bind a Module's SFI to a Context).
      
      The dedicated type disambiguates the two.
      
      This also adds an overload for CreateCodeCache which takes an unbound
      module script instead of an unbound script. Both are just a SFI
      underneath, so their behavior is identical.
      
      Bug: v8:7685
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: Iab519d0d50b6b41c95abdb6397f5622e292da4d8
      Reviewed-on: https://chromium-review.googlesource.com/1047107
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53150}
      8ec92f51
    • Maya Lekova's avatar
      Revert promises optimizations due to regressions in async hooks · 91ddb65d
      Maya Lekova authored
      Revert "[async-await] Eliminate throwaway promise in async functions."
      
      This reverts commit a840f1f8.
      
      Revert "[async-generators] Also avoid throwaway promise here."
      
      This reverts commit feb545ce.
      
      Revert "[async-await] Turn await closures into intrinsics."
      
      This reverts commit d97bb317.
      
      Revert "[async-generators] Add fast-path for primitives in AsyncGeneratorYield."
      
      This reverts commit e57b500e.
      
      Revert "[async-generators] Add fast-path to skip "then" lookup in AsyncGeneratorResolve."
      
      This reverts commit c15802e1.
      
      Revert "[promises] Correctly run before/after hooks for await."
      
      This reverts commit ca763923.
      
      Bug: v8:7253, v8:7745
      Change-Id: I25ad0d2df3cfbc84dbb431aa25b268bce8a39e89
      Reviewed-on: https://chromium-review.googlesource.com/1049975
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53139}
      91ddb65d
  9. 07 May, 2018 3 commits
  10. 04 May, 2018 2 commits
    • Erik Luo's avatar
      [debug] add ability to do side-effect-free call to NewInstance · 4b52f964
      Erik Luo authored
      Creating a new instance from a v8::Function will invoke its
      constructor. If it is an API callback that has not been marked as
      kHasNoSideEffect, this CL introduces a way to invoke it without
      throwing.
      
      Calls within the constructor are still checked for side effects.
      
      Bug: chromium:829571
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: Ia4e410d487e2847bc511cb96f0be30a3563991f6
      Reviewed-on: https://chromium-review.googlesource.com/1034116
      Commit-Queue: Erik Luo <luoe@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53003}
      4b52f964
    • jgruber's avatar
      [api] Add Module::GetUnboundScript() · 2d3f6f91
      jgruber authored
      This method is intended for use by code caching as follows:
      
      1. The module is compiled (and perhaps instantiated).
      2. The embedder fetches and stores the module's unbound script (i.e.
         the shared function info).
      3. Module evaluation, maybe triggering lazy compilation.
      4. Generated code for the module (which hangs off the shared function
         info) is inserted into the code cache.
      
      Subsequent module loads can load from the code cache prior to
      evaluation.
      
      Bug: v8:7685
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: I80018cd921ab1a18323906a548b249e19d9f9509
      Reviewed-on: https://chromium-review.googlesource.com/1041745
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52998}
      2d3f6f91
  11. 02 May, 2018 1 commit
  12. 19 Apr, 2018 2 commits
    • Ulan Degenbaev's avatar
      [test] Make test-api/ScavengeExternal*String non-threaded test. · 7e61eb33
      Ulan Degenbaev authored
      ScavengeExternalString and ScavengeExternalOneByteString clear GC flags,
      which confuses concurrent sweeping that was started from another test.
      
      Tests that mutate flags should not be threaded.
      
      Bug: v8:7671
      Change-Id: I08656d06fe85ff45baca685ebe5982528aad774c
      Reviewed-on: https://chromium-review.googlesource.com/1019102Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52690}
      7e61eb33
    • Dan Elphick's avatar
      Reland "Reland "[heap] Move initial objects into RO_SPACE"" · 9ab6621a
      Dan Elphick authored
      This is a reland of 6c68efac
      
      Updated Heap::CommittedMemory and related functions to iterate over all
      spaces rather than including them manually which can lead to a space
      being overlooked. Also adds a test to ensure this the case.
      
      Original change's description:
      > Revert "Reland "[heap] Move initial objects into RO_SPACE""
      >
      > This reverts commit 6c68efac.
      >
      > Reason for revert: https://bugs.chromium.org/p/v8/issues/detail?id=7668
      >
      > Original change's description:
      > > Reland "[heap] Move initial objects into RO_SPACE"
      > >
      > > This is a reland of f8ae62fe
      > >
      > > Original change's description:
      > > > [heap] Move initial objects into RO_SPACE
      > > >
      > > > This moves:
      > > > * the main oddballs (null, undefined, hole, true, false) as well as
      > > > their supporting maps (also adds hole as an internalized string to make
      > > > this work).
      > > > * most of the internalized strings
      > > > * the struct maps
      > > > * empty array
      > > > * empty enum cache
      > > > * the contents of the initial string table
      > > > * the weak_cell_cache for any map in RO_SPACE (and eagerly creates the
      > > > value avoid writing to it during run-time)
      > > >
      > > > The StartupSerializer stats change as follows:
      > > >
      > > >      RO_SPACE  NEW_SPACE  OLD_SPACE  CODE_SPACE  MAP_SPACE  LO_SPACE
      > > > old         0          0     270264       32608      12144         0
      > > > new     21776          0     253168       32608       8184         0
      > > > Overall memory usage has increased by 720 bytes due to the eager
      > > > initialization of the Map weak cell caches.
      > > >
      > > > Also extends --serialization-statistics to print out separate instance
      > > > type stats for objects in RO_SPACE as shown here:
      > > >
      > > >   Read Only Instance types (count and bytes):
      > > >        404      16736  ONE_BYTE_INTERNALIZED_STRING_TYPE
      > > >          2         32  HEAP_NUMBER_TYPE
      > > >          5        240  ODDBALL_TYPE
      > > >         45       3960  MAP_TYPE
      > > >          1         16  BYTE_ARRAY_TYPE
      > > >          1         24  TUPLE2_TYPE
      > > >          1         16  FIXED_ARRAY_TYPE
      > > >          1         32  DESCRIPTOR_ARRAY_TYPE
      > > >         45        720  WEAK_CELL_TYPE
      > > >
      > > > Bug: v8:7464
      > > > Change-Id: I12981c39c82a7057f68bbbe03f89fb57b0b4c6a6
      > > > Reviewed-on: https://chromium-review.googlesource.com/973722
      > > > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > > > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > > > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > > > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > > > Cr-Commit-Position: refs/heads/master@{#52435}
      > >
      > > Bug: v8:7464
      > > Change-Id: I50427edfeb53ca80ec4cf46566368fb2213ccf7b
      > > Reviewed-on: https://chromium-review.googlesource.com/999654
      > > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#52638}
      >
      > TBR=rmcilroy@chromium.org,yangguo@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,delphick@chromium.org
      >
      > # Not skipping CQ checks because original CL landed > 1 day ago.
      >
      > Bug: v8:7464,v8:7668
      > Change-Id: I10aa03623b51e997f95a3715ea9f0bf5d29d2cdb
      > Reviewed-on: https://chromium-review.googlesource.com/1016600
      > Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52667}
      
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: If4b7490c8c4d31612de8ec132de334955a319b11
      Bug: v8:7464, v8:7668
      Reviewed-on: https://chromium-review.googlesource.com/1019020Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52689}
      9ab6621a
  13. 18 Apr, 2018 2 commits
  14. 17 Apr, 2018 1 commit
  15. 16 Apr, 2018 1 commit
  16. 14 Apr, 2018 1 commit
    • Jakob Kummerow's avatar
      [ubsan] Change Address typedef to uintptr_t · 2459046c
      Jakob Kummerow authored
      The "Address" type is V8's general-purpose type for manipulating memory
      addresses. Per the C++ spec, pointer arithmetic and pointer comparisons
      are undefined behavior except within the same array; since we generally
      don't operate within a C++ array, our general-purpose type shouldn't be
      a pointer type.
      
      Bug: v8:3770
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ib96016c24a0f18bcdba916dabd83e3f24a1b5779
      Reviewed-on: https://chromium-review.googlesource.com/988657
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52601}
      2459046c
  17. 13 Apr, 2018 1 commit
  18. 05 Apr, 2018 2 commits
    • Peter Marshall's avatar
      [typedarray] Fix GetBuffer for 0-length off-heap typed arrays. · eab5583a
      Peter Marshall authored
      Fixes a crash that happens when calling postMessage on an empty typed
      array.
      
      GetBuffer should only call MaterializeArrayBuffer for on-heap buffers,
      but the on-heap check is slightly wrong. This CL moves the on-heap check
      logic to the JSTypedArray class so that other parts of the codebase
      don't need to worry about how that is determined.
      
      Also add some dchecks to materialize itself. It should only receive
      on-heap buffers and should always transform them to off-heap buffers.
      There is also no reason for it to be static, so change that here too.
      
      Bug: chromium:797588
      Change-Id: Icd88a5b68e424d82c9f1f7889ca42a40a72a1bdc
      Reviewed-on: https://chromium-review.googlesource.com/995898
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52388}
      eab5583a
    • jgruber's avatar
      Rename Code::instruction_{start,end,size} functions · 7b29fe43
      jgruber authored
      In order to clarify the difference between, e.g., InstructionStart and
      instruction_start, rename as follows:
      
      Code::instruction_start -> raw_instruction_start
      Code::instruction_end   -> raw_instruction_end
      Code::instruction_size  -> raw_instruction_size
      
      The difference between the camel-case and raw_* function families is
      in how they handle off-heap-trampoline Code objects. For example, when
      called on an off-heap-trampoline: raw_instruction_start returns the
      trampoline's entry point, while InstructionStart returns the off-heap
      code's entry point (located in the .text section of the binary).
      
      Some callsites were updated to call the camel-case function family as
      appropriate.
      
      Bug: v8:6666
      Change-Id: I4a572f47c2d161a853599d7c17879e263b0d1a87
      Reviewed-on: https://chromium-review.googlesource.com/997532
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52387}
      7b29fe43
  19. 04 Apr, 2018 1 commit
    • Erik Luo's avatar
      [debug] expose SideEffectType for whitelisting embedder callbacks · 6da12d42
      Erik Luo authored
      This exposes new flags to allow embedders to whitelist callbacks as
      side-effect-free during evaluation with throwOnSideEffect.
      
      Accessors and Functions/FunctionTemplates can take a new param on:
      - v8::Object::SetNativeDataProperty
      - v8::Object::SetLazyDataProperty
      - v8::Object::SetAccessor
      - v8::FunctionTemplate::New
      - v8::FunctionTemplate::NewWithCache
      - v8::Function::New
      
      While Interceptors can be created with an additional flag:
      PropertyHandlerFlag::kHasNoSideEffect
      
      Bug: v8:7515
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: I14823316bdd6de6d362a1104b65f13504d0db056
      Reviewed-on: https://chromium-review.googlesource.com/994550
      Commit-Queue: Erik Luo <luoe@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52367}
      6da12d42
  20. 03 Apr, 2018 1 commit
  21. 27 Mar, 2018 1 commit
    • Ulan Degenbaev's avatar
      [heap,api] Introduce near-heap-limit callbacks. · 84a80e10
      Ulan Degenbaev authored
      The embedder can get notification when V8 heap size approaches the heap limit
      and can extend the heap limit if needed using
      - v8::Isolate::AddNearHeapLimitCallback
      - v8::Isolate::RemoveNearHeapLimitCallback
      
      This generalizes the exiting v8::debug::SetOutOfMemoryCallback API.
      
      Bug: chromium:824214
      
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ia444cb7efb6fe85c57fa3785e8fd1d8b654a5224
      Reviewed-on: https://chromium-review.googlesource.com/979447
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52238}
      84a80e10
  22. 19 Mar, 2018 1 commit
  23. 08 Mar, 2018 2 commits
  24. 01 Mar, 2018 1 commit
  25. 26 Feb, 2018 1 commit
  26. 24 Feb, 2018 1 commit
  27. 23 Feb, 2018 1 commit
  28. 21 Feb, 2018 2 commits
  29. 16 Feb, 2018 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Properly optimize calls to promise extras. · 13ca9a0f
      Benedikt Meurer authored
      Add TurboFan inlining support for the following V8 Extras:
      
       - v8.createPromise
       - v8.rejectPromise
       - v8.resolvePromise
      
      These are used by the streams implementation in Chrome currently, and
      were previously not inlined into TurboFan, although TurboFan already
      had all the necessary functionality (namely the JSCreatePromise,
      JSRejectPromise and JSResolvePromise operators). We might eventually
      want to use these functions in Node core as well (at least short-term
      for Node 10), to replace the C++ internal API functions with the same
      name that are currently being used by parts of Node core.
      
      For this to work, the rejectPromise and resolvePromise builtins had
      to be moved back to CSA, as for JavaScript builtins we still have the
      policy that the optimizing compiler must not inline them. But that's
      straight-forward since the CSA has all the necessary functionality
      available anyways.
      
      Bug: v8:7253
      Change-Id: I39ab015c379956cd58ace866e17f8ec23b2257b2
      Reviewed-on: https://chromium-review.googlesource.com/924146Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#51332}
      13ca9a0f