1. 01 May, 2019 1 commit
  2. 11 Mar, 2019 1 commit
  3. 31 Jan, 2019 1 commit
  4. 17 Sep, 2018 1 commit
  5. 03 May, 2018 1 commit
  6. 18 Apr, 2018 1 commit
    • Christian O. Andersson's avatar
      [ignition] Optimizing Smi only comparisons · 894b95fe
      Christian O. Andersson authored
      There are various situations where we explicitly compare a SMI against
      another SMI (e.g., BuildIndexedJump). This is also a common pattern for
      generated code (e.g., comparing a loop variable with an integer). Instead
      of using the generic equality/strict-equality stub for this, which is
      expensive, this CL offers a simple comparison stub, repurposing the
      TestEqualStrictNoFeedback bytecode to TestReferenceEqual
      
      Bug: v8:5310
      Change-Id: Ib2b47cd24d5386cf0d20d3bd794776dc6e3a02a5
      Reviewed-on: https://chromium-review.googlesource.com/1007542Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Christian O. Andersson <cricke@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52655}
      894b95fe
  7. 16 Feb, 2018 1 commit
  8. 22 Dec, 2017 1 commit
  9. 28 Nov, 2017 3 commits
  10. 27 Nov, 2017 1 commit
    • Sathya Gunasekaran's avatar
      [class] Store class fields initializer on the constructor · 4ca9d843
      Sathya Gunasekaran authored
      Previously, the class fields initializer function was stored on a
      synthetic context allocated variable. This approach had sevaral
      problems:
      
      - We didn't know that class literal had fields until after we had
      completely parsed the class literal. This meant that we had to go back
      and fix up the scope of the constructor to have this synthetic
      variable. This resulted in mismatch between parser and preparsed scope
      data.
      
      - This synthetic variable could potentially resolve to an initializer
      of an outer class.
      
      For ex:
      class X extends Object {
        c = 1;
        constructor() {
          var t = () => {
            class P extends Object {
              constructor() {
                var t = () => { super(); };
                t();
              }
            }
            super();
          }
          t();
        }
      }
      
      In this the inner class P could access the outer class X's initiliazer
      function. We would have to maintain extra metadata to make sure this
      doesn't happen.
      
      Instead this new approach uses a private symbol to store the
      initializer function on the class constructor itself.
      
      For the base constructor case, we can simply check for a bit on the
      constructor function literal to see if we need to emit code that loads
      and calls this initializer function. Therefore, we don't pay the cost
      of loading this function in case there are no class fields.
      
      For the derived constructor case, there are two possiblities:
      (a) We are in a super() call directly in the derived constructor:
      
      In this case we can do a check similar to the base constructor check,
      we can check for a bit on the derived constructor and emit code for
      loading and calling the initializer function.
      
      This is usually the common case and we don't pay any cost for not using
      class fields.
      
      (b) We are in a super() call inside an arrow function in the derived
      constructor:
      
      In this case, we /always/ emit code to load and call the initializer
      function. If the function doesn't exist then we have undefined and we
      don't call anything. Otherwise we call the function.
      
      super() can't be called twice so even if we emit code to load and call
      the initializer function multiple times, it doesn't matter because it
      would have already been an error.
      
      Bug: v8:5367
      Change-Id: I7f77cd6493ff84cf0e430a8c1039bc9ac6941a88
      Reviewed-on: https://chromium-review.googlesource.com/781660
      Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#49628}
      4ca9d843