1. 17 May, 2021 1 commit
  2. 06 May, 2021 1 commit
    • Fanchen Kong's avatar
      Collect receiver to feedback for prototype.apply · 519c82ce
      Fanchen Kong authored
      When a function is invoked by prototype.apply, it may undergo following transformation in the JSCallReducer:
      	receiver.apply(this, args) ->
      	this.receiver(...args) Since the new target (also the receiver of apply()) is not collected to the feedback slot, further speculative optimization on the new target is not available if the new target
      is not a heapconstant.
      
      With this CL, the receiver will be collected to the feedback instead of the target if the target is a prototype.apply. It may improve the performance of the following usecase by ~80%.
      
      function reduceArray(func, arr, r) {
          for (var i = 0, len = arr.length; i < len; i++) {
                  r = func.apply(null, r, arr[i]);
          }
          return r;
      }
      
      var a = 0; for (var i = 0; i < 10000000; i++) {
          a += reduceArray(Math.imul, [5,6,2,3,7,6,8,3,7,9,2,5,], 1);
      }
      console.log(a);
      
      This CL also improves the runTime score of JetStream2/richards-wasm by ~45% in default, ~60% with --turbo-inline-js-wasm-calls.
      
      Change-Id: I542eb8d3fcb592f4e0993af93ba1af70e89c3982
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639813
      Commit-Queue: Fanchen Kong <fanchen.kong@intel.com>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#74413}
      519c82ce
  3. 17 Feb, 2021 1 commit
  4. 05 Oct, 2020 1 commit
    • Sathya Gunasekaran's avatar
      [turboprop] Inline monomorphic map check · 2cf6ee0b
      Sathya Gunasekaran authored
      Instead of loading the map from the feedback vector for monomorphic
      access, this CL directly inlines the expected map constant as a static
      check.
      
      In case this static check fails, we call out to a builtin which performs
      additional dynamic map checks.
      
      There are several dynamic map checks performed by the builtin for various
      cases such as:
      (a) IC is monomorphic with a map that's different from the initial
      static map that we checked, in which case we perform another dynamic
      map check.
      (b) IC is monomorphic but incoming map is a deprecated map in which case
      we call out the runtime to migrate this incoming object to a new map and
      then try to handle it.
      (c) IC has now transitioned to polymorphic in which we use the old
      dynamic polymorphic checks to validate the map and handler.
      
      Bug: v8:10582, v8:9684
      Change-Id: Id87265ed513e4aef87b8e66c826afbf10f50a1d0
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2429034
      Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#70304}
      2cf6ee0b
  5. 12 May, 2020 3 commits
  6. 11 May, 2020 1 commit