1. 30 Jun, 2017 21 commits
    • Jaime Bernardo's avatar
      [build] Set MSVS .obj folders in gyp for v8_base · 3bef2af6
      Jaime Bernardo authored
      Building on Windows with gyp fails depending on the result from
      sharding the src/v8.gyp:v8_base target. If two source files with the
      same name are in the same shard, their output object file path would
      conflict with one another. One example of this conflict is v8_base's
      runtime/runtime.cc and the V8 inspector's protocol/Runtime.cpp that
      is generated at build time, for which the files runtime.obj and
      Runtime.obj would be created, but MSVS overwrites one of them with
      the other.
      
      Dividing the .obj output path by the original source's extension
      prevents this overwrite.
      
      Refs: https://github.com/nodejs/node/pull/13959
      Bug: 
      Change-Id: I158e6178f2511297899ee50ea159f574916f903f
      Reviewed-on: https://chromium-review.googlesource.com/556599Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46354}
      3bef2af6
    • Andreas Haas's avatar
      Revert "[wasm] Run foreground compilation tasks as normal tasks" · 89154bf6
      Andreas Haas authored
      This reverts commit 1520a851.
      
      Reason for revert: This CL does not do what it should. All tasks which access the isolate have to be cancelable to guarantee that the isolate still exists when the task is executed. Foreground compilation tasks access the isolate, so they cannot be just normal tasks.
      
      Original change's description:
      > [wasm] Run foreground compilation tasks as normal tasks
      > 
      > This CL makes foreground compilation tasks normal (i.e. not cancelable)
      > again, because otherwise a deadlock can happen. I think the reason why
      > the foreground tasks were cancelable was to make sure that all tasks
      > either finish correctly or get canceled. However, since the isolate can
      > only shut down on the main thread, this means that the foreground task
      > should have already finished when the isolate shuts down, or it should
      > not have started at all. I reordered the deletion of the AsyncCompileJob
      > though to make sure that an AsyncCompileJob is removed from
      > CompilationManager before its promise is resolved.
      > 
      > Here is the deadlock: The JS code which is executed after a promise is
      > resolved is executed within the task which resolves the promise. In case
      > of async compilation this means that some JS code is executed within a
      > CompileTask. In JS, the shutdown of the isolate can be triggered. During
      > the shutdown of the isolate, the CancelableTaskManager waits for all
      > registered cancelable tasks to complete, including the CompileTask of
      > async compilation. This means that the CancelableTaskManager waits for
      > itself to finish, which is a deadlock.
      > 
      > R=​clemensh@chromium.org, mtrofin@chromium.org
      > 
      > Change-Id: I9f8c7fb2cfc5b9bfc53c761010b1590293bb82c9
      > Reviewed-on: https://chromium-review.googlesource.com/554733
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
      > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46343}
      
      TBR=mtrofin@chromium.org,ahaas@chromium.org,clemensh@chromium.org
      
      Change-Id: I60fab90b46d70c703d827816503e7e23b8c50251
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/558284Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46353}
      89154bf6
    • Andreas Haas's avatar
      Revert "[wasm] Update spec tests" · bfbabce1
      Andreas Haas authored
      This CL landed on top of another CL which I want to revert.
      
      This reverts commit 27b0d6a9.
      
      Reason for revert: <INSERT REASONING HERE>
      
      Original change's description:
      > [wasm] Update spec tests
      > 
      > Update the spec tests in v8 to the most recent version.
      > 
      > R=​rossberg@chromium.org
      > CC=titzer@chromium.org
      > 
      > Change-Id: Ib4e809c20150502b131a2c0b68fdb2ede1d5f85f
      > Reviewed-on: https://chromium-review.googlesource.com/552155
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Reviewed-by: Andreas Rossberg <rossberg@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46346}
      
      TBR=mstarzinger@chromium.org,rossberg@chromium.org,ahaas@chromium.org
      
      Change-Id: I82e4a2887bcb867d3572b78c36a20adc05df0903
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/558040Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46352}
      bfbabce1
    • jgruber's avatar
      [coverage] Handle deleted coverage infos · 547c5d32
      jgruber authored
      It can happen that coverage infos for a function containing
      IncBlockCounter bytecodes can be deleted (e.g. by switching to
      best-effort coverage). Handle this case correctly in the IncBlockCounter
      runtime function.
      
      BUG=v8:6000
      
      Change-Id: I49b9f52822661150d55410d6b173b3929adf4af2
      Reviewed-on: https://chromium-review.googlesource.com/558039
      Commit-Queue: Jakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46351}
      547c5d32
    • Michael Achenbach's avatar
      Revert "[wasm] Allow the initialization of a single compilation unit" · fa4314da
      Michael Achenbach authored
      This reverts commit ca931562.
      
      Reason for revert: tsan:
      https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/16007
      
      Original change's description:
      > [wasm] Allow the initialization of a single compilation unit
      > 
      > This CL adds a new function {InitializeCompilationUnit} to initialize
      > a single compilation unit and not just all compilation units at once.
      > This is necessary for streaming compilation eventually. This also
      > required some refactoring on how the working queue for compilation units
      > works. Previously the synchronization was done with an atomic counter,
      > now it is done with a lock. Note that the code to finish compilation
      > of a module still only works if the working queue gets only empty when
      > all work is done. I plan to change this in a different CL.
      > 
      > Since the code would not be tested without streaming compilation, I added
      > an experimental flag and a test to test the new code.
      > 
      > R=​clemensh@chromium.org, mtrofin@chromium.org
      > 
      > Change-Id: I839c04fd78d1ea8e1db202f2cbed41c4c2cf4f28
      > Reviewed-on: https://chromium-review.googlesource.com/550096
      > Commit-Queue: Andreas Haas <ahaas@chromium.org>
      > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
      > Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#46348}
      
      TBR=mtrofin@chromium.org,ahaas@chromium.org,clemensh@chromium.org
      
      Change-Id: Ied6532f05463c0b78c8b8f5307d44640bcca8316
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/558224Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46350}
      fa4314da
    • Ulan Degenbaev's avatar
      Revert "[heap] Allow a minimum semi-space size of 512K." · f341bb0f
      Ulan Degenbaev authored
      This reverts commit 0d2ed6c3.
      
      The CL introduced perf regressions: crbug.com/735649.
      
      We are going to reland the CL in an isolated V8 roll to ensure
      that perf regressions are attributed correctly.
      
      Original commit message:
      > [heap] Allow a minimum semi-space size of 512K.
      > This CL also reduces the minimum semi-space size to 512K.
      > BUG=chromium:716032
      
      BUG=chromium:735649
      
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I1f1b08ca6853347c00070f000c309d839ff8a4bb
      Reviewed-on: https://chromium-review.googlesource.com/552541Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46349}
      f341bb0f
    • Andreas Haas's avatar
      [wasm] Allow the initialization of a single compilation unit · ca931562
      Andreas Haas authored
      This CL adds a new function {InitializeCompilationUnit} to initialize
      a single compilation unit and not just all compilation units at once.
      This is necessary for streaming compilation eventually. This also
      required some refactoring on how the working queue for compilation units
      works. Previously the synchronization was done with an atomic counter,
      now it is done with a lock. Note that the code to finish compilation
      of a module still only works if the working queue gets only empty when
      all work is done. I plan to change this in a different CL.
      
      Since the code would not be tested without streaming compilation, I added
      an experimental flag and a test to test the new code.
      
      R=clemensh@chromium.org, mtrofin@chromium.org
      
      Change-Id: I839c04fd78d1ea8e1db202f2cbed41c4c2cf4f28
      Reviewed-on: https://chromium-review.googlesource.com/550096
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46348}
      ca931562
    • Marja Hölttä's avatar
      [parser] Skipping inner funcs: Associate data to SharedFunctionInfo, not Script. · 937b5011
      Marja Hölttä authored
      This way, each lazy function needs to handle only the data relevant to
      itself. This reduced data handling overheads.
      
      Other changes:
      
      1) Don't deserialize the data; once it's on the heap, it can stay there. Lazy
      function compilation is only done in the main thread.
      
      2) Separate ProducedPreParsedScopeData and ConsumedPreParsedScopeData. It's clearer, because:
      
      - The data looks fundamentally different when we're producing it and when we're
        consuming it.
      
      - Cleanly separates the operations we can do in the "producing phase" and in the
        "consuming phase".
      
      Bug: v8:5516
      Change-Id: I6985a6621f71b348a55155724765624b5d5f7c33
      Reviewed-on: https://chromium-review.googlesource.com/528094
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46347}
      937b5011
    • Andreas Haas's avatar
      [wasm] Update spec tests · 27b0d6a9
      Andreas Haas authored
      Update the spec tests in v8 to the most recent version.
      
      R=rossberg@chromium.org
      CC=titzer@chromium.org
      
      Change-Id: Ib4e809c20150502b131a2c0b68fdb2ede1d5f85f
      Reviewed-on: https://chromium-review.googlesource.com/552155
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarAndreas Rossberg <rossberg@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46346}
      27b0d6a9
    • Ulan Degenbaev's avatar
      [heap] Avoid full GC for large heaps. · 52708b63
      Ulan Degenbaev authored
      BUG=chromium:738031
      
      Change-Id: I98d1015caadd7214a7076f7b39a4514bfd908061
      Reviewed-on: https://chromium-review.googlesource.com/555971Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46345}
      52708b63
    • Michael Lippautz's avatar
      [heap] Switch incremental marker to instance-based visitor · 6407a3c0
      Michael Lippautz authored
      Last marker to use the instance based visitors. Delete StaticMarkingVisitor.
      
      Bug: chromium:738368
      Change-Id: I7b5345805268aab277f2961c8598536dfa1a4eeb
      Reviewed-on: https://chromium-review.googlesource.com/556037Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46344}
      6407a3c0
    • Andreas Haas's avatar
      [wasm] Run foreground compilation tasks as normal tasks · 1520a851
      Andreas Haas authored
      This CL makes foreground compilation tasks normal (i.e. not cancelable)
      again, because otherwise a deadlock can happen. I think the reason why
      the foreground tasks were cancelable was to make sure that all tasks
      either finish correctly or get canceled. However, since the isolate can
      only shut down on the main thread, this means that the foreground task
      should have already finished when the isolate shuts down, or it should
      not have started at all. I reordered the deletion of the AsyncCompileJob
      though to make sure that an AsyncCompileJob is removed from
      CompilationManager before its promise is resolved.
      
      Here is the deadlock: The JS code which is executed after a promise is
      resolved is executed within the task which resolves the promise. In case
      of async compilation this means that some JS code is executed within a
      CompileTask. In JS, the shutdown of the isolate can be triggered. During
      the shutdown of the isolate, the CancelableTaskManager waits for all
      registered cancelable tasks to complete, including the CompileTask of
      async compilation. This means that the CancelableTaskManager waits for
      itself to finish, which is a deadlock.
      
      R=clemensh@chromium.org, mtrofin@chromium.org
      
      Change-Id: I9f8c7fb2cfc5b9bfc53c761010b1590293bb82c9
      Reviewed-on: https://chromium-review.googlesource.com/554733
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46343}
      1520a851
    • Camillo Bruni's avatar
      [runtime] Enable double-lazy boilerplate creation again · bbc89774
      Camillo Bruni authored
      This mostly reverts commit c503b805 but fixes
      an issue where literals would always be pretenured on first instantiation.
      
      As a cleanup we pass in a PretenureFlag instead of using the FeedbackVector as
      indicator.
      
      Bug: v8:6211
      Change-Id: Id328552620e33f5083519bcba1e24396d162d516
      Reviewed-on: https://chromium-review.googlesource.com/555670Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Camillo Bruni <cbruni@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46342}
      bbc89774
    • Igor Sheludko's avatar
      [runtime] Cleanup the way we create prototypes for builtin functions. · eeeae375
      Igor Sheludko authored
      Pass the_hole_value as a |prototype| to let the helper function create
      prototype object and properly wire it with the respective constructor
      function.
      
      Bug: v8:6459
      Change-Id: I85097c02c88f00a47e62321ee3e6a3bdf6b5bcf8
      Reviewed-on: https://chromium-review.googlesource.com/557799Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46341}
      eeeae375
    • Miran.Karic's avatar
      MIPS[64]: Optimize Neg_s and Neg_d macro instructions. · 7ecf8833
      Miran.Karic authored
      The CL adds optimizations for Neg_s and Neg_d macro instructions.
      
      BUG=
      
      Change-Id: I842480ac3195860a1a36dadcffb5dc560ca8f424
      Reviewed-on: https://chromium-review.googlesource.com/555131Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@imgtec.com>
      Commit-Queue: Miran Karić <Miran.Karic@imgtec.com>
      Cr-Commit-Position: refs/heads/master@{#46340}
      7ecf8833
    • bmeurer's avatar
      [turbofan] Replace uninitialized JSConstruct nodes with SOFT deopt. · fd24deb0
      bmeurer authored
      Similar to JSCall, we can also replace uninitialized JSConstruct nodes
      with SOFT deopts to ensure that we don't generate unnecessary dead code.
      This for example shows up in the hot parts of the Node event emitter
      currently where the generic code for handling events with 4 or more
      parameters might not have been run, but we still generate most of the
      code because the new Array call in the beginning is not turned into
      a SOFT deopt immediately.
      
      Drive-by-fix: Also refactor the BytecodeGraphBuilder's handling of
      Construct bytecodes a bit to reduce the amount of code duplication.
      
      BUG=v8:4551, v8:5267
      R=jarin@chromium.org
      
      Review-Url: https://codereview.chromium.org/2958253002
      Cr-Commit-Position: refs/heads/master@{#46339}
      fd24deb0
    • Leszek Swirski's avatar
      [parsing/runtime] Remove InitializeVarGlobal · 2b1eb978
      Leszek Swirski authored
      Change-Id: I2ee0ff9db1bbc8c17a1ad3dea1de1ad996895852
      Reviewed-on: https://chromium-review.googlesource.com/474807Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46338}
      2b1eb978
    • bmeurer's avatar
      [turbofan] Further optimize spread/apply with arguments/rest parameters. · 1c555714
      bmeurer authored
      Extend the use list check for the arguments object/rest parameters
      during apply/spread optimization to allow for more cases, such that
      even in code like
      
        function foo() {
          if (arguments.length === 1) return arguments[0];
          return bar.apply(this, arguments);
        }
      
      we don't need to materialize the arguments object. This obviously comes
      with a phase ordering problem, which we resolve by introducing a
      waitlist in the JSCallReducer, which contains the nodes that we should
      check again after all the other reductions are done, and which might
      then be reducible. This is not 100% ideal, but get's us closer to where
      we want to be, and it's crucial to speed up Node core, especially the
      event emitter.
      
      BUG=v8:4551,v8:5511, v8:5726
      R=petermarshall@chromium.org
      
      Review-Url: https://codereview.chromium.org/2956233002
      Cr-Commit-Position: refs/heads/master@{#46337}
      1c555714
    • Igor Sheludko's avatar
      [runtime] Cleanup js/prologue.js. · f79b3d4e
      Igor Sheludko authored
      This CL removes unused utils.InstallFunctions, utils.InstallGetter(),
      utils.SetFunctionName, utils.OverrideFunction and respective runtime
      functions (%FunctionSetSharedName and %FunctionRemovePrototype).
      
      This CL is one of a series of cleanup CL which are the preliminary steps for
      improving function closures creation.
      
      Bug: v8:6459
      Change-Id: I0fb5940ed628f0c1958f585411e2fca3e2038054
      Reviewed-on: https://chromium-review.googlesource.com/548037
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46336}
      f79b3d4e
    • Igor Sheludko's avatar
      [runtime] Cleanup native methods creation in js/weak-collection.js. · a4694a42
      Igor Sheludko authored
      This CL replaces usages of utils.InstallFunctions and utils.InstallGetter()
      with the DEFINE_METHOD* macros that ensure that the native function is
      created in proper form from the beginning. Thus the function will not
      require further reconfiguring like adding a computed name or removing of
      'prototype' property.
      
      This CL is one of a series of cleanup CL which are the preliminary steps for
      improving function closures creation.
      
      Bug: v8:6459
      Change-Id: If5b1733454f10aef5da7f335273c632e7eabb728
      Reviewed-on: https://chromium-review.googlesource.com/548077Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46335}
      a4694a42
    • v8-autoroll's avatar
      Update V8 DEPS. · e2862ab5
      v8-autoroll authored
      Rolling v8/build: https://chromium.googlesource.com/chromium/src/build/+log/d69be9e..259d849
      
      Rolling v8/third_party/catapult: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+log/3b76c88..6d102fd
      
      TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org
      
      Change-Id: I1b7208580b29364e168f185249c1ba2008ced3d0
      Reviewed-on: https://chromium-review.googlesource.com/557719Reviewed-by: 's avatarv8 autoroll <v8-autoroll@chromium.org>
      Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46334}
      e2862ab5
  2. 29 Jun, 2017 19 commits