1. 28 Sep, 2017 2 commits
    • Ben L. Titzer's avatar
      [wasm] Move compilation methods to module-compiler.h · afb7bdc4
      Ben L. Titzer authored
      Note that this also makes it possible to move several classes
      into the module-compiler.cc file and inline their implementations.
      
      This also allows removing several uses of wasm-module.h from
      other places in V8 that include wasm-objects.h.
      
      R=yangguo@chromium.org,clemensh@chromium.org,ahaas@chromium.org
      
      Bug: 
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I303ee2bb49dc53c951d377a1b65699c1e0e91da7
      Reviewed-on: https://chromium-review.googlesource.com/687494Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48204}
      afb7bdc4
    • Peter Marshall's avatar
      [cleanup] Replace List with std::vector in api. · 329f6946
      Peter Marshall authored
      The members of HandleScopeImplementer are copied with memcpy when
      the isolate is transferred to another thread. List contained some
      primitives which allowed us to manually free the backing store, which
      was needed in order to ensure that threads would not hold on to
      old pointers and use them later. With std::vector, we can't do that.
      
      Here we change the HandleScopeImplementer to instead use a custom
      structure DetachableVector, which contains a std::vector but allows
      manual detaching and freeing of the backing store. This allows us to
      maintain the old behavior.
      
      Bug: v8:6333
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I6361d161cdb19878ba19ed51d6ba2fae99e8cdc0
      Reviewed-on: https://chromium-review.googlesource.com/660125Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48197}
      329f6946
  2. 26 Sep, 2017 2 commits
  3. 22 Sep, 2017 1 commit
  4. 21 Sep, 2017 1 commit
    • Bill Budge's avatar
      Reland "Reland "[Memory] Move VirtualMemory out of base:: platform."" · 645cda07
      Bill Budge authored
      This is a reland of f2cd10db
      Original change's description:
      > Reland "[Memory] Move VirtualMemory out of base:: platform."
      > 
      > This is a reland of 4dd293d9
      > Original change's description:
      > > [Memory] Move VirtualMemory out of base:: platform.
      > > 
      > > - Moves base::VirtualMemory to v8::internal::VirtualMemory.
      > > - Makes VirtualMemory platform-independent by moving internals to new
      > >   OS:: static methods, for each platform.
      > > 
      > > This will make it easier to delegate memory management in VirtualMemory
      > > to V8::Platform, so that embedders like Blink can override it. We can't
      > > depend on V8::Platform in base/platform.
      > > 
      > > Bug: chromium:756050
      > > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > > Change-Id: Iadfe230b6850bd917727a373f277afded9883adf
      > > Reviewed-on: https://chromium-review.googlesource.com/653214
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#48048}
      > 
      > Bug: chromium:756050
      > Change-Id: Ib492c7c69f1833be127a571808301e96b84b8aa2
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Reviewed-on: https://chromium-review.googlesource.com/671125
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#48084}
      
      Bug: chromium:756050
      Change-Id: Ie596730b5cefc38137cab7fc1f76613f5af7b825
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/675283Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48113}
      645cda07
  5. 20 Sep, 2017 1 commit
    • Michael Hablich's avatar
      Revert "Reland "[Memory] Move VirtualMemory out of base:: platform."" · 7447fd53
      Michael Hablich authored
      This reverts commit f2cd10db.
      
      Reason for revert: Blocks the roll https://chromium-review.googlesource.com/c/chromium/src/+/674623
      
      Original change's description:
      > Reland "[Memory] Move VirtualMemory out of base:: platform."
      > 
      > This is a reland of 4dd293d9
      > Original change's description:
      > > [Memory] Move VirtualMemory out of base:: platform.
      > > 
      > > - Moves base::VirtualMemory to v8::internal::VirtualMemory.
      > > - Makes VirtualMemory platform-independent by moving internals to new
      > >   OS:: static methods, for each platform.
      > > 
      > > This will make it easier to delegate memory management in VirtualMemory
      > > to V8::Platform, so that embedders like Blink can override it. We can't
      > > depend on V8::Platform in base/platform.
      > > 
      > > Bug: chromium:756050
      > > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > > Change-Id: Iadfe230b6850bd917727a373f277afded9883adf
      > > Reviewed-on: https://chromium-review.googlesource.com/653214
      > > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#48048}
      > 
      > Bug: chromium:756050
      > Change-Id: Ib492c7c69f1833be127a571808301e96b84b8aa2
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Reviewed-on: https://chromium-review.googlesource.com/671125
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#48084}
      
      TBR=bbudge@chromium.org,ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,scottmg@chromium.org
      
      Change-Id: I04176d77ca9ad8315b0e1bb2b21f40f2c8ab9536
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:756050
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/674843Reviewed-by: 's avatarMichael Hablich <hablich@chromium.org>
      Commit-Queue: Michael Hablich <hablich@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48088}
      7447fd53
  6. 19 Sep, 2017 1 commit
    • Bill Budge's avatar
      Reland "[Memory] Move VirtualMemory out of base:: platform." · f2cd10db
      Bill Budge authored
      This is a reland of 4dd293d9
      Original change's description:
      > [Memory] Move VirtualMemory out of base:: platform.
      > 
      > - Moves base::VirtualMemory to v8::internal::VirtualMemory.
      > - Makes VirtualMemory platform-independent by moving internals to new
      >   OS:: static methods, for each platform.
      > 
      > This will make it easier to delegate memory management in VirtualMemory
      > to V8::Platform, so that embedders like Blink can override it. We can't
      > depend on V8::Platform in base/platform.
      > 
      > Bug: chromium:756050
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: Iadfe230b6850bd917727a373f277afded9883adf
      > Reviewed-on: https://chromium-review.googlesource.com/653214
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#48048}
      
      Bug: chromium:756050
      Change-Id: Ib492c7c69f1833be127a571808301e96b84b8aa2
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/671125
      Commit-Queue: Bill Budge <bbudge@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48084}
      f2cd10db
  7. 18 Sep, 2017 1 commit
    • Michael Hablich's avatar
      Revert "[Memory] Move VirtualMemory out of base:: platform." · 4fc43530
      Michael Hablich authored
      This reverts commit 4dd293d9.
      
      Reason for revert: Blocks roll: https://chromium-review.googlesource.com/c/chromium/src/+/669785
      
      Original change's description:
      > [Memory] Move VirtualMemory out of base:: platform.
      > 
      > - Moves base::VirtualMemory to v8::internal::VirtualMemory.
      > - Makes VirtualMemory platform-independent by moving internals to new
      >   OS:: static methods, for each platform.
      > 
      > This will make it easier to delegate memory management in VirtualMemory
      > to V8::Platform, so that embedders like Blink can override it. We can't
      > depend on V8::Platform in base/platform.
      > 
      > Bug: chromium:756050
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: Iadfe230b6850bd917727a373f277afded9883adf
      > Reviewed-on: https://chromium-review.googlesource.com/653214
      > Commit-Queue: Bill Budge <bbudge@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#48048}
      
      TBR=bbudge@chromium.org,ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,scottmg@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: chromium:756050
      Change-Id: Ice2618ef72950e1b64c31434a239c626aa5e5970
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/670843Reviewed-by: 's avatarMichael Hablich <hablich@chromium.org>
      Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Hablich <hablich@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48062}
      4fc43530
  8. 15 Sep, 2017 3 commits
  9. 14 Sep, 2017 1 commit
  10. 11 Sep, 2017 4 commits
  11. 08 Sep, 2017 2 commits
  12. 07 Sep, 2017 2 commits
  13. 04 Sep, 2017 2 commits
  14. 31 Aug, 2017 2 commits
  15. 30 Aug, 2017 4 commits
    • jgruber's avatar
      [snapshot] Store builtin offsets during serialization · 89b6ef0c
      jgruber authored
      To deserialize builtins individually, we need to preserve their starting
      offsets within the serialized data.
      
      Bug: v8:6624
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I48a48330aeb63de2c8cfcbea6fb94e1b2917495c
      Reviewed-on: https://chromium-review.googlesource.com/637774Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47708}
      89b6ef0c
    • Michael Lippautz's avatar
      [heap] Allow allocating Struct and Tuple* in new space · 47037bdc
      Michael Lippautz authored
      Aligns behavior with other allocate calls in factory that allow
      choosing the generation depending on the use case.
      
      Bug: v8:6771
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I63b95de7e664a51af8ca24a75f2122dfe1792c42
      Reviewed-on: https://chromium-review.googlesource.com/642799Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47707}
      47037bdc
    • jgruber's avatar
      Reland "[snapshot] Move builtins to dedicated snapshot area" · 70a51638
      jgruber authored
      This is a reland of 49e3bfd5
      Original change's description:
      > [snapshot] Move builtins to dedicated snapshot area
      > 
      > As a first step towards lazy builtin deserialization, this CL moves
      > builtins to their own dedicated area in the snapshot blob, physically
      > located after startup data and before context-specific data.
      > 
      > The startup- and partial serializers now serialize all seen builtins as
      > references, i.e. they only encode the relevant builtin id (taking care
      > to preserve special behavior around the interpreter trampoline and
      > CompileLazy). Builtins are later fully serialized by the
      > BuiltinSerializer. The separate blobs are finally glued together by
      > CreateSnapshotBlob.
      > 
      > Deserialization takes the same steps: when we see builtin reference
      > bytecodes before builtins have been deserialized, we push to a list of
      > deferred builtin references. After builtin deserialization, this list is
      > iterated and all builtin references are fixed up.
      > 
      > Bug: v8:6624
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: Idee42fa9c92bdbe8d5b8c4b8bf3ca9dd39634004
      > Reviewed-on: https://chromium-review.googlesource.com/610225
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47596}
      
      Bug: v8:6624
      Change-Id: I8bfac56c482d992987c270bf0fea7acd9e4ca0c7
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/638271Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47705}
      70a51638
    • Benedikt Meurer's avatar
      [cleanup] Unify enum cache handling. · 562663d5
      Benedikt Meurer authored
      Introduce a proper empty_descriptor_array, which has the proper layout
      (length is 2 and the two fields are set properly). Also add a special
      EnumCache class and a matching empty_enum_cache. The contract now is
      that we only need to check the EnumLength on the map to know whether we
      are allowed to use the enum cache. This greatly simplifies the handling
      of the enum cache (and also the descriptor arrays), especially for the
      future work on optimizing keyed access via the enum cache indices.
      
      Bug: v8:6702
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I5ef517a3041163cd65ef003f691139ea52233e83
      Reviewed-on: https://chromium-review.googlesource.com/641030
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47697}
      562663d5
  16. 29 Aug, 2017 2 commits
  17. 28 Aug, 2017 3 commits
    • Mateusz Czeladka's avatar
      Pass Isolate pointer to String::Utf8Value/Value constructors · fe598532
      Mateusz Czeladka authored
      As part of J2V8 development (https://github.com/eclipsesource/J2V8),
      we realized that we had a subtle bug in how Isolate scope was created
      and it's lifetime managed, see:
      https://github.com/eclipsesource/J2V8/issues/313.
      
      Mentioned above bug was fixed, however, what we also noticed is that
      V8 API has been constantly and slowly moving to such an API, in which
      one has to pass Isolate explicitly to methods and/or constructors. We
      found two more places that might have been overlooked. This contribution
      adds passing of Isolate pointer explicitly to constructors of
      String::Utf8Value and String::Value classes.
      
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng;master.tryserver.v8:v8_linux_noi18n_rel_ng
      Change-Id: I61984285f152aba5ca922100cf3df913a9cb2cea
      Reviewed-on: https://chromium-review.googlesource.com/593309
      Commit-Queue: Adam Klein <adamk@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47656}
      fe598532
    • Yang Guo's avatar
      [snapshot] improve API references. · 8fb5000e
      Yang Guo authored
      We now only require API references to be provided when we
      actually deserialize them. Also changed the internal implementation
      to avoid copying API references into V8.
      
      R=petermarshall@chromium.org
      
      Bug: v8:6448
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: Iddb0465ff6e95020006d41b5e87614dce8f0140b
      Reviewed-on: https://chromium-review.googlesource.com/632098Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47649}
      8fb5000e
    • Michael Hablich's avatar
      Revert "[snapshot] Move builtins to dedicated snapshot area" · a588411e
      Michael Hablich authored
      This reverts commit 49e3bfd5.
      
      Reason for revert: Primary suspect for blocked roll: 759552
      
      Original change's description:
      > [snapshot] Move builtins to dedicated snapshot area
      > 
      > As a first step towards lazy builtin deserialization, this CL moves
      > builtins to their own dedicated area in the snapshot blob, physically
      > located after startup data and before context-specific data.
      > 
      > The startup- and partial serializers now serialize all seen builtins as
      > references, i.e. they only encode the relevant builtin id (taking care
      > to preserve special behavior around the interpreter trampoline and
      > CompileLazy). Builtins are later fully serialized by the
      > BuiltinSerializer. The separate blobs are finally glued together by
      > CreateSnapshotBlob.
      > 
      > Deserialization takes the same steps: when we see builtin reference
      > bytecodes before builtins have been deserialized, we push to a list of
      > deferred builtin references. After builtin deserialization, this list is
      > iterated and all builtin references are fixed up.
      > 
      > Bug: v8:6624
      > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      > Change-Id: Idee42fa9c92bdbe8d5b8c4b8bf3ca9dd39634004
      > Reviewed-on: https://chromium-review.googlesource.com/610225
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#47596}
      
      TBR=yangguo@chromium.org,mlippautz@chromium.org,jgruber@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:6624
      Change-Id: I9906c9ea15a623226b890f63bc65876a6f5203f8
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/638331Reviewed-by: 's avatarMichael Hablich <hablich@chromium.org>
      Commit-Queue: Michael Hablich <hablich@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47648}
      a588411e
  18. 25 Aug, 2017 1 commit
    • Jakob Gruber's avatar
      [snapshot] Move builtins to dedicated snapshot area · 49e3bfd5
      Jakob Gruber authored
      As a first step towards lazy builtin deserialization, this CL moves
      builtins to their own dedicated area in the snapshot blob, physically
      located after startup data and before context-specific data.
      
      The startup- and partial serializers now serialize all seen builtins as
      references, i.e. they only encode the relevant builtin id (taking care
      to preserve special behavior around the interpreter trampoline and
      CompileLazy). Builtins are later fully serialized by the
      BuiltinSerializer. The separate blobs are finally glued together by
      CreateSnapshotBlob.
      
      Deserialization takes the same steps: when we see builtin reference
      bytecodes before builtins have been deserialized, we push to a list of
      deferred builtin references. After builtin deserialization, this list is
      iterated and all builtin references are fixed up.
      
      Bug: v8:6624
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: Idee42fa9c92bdbe8d5b8c4b8bf3ca9dd39634004
      Reviewed-on: https://chromium-review.googlesource.com/610225Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47596}
      49e3bfd5
  19. 23 Aug, 2017 2 commits
  20. 22 Aug, 2017 3 commits