1. 07 Apr, 2017 5 commits
    • jkummerow's avatar
      Reland "[snapshot] Move builtins generation into mksnapshot" · 5f9af1e7
      jkummerow authored
      and out of the main library. This saves about 5% of binary size
      (800KB on x64, 373KB on android_arm).
      
      Only the GN build is supported; the GYP build is maintained working
      but does not support the feature.
      
      Previously landed as 4782bc0d / r44412.
      
      BUG=v8:6055
      CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_nosnap_rel;
      
      Review-Url: https://codereview.chromium.org/2760233005
      Cr-Commit-Position: refs/heads/master@{#44489}
      5f9af1e7
    • Michael Achenbach's avatar
      Revert "[Interpreter] Move BinaryOp Smi transformation into BytecodeGenerator." · 084471ce
      Michael Achenbach authored
      This reverts commit d3e9aade.
      
      Reason for revert: Speculative for:
      https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug/builds/4449
      
      Bisect points to this CL.
      
      Original change's description:
      > [Interpreter] Move BinaryOp Smi transformation into BytecodeGenerator.
      > 
      > Perform the transformation to <BinaryOp>Smi for Binary ops which take Smi
      > literals in the BytecodeGenerator. This enables us to perform the
      > transformation for literals on either side for commutative operations, and
      > Avoids having to do the check on every bytecode in the peephole optimizer.
      > 
      > In the process, adds Smi bytecode variants for all binary operations, adding
      >  - MulSmi
      >  - DivSmi
      >  - ModSmi
      >  - BitwiseXorSmi
      >  - ShiftRightLogical
      > 
      > BUG=v8:6194
      > 
      > Change-Id: If1484252f5385c16957004b9cac8bfbb1f209219
      > Reviewed-on: https://chromium-review.googlesource.com/466246
      > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Reviewed-by: Igor Sheludko <ishell@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#44477}
      
      TBR=rmcilroy@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,mythria@chromium.org,ishell@chromium.org,v8-reviews@googlegroups.com
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:6194
      
      Change-Id: If57dbdbe40be77804bf437463b855d3167e2d473
      Reviewed-on: https://chromium-review.googlesource.com/471308Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44488}
      084471ce
    • Ross McIlroy's avatar
      [Interpreter] Remove nop elision from peephole and be smarter about emitting nops. · 8dc308d0
      Ross McIlroy authored
      Rather than doing nop elision in the peephole optimizer, be smarter about
      emitting nops for elided register transfers in the bytecode optimizer.
      
      BUG=v8:6194
      
      Change-Id: Ib1a7168a0d143e4f2da7c6d43080998793c30822
      Reviewed-on: https://chromium-review.googlesource.com/468929
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44479}
      8dc308d0
    • Ross McIlroy's avatar
      [Interpreter] Move BinaryOp Smi transformation into BytecodeGenerator. · d3e9aade
      Ross McIlroy authored
      Perform the transformation to <BinaryOp>Smi for Binary ops which take Smi
      literals in the BytecodeGenerator. This enables us to perform the
      transformation for literals on either side for commutative operations, and
      Avoids having to do the check on every bytecode in the peephole optimizer.
      
      In the process, adds Smi bytecode variants for all binary operations, adding
       - MulSmi
       - DivSmi
       - ModSmi
       - BitwiseXorSmi
       - ShiftRightLogical
      
      BUG=v8:6194
      
      Change-Id: If1484252f5385c16957004b9cac8bfbb1f209219
      Reviewed-on: https://chromium-review.googlesource.com/466246
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44477}
      d3e9aade
    • jarin's avatar
      [turbofan] Add type to the allocation operator. · e97b29a4
      jarin authored
      This gives us more precise type information, so we can avoid some type
      guards to refine the type information back.
      
      The motivation for this is to help escape analysis by not introducing
      redundant type guards (which escape analysis cannot handle yet even
      though it could and should do).
      
      Motivating example:
      
      In the example below, the out-of-object property array for properties
      fld5 and fld6 gets type Any when it is created by "o.fld5 = 5" (for
      object literals, we store 4 properties in-objeca, the rest goes out
      of object).
      
      When we run load elimination for the load the out-of-object property
      array (to store 6 into o.fld6), load elimination inserts TypeGuard to
      enforce the Type::Internal() type. This makes escape analysis bail out
      on this object, and we do not eliminate the object creation.
      
      function f() {
        var o = {};
        o.fld1 = 1;
        o.fld2 = 2;
        o.fld3 = 3;
        o.fld4 = 4;
        o.fld5 = 5;
        o.fld6 = 6;
      }
      
      f();
      f();
      %OptimizeFunctionOnNextCall(f);
      f();
      
      Review-Url: https://codereview.chromium.org/2797993006
      Cr-Commit-Position: refs/heads/master@{#44470}
      e97b29a4
  2. 06 Apr, 2017 2 commits
  3. 05 Apr, 2017 9 commits
    • kozyatinskiy's avatar
      Revert of [snapshot] Move builtins generation into mksnapshot (patchset #8... · ba9fc3d7
      kozyatinskiy authored
      Revert of [snapshot] Move builtins generation into mksnapshot (patchset #8 id:160001 of https://codereview.chromium.org/2760233005/ )
      
      Reason for revert:
      I think that this CL breaks chromium compilation on windows with clang (). All other CLs in the list looks trivial and don't change test/unittest/BUILD.gn.
      
      [42456/47924] CXX obj/v8/test/unittests/unittests/value-serializer-unittest.obj
      [42457/47924] LINK unittests.exe unittests.exe.pdb
      FAILED: unittests.exe unittests.exe.pdb
      E:/b/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./unittests.exe /PDB:./unittests.exe.pdb @./unittests.exe.rsp
      bitmap-unittest.obj : error LNK2019: unresolved external symbol "public: void __cdecl v8::internal::List<class v8::internal::AllocationObserver *,class v8::internal::FreeStoreAllocationPolicy>::Add(class v8::internal::AllocationObserver * const &,class v8::internal::FreeStoreAllocationPolicy)" (?Add@?$List@PEAVAllocationObserver@internal@v8@@VFreeStoreAllocationPolicy@23@@internal@v8@@QEAAXAEBQEAVAllocationObserver@23@VFreeStoreAllocationPolicy@23@@Z) referenced in function "public: virtual void __cdecl v8::internal::Space::AddAllocationObserver(class v8::internal::AllocationObserver *)" (?AddAllocationObserver@Space@internal@v8@@UEAAXPEAVAllocationObserver@23@@Z)
      
      slot-set-unittest.obj : error LNK2001: unresolved external symbol "public: void __cdecl v8::internal::List<class v8::internal::AllocationObserver *,class v8::internal::FreeStoreAllocationPolicy>::Add(class v8::internal::AllocationObserver * const &,class v8::internal::FreeStoreAllocationPolicy)" (?Add@?$List@PEAVAllocationObserver@internal@v8@@VFreeStoreAllocationPolicy@23@@internal@v8@@QEAAXAEBQEAVAllocationObserver@23@VFreeStoreAllocationPolicy@23@@Z)
      
      bitmap-unittest.obj : error LNK2019: unresolved external symbol "public: bool __cdecl v8::internal::List<class v8::internal::AllocationObserver *,class v8::internal::FreeStoreAllocationPolicy>::RemoveElement(class v8::internal::AllocationObserver * const &)" (?RemoveElement@?$List@PEAVAllocationObserver@internal@v8@@VFreeStoreAllocationPolicy@23@@internal@v8@@QEAA_NAEBQEAVAllocationObserver@23@@Z) referenced in function "public: virtual void __cdecl v8::internal::Space::RemoveAllocationObserver(class v8::internal::AllocationObserver *)" (?RemoveAllocationObserver@Space@internal@v8@@UEAAXPEAVAllocationObserver@23@@Z)
      
      slot-set-unittest.obj : error LNK2001: unresolved external symbol "public: bool __cdecl v8::internal::List<class v8::internal::AllocationObserver *,class v8::internal::FreeStoreAllocationPolicy>::RemoveElement(class v8::internal::AllocationObserver * const &)" (?RemoveElement@?$List@PEAVAllocationObserver@internal@v8@@VFreeStoreAllocationPolicy@23@@internal@v8@@QEAA_NAEBQEAVAllocationObserver@23@@Z)
      
      ./unittests.exe : fatal error LNK1120: 2 unresolved externals
      
      Original issue's description:
      > [snapshot] Move builtins generation into mksnapshot
      >
      > and out of the main library. This saves about 5% of binary size
      > (800KB on x64, 373KB on android_arm).
      >
      > Only the GN build is supported; the GYP build is maintained working
      > but does not support the feature.
      >
      > BUG=v8:6055
      > CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_nosnap_rel;
      >
      > Review-Url: https://codereview.chromium.org/2760233005
      > Cr-Commit-Position: refs/heads/master@{#44412}
      > Committed: https://chromium.googlesource.com/v8/v8/+/4782bc0df89ceb127e38017b8dcf531222a0e966
      
      TBR=jgruber@chromium.org,rmcilroy@chromium.org,machenbach@chromium.org,jkummerow@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:6055
      
      Review-Url: https://codereview.chromium.org/2803903002
      Cr-Commit-Position: refs/heads/master@{#44422}
      ba9fc3d7
    • Ross McIlroy's avatar
      [Interpreter] Move ToBoolean elision in BytecodeGenerator. · 7bedd111
      Ross McIlroy authored
      Move the ToBoolean elision in the BytecodeGenerator instead of the
      peephole optimizer. Adds a TypeHint mechanism to the ExpressionResult
      to enable passing of type hints through the ast visitor.
      
      BUG=v8:6194
      
      Change-Id: Ic55506ba11b213f7459250004d3f18cab04ee9b3
      Reviewed-on: https://chromium-review.googlesource.com/467208
      Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44415}
      7bedd111
    • jkummerow's avatar
      [snapshot] Move builtins generation into mksnapshot · 4782bc0d
      jkummerow authored
      and out of the main library. This saves about 5% of binary size
      (800KB on x64, 373KB on android_arm).
      
      Only the GN build is supported; the GYP build is maintained working
      but does not support the feature.
      
      BUG=v8:6055
      CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_nosnap_rel;
      
      Review-Url: https://codereview.chromium.org/2760233005
      Cr-Commit-Position: refs/heads/master@{#44412}
      4782bc0d
    • Wiktor Garbacz's avatar
      [compiler-dispatcher] Use an integer job id. · 4f8b7606
      Wiktor Garbacz authored
      It enables jobs without a SharedFunctionInfo.
      
      BUG=v8:6093
      
      Change-Id: I70e226638fdb5b3a0634cc4437d128771c838eee
      Reviewed-on: https://chromium-review.googlesource.com/468966Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarJochen Eisinger <jochen@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
      Cr-Commit-Position: refs/heads/master@{#44411}
      4f8b7606
    • Clemens Hammacher's avatar
      [wasm] [decoder] Templatize decode function for unchecked decoding · eeaceccb
      Clemens Hammacher authored
      In the C++ wasm interpreter, we decode LEB encoded immediates each time
      we execute the respective instruction. The whole instruction sequence
      was validated before, thus we know that all integers are valid.
      This CL refactors several Decoder methods to allow for either checked
      or unchecked decoding. In the checked case, an error is set if a check
      fails, in the unchecked case, a DCHECK will fail.
      
      This improves performance of the interpreter by 20.5%.
      
      R=ahaas@chromium.org
      BUG=v8:5822
      
      Change-Id: If69efd4f6fbe19d84bfc2f4aa000f429a8e22bf5
      Reviewed-on: https://chromium-review.googlesource.com/468786
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44406}
      eeaceccb
    • Clemens Hammacher's avatar
      [wasm] [decoder] Merge checked_read_leb and consume_leb · 02b4d0e6
      Clemens Hammacher authored
      Both methods decoded a LEB128 encoded integer, but only consume_leb
      incremented the pc pointer accordingly.
      This CL implements consume_leb by using checked_read_leb.
      
      It also refactors a few things:
      1) It removes error_pt, which was only avaible in checked_read_leb.
      2) It renames the error method to errorf, since it receives a format
         string. This also avoids a name clash.
      3) It implements sign extension directly in checked_read_leb instead of
         doing this in the caller.
      
      R=ahaas@chromium.org
      BUG=v8:5822
      
      Change-Id: I8058f57418493861e5df26d4949041f6766d5138
      Reviewed-on: https://chromium-review.googlesource.com/467150
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44405}
      02b4d0e6
    • Michael Achenbach's avatar
      Revert "[compiler-dispatcher] Use an integer job id." · 0ed2f178
      Michael Achenbach authored
      This reverts commit 4bca9dc7.
      
      Reason for revert: Breaks mips builder:
      https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/8600
      
      Original change's description:
      > [compiler-dispatcher] Use an integer job id.
      > 
      > It enables jobs without a SharedFunctionInfo.
      > 
      > BUG=v8:6093
      > 
      > Change-Id: Icc5f01512c270a55349087d418b6be82ad5c6cb4
      > Reviewed-on: https://chromium-review.googlesource.com/467148
      > Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Jochen Eisinger <jochen@chromium.org>
      > Reviewed-by: Marja Hölttä <marja@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#44402}
      
      TBR=rmcilroy@chromium.org,marja@chromium.org,jochen@chromium.org,rmcilroy@google.com,wiktorg@google.com
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:6093
      
      Change-Id: Ie8d26f4e2d42f67a1cfa91269e80e407ed3f0799
      Reviewed-on: https://chromium-review.googlesource.com/468887Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44404}
      0ed2f178
    • Wiktor Garbacz's avatar
      [compiler-dispatcher] Use an integer job id. · 4bca9dc7
      Wiktor Garbacz authored
      It enables jobs without a SharedFunctionInfo.
      
      BUG=v8:6093
      
      Change-Id: Icc5f01512c270a55349087d418b6be82ad5c6cb4
      Reviewed-on: https://chromium-review.googlesource.com/467148
      Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarJochen Eisinger <jochen@chromium.org>
      Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44402}
      4bca9dc7
    • mlippautz's avatar
      Reland of [heap] Fix CompactionSpace test and move to unittests · a0655790
      mlippautz authored
      This reverts commit eddf90c4.
      
      BUG=chromium:651354
      
      Review-Url: https://codereview.chromium.org/2792063004
      Cr-Commit-Position: refs/heads/master@{#44398}
      a0655790
  4. 04 Apr, 2017 2 commits
  5. 03 Apr, 2017 1 commit
    • rmcilroy's avatar
      [Interpreter] Optimize code of the form 'if (x === undefined)'. · f4f58e31
      rmcilroy authored
      Translates code of the form 'if (x === undefined)' into the JumpIfUndefined
      bytecode, and similarly for comparisons with null. Also adds bytecodes for
      JumpIfNotUndefined / Null.
      
      Moves the peephole optimization for CompareUndefined out of the peephole
      optimizer and into the BytecodeGenerator, having the side-effect of enabling
      it for comparisons with undefined on both side of the compare operation.
      
      BUG=v8:6107
      
      Review-Url: https://codereview.chromium.org/2793923002
      Cr-Commit-Position: refs/heads/master@{#44341}
      f4f58e31
  6. 30 Mar, 2017 1 commit
  7. 29 Mar, 2017 2 commits
    • Caitlin Potter's avatar
      [async-iteration] implement AsyncGenerator · bf463c4d
      Caitlin Potter authored
      - Introduce new struct AsyncGeneratorRequest, which holds
        information pertinent to resuming execution of an
        AsyncGenerator, such as the Promise associated with the async
        generator request. It is intended to be used as a singly
        linked list, and holds a pointer to the next item in te queue.
      
      - Introduce JSAsyncGeneratorObject (subclass of
        JSGeneratorObject), which includes several new internal fields
        (`queue` which contains a singly linked list of
        AsyncGeneratorRequest objects, and `await_input` which
        contains the sent value from an Await expression (This is
        necessary to prevent function.sent (used by yield*) from
        having the sent value observably overwritten during
        execution).
      
      - Modify SuspendGenerator to accept a set of Flags, which
        indicate whether the suspend is for a Yield or Await, and
        whether it takes place on an async generator or ES6
        generator.
      
      - Introduce interpreter intrinsics and TF intrinsic lowering for
        accessing the await input of an async generator
      
      - Modify the JSGeneratorStore operator to understand whether or
        not it's suspending for a normal yield, or an AsyncGenerator
        Await. This ensures appropriate registers are stored.
      
      - Add versions of ResumeGeneratorTrampoline which store the
        input value in a different field depending on wether it's an
        AsyncGenerator Await resume, or an ordinary resume. Also modifies
        whether debug code will assert that the generator object is a
        JSGeneratorObject or a JSAsyncGeneratorObject depending on the
        resume type.
      
      BUG=v8:5855
      R=bmeurer@chromium.org, rmcilroy@chromium.org, jgruber@chromium.org,
      littledan@chromium.org, neis@chromium.org
      TBR=marja@chromium.org
      
      Change-Id: I9d58df1d344465fc937fe7eed322424204497187
      Reviewed-on: https://chromium-review.googlesource.com/446961
      Commit-Queue: Caitlin Potter <caitp@igalia.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44240}
      bf463c4d
    • Jochen Eisinger's avatar
      Never freeze/seal/preventExtensions objects with interceptors · f8deca1c
      Jochen Eisinger authored
      BUG=v8:6163
      R=verwaest@chromium.org
      
      Change-Id: Ieaec78c806cc3d459488a8491e77b7b5a8047079
      Reviewed-on: https://chromium-review.googlesource.com/461903
      Commit-Queue: Jochen Eisinger <jochen@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44228}
      f8deca1c
  8. 28 Mar, 2017 4 commits
  9. 27 Mar, 2017 2 commits
  10. 25 Mar, 2017 1 commit
    • kschimpf's avatar
      Hide WasmModule.origin field behind readable accessors. · 98ed1f9c
      kschimpf authored
      Besides adding accessors get_origin() and set_origin(), it creates easier test
      accessors is_wasm() and is_asm_js().
      
      This allows the possibility of caching boolean flags for is_wasm() and
      is_asm_js() without having to change any code except for the files containing
      the class definition for WasmModule.
      
      BUG= v8:6152
      R=bbudge@chromium.org,mtrofin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2771803005
      Cr-Commit-Position: refs/heads/master@{#44130}
      98ed1f9c
  11. 22 Mar, 2017 1 commit
  12. 21 Mar, 2017 3 commits
    • mtrofin's avatar
      Reland of [wasm] Transferrable modules (patchset #1 id:1 of... · 9dfa4639
      mtrofin authored
      Reland of [wasm] Transferrable modules (patchset #1 id:1 of https://codereview.chromium.org/2762163002/ )
      
      Reason for revert:
      Temporarily disabled tests on chromium side (https://codereview.chromium.org/2764933002)
      
      Original issue's description:
      > Revert of [wasm] Transferrable modules (patchset #13 id:280001 of https://codereview.chromium.org/2748473004/ )
      >
      > Reason for revert:
      > Breaks layout tests:
      > https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14312
      >
      > See https://github.com/v8/v8/wiki/Blink-layout-tests
      >
      > Original issue's description:
      > > [wasm] Transferrable modules
      > >
      > > We want to restrict structured cloning in Chrome to:
      > > - postMessage senders and receivers that are co-located
      > > in the same process
      > > - indexedDB (just https).
      > >
      > > For context, on the Chrome side, we will achieve the postMessage part
      > > by using a mechanism similar to transferrables: the
      > > SerializedScriptValue will have a list of wasm modules, separate from
      > > the serialized data stream; and this list won't be copied cross
      > > process boundaries. The IDB part is achieved by explicitly opting in
      > > reading/writing to the serialization stream. To block attack vectors
      > > in IPC cases, the default for deserialization will be to expect data
      > > in the wasm transfers list.
      > >
      > > This change is the V8 side necessary to enabling this design. We
      > > introduce TransferrableModule, an opaque datatype exposed to the
      > > embedder. Internally, TransferrableModules are just serialized data,
      > > because we don't have a better mechanism, at the moment, for
      > > de-contextualizing/re-contextualizing wasm modules (wrt Isolate and
      > > Context).
      > >
      > > The chrome defaults will be implemented in the
      > > serialization/deserialization delegates on that side. For the v8 side
      > > of things, in the absence of a serialization delegate, the V8
      > > serializer will write to serialization stream. In the absence of a
      > > deserialization delegate, the deserializer won't work. This asymmetry
      > > is intentional - it communicates to the embedder the need to make a
      > > policy decision, otherwise wasm serialization/deserialization won't
      > > work "out of the box".
      > >
      > > BUG=v8:6079
      > >
      > > Review-Url: https://codereview.chromium.org/2748473004
      > > Cr-Commit-Position: refs/heads/master@{#43955}
      > > Committed: https://chromium.googlesource.com/v8/v8/+/99743ad460ea5b9795ba9d70a074e75d7362a3d1
      >
      > TBR=jbroman@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org
      > # Skipping CQ checks because original CL landed less than 1 days ago.
      > NOPRESUBMIT=true
      > NOTREECHECKS=true
      > NOTRY=true
      > BUG=v8:6079
      >
      > Review-Url: https://codereview.chromium.org/2762163002
      > Cr-Commit-Position: refs/heads/master@{#43981}
      > Committed: https://chromium.googlesource.com/v8/v8/+/e538b70e1a45289dfe0fa9789563f023a5e9c22b
      
      TBR=jbroman@chromium.org,bradnelson@chromium.org,machenbach@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:6079
      
      Review-Url: https://codereview.chromium.org/2762273002
      Cr-Commit-Position: refs/heads/master@{#43994}
      9dfa4639
    • machenbach's avatar
      Revert of [wasm] Transferrable modules (patchset #13 id:280001 of... · e538b70e
      machenbach authored
      Revert of [wasm] Transferrable modules (patchset #13 id:280001 of https://codereview.chromium.org/2748473004/ )
      
      Reason for revert:
      Breaks layout tests:
      https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14312
      
      See https://github.com/v8/v8/wiki/Blink-layout-tests
      
      Original issue's description:
      > [wasm] Transferrable modules
      >
      > We want to restrict structured cloning in Chrome to:
      > - postMessage senders and receivers that are co-located
      > in the same process
      > - indexedDB (just https).
      >
      > For context, on the Chrome side, we will achieve the postMessage part
      > by using a mechanism similar to transferrables: the
      > SerializedScriptValue will have a list of wasm modules, separate from
      > the serialized data stream; and this list won't be copied cross
      > process boundaries. The IDB part is achieved by explicitly opting in
      > reading/writing to the serialization stream. To block attack vectors
      > in IPC cases, the default for deserialization will be to expect data
      > in the wasm transfers list.
      >
      > This change is the V8 side necessary to enabling this design. We
      > introduce TransferrableModule, an opaque datatype exposed to the
      > embedder. Internally, TransferrableModules are just serialized data,
      > because we don't have a better mechanism, at the moment, for
      > de-contextualizing/re-contextualizing wasm modules (wrt Isolate and
      > Context).
      >
      > The chrome defaults will be implemented in the
      > serialization/deserialization delegates on that side. For the v8 side
      > of things, in the absence of a serialization delegate, the V8
      > serializer will write to serialization stream. In the absence of a
      > deserialization delegate, the deserializer won't work. This asymmetry
      > is intentional - it communicates to the embedder the need to make a
      > policy decision, otherwise wasm serialization/deserialization won't
      > work "out of the box".
      >
      > BUG=v8:6079
      >
      > Review-Url: https://codereview.chromium.org/2748473004
      > Cr-Commit-Position: refs/heads/master@{#43955}
      > Committed: https://chromium.googlesource.com/v8/v8/+/99743ad460ea5b9795ba9d70a074e75d7362a3d1
      
      TBR=jbroman@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:6079
      
      Review-Url: https://codereview.chromium.org/2762163002
      Cr-Commit-Position: refs/heads/master@{#43981}
      e538b70e
    • neis's avatar
      [compiler] Add yet more tests for monotonicity of typing. · abfab008
      neis authored
      R=jarin@chromium.org
      BUG=
      
      Review-Url: https://codereview.chromium.org/2759133002
      Cr-Commit-Position: refs/heads/master@{#43966}
      abfab008
  13. 20 Mar, 2017 2 commits
    • mtrofin's avatar
      [wasm] Transferrable modules · 99743ad4
      mtrofin authored
      We want to restrict structured cloning in Chrome to:
      - postMessage senders and receivers that are co-located
      in the same process
      - indexedDB (just https).
      
      For context, on the Chrome side, we will achieve the postMessage part
      by using a mechanism similar to transferrables: the
      SerializedScriptValue will have a list of wasm modules, separate from
      the serialized data stream; and this list won't be copied cross
      process boundaries. The IDB part is achieved by explicitly opting in
      reading/writing to the serialization stream. To block attack vectors
      in IPC cases, the default for deserialization will be to expect data
      in the wasm transfers list.
      
      This change is the V8 side necessary to enabling this design. We
      introduce TransferrableModule, an opaque datatype exposed to the
      embedder. Internally, TransferrableModules are just serialized data,
      because we don't have a better mechanism, at the moment, for
      de-contextualizing/re-contextualizing wasm modules (wrt Isolate and
      Context).
      
      The chrome defaults will be implemented in the
      serialization/deserialization delegates on that side. For the v8 side
      of things, in the absence of a serialization delegate, the V8
      serializer will write to serialization stream. In the absence of a
      deserialization delegate, the deserializer won't work. This asymmetry
      is intentional - it communicates to the embedder the need to make a
      policy decision, otherwise wasm serialization/deserialization won't
      work "out of the box".
      
      BUG=v8:6079
      
      Review-Url: https://codereview.chromium.org/2748473004
      Cr-Commit-Position: refs/heads/master@{#43955}
      99743ad4
    • Jochen Eisinger's avatar
      Relax conditions in compiler dispatcher test · 515c7a4e
      Jochen Eisinger authored
      Just ensure that all background and foreground tasks finished, then we
      should be in a defined state
      
      BUG=v8:6069
      R=rmcilroy@chromium.org
      
      Change-Id: Ie5bd11c61402dccb2c65cb8fe57fd1c0f550e9a7
      Reviewed-on: https://chromium-review.googlesource.com/456418Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Jochen Eisinger <jochen@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#43926}
      515c7a4e
  14. 17 Mar, 2017 4 commits
  15. 16 Mar, 2017 1 commit
    • bradnelson's avatar
      [wasm][asm.js] Adding custom asm.js lexer. · 4c3217e1
      bradnelson authored
      Adding a custom lexer for asm.js parsing.
      It takes advantage of a number of asm.js properties to simply things:
      * Assumes 'use asm' is the only string.
      * Does not handle unicode for now (tools don't emit it).
      * Combines global + local string table with lexer.
      
      R=marja@chromium.org,vogelheim@chromium.org,kschimpf@chromium.org
      
      BUG=v8:4203
      BUG=v8:6090
      
      Review-Url: https://codereview.chromium.org/2751693002
      Cr-Commit-Position: refs/heads/master@{#43874}
      4c3217e1