1. 23 Jun, 2021 1 commit
  2. 18 Aug, 2020 1 commit
  3. 27 Nov, 2019 1 commit
  4. 23 Aug, 2019 1 commit
  5. 20 Jun, 2017 1 commit
    • Igor Sheludko's avatar
      [parser] Improve propagation of SharedFunctionInfo::has_shared_name(). · 328afeeb
      Igor Sheludko authored
      The initial implementation did not work in certain cases.
      For example, in the following case 'f' didn't have a shared name while
      it should have had an empty shared name:
        var f = (function() { return function() { return 42; } }();
      
      The new implementation ensures that all anonymous functions have empty
      shared name and if any of them happen to be an object literal property
      value or an accessor function or a concise method then such a function
      is marked as having no shared name.
      
      Bug: v8:6459
      Change-Id: I0f936afce0c152d91b2b41c1dc475a5ed841eca0
      Reviewed-on: https://chromium-review.googlesource.com/538666Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46026}
      328afeeb
  6. 06 Jun, 2017 1 commit
    • Igor Sheludko's avatar
      [parser] Introduce SharedFunctionInfo::has_shared_name(). · 9a2c18f5
      Igor Sheludko authored
      Properly propagate the fact that the function has a statically known name from
      parser to SharedFunctionInfo objects. The empty string that has been set as
      name before this CL does not help to distinguish cases like:
        var o1 = { ''(){} };
        var o1 = { [foo()](){} };
      or
        var o2 = { get ''(){} };
        var o2 = { get [foo()](){} };
      
      This is a preliminary step for using different layouts for closure objects with
      and without computed names.
      
      TBR=bmeurer@chromium.org, marja@chromium.org
      
      Bug: v8:6459
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: I10afa6f4bda7881c3714711a75f720f83c1d875d
      Reviewed-on: https://chromium-review.googlesource.com/522073
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#45744}
      9a2c18f5
  7. 14 Dec, 2016 1 commit
  8. 07 Dec, 2016 1 commit
  9. 06 Sep, 2016 1 commit
    • bakkot's avatar
      [parser] Simplify parse-time function name inference for properties · 2aab10f5
      bakkot authored
      Move the code to perform function name inference for properties into
      parsing the properties themselves, instead of the containing object.
      
      This allows us to avoid unnecessary calls when parsing shorthand
      properties and methods and simplifies the logic in the remaining cases.
      
      Also fixes an edge case bug: inferring the name of the getter in
      `class { static get constructor(){} }`.
      
      Review-Url: https://codereview.chromium.org/2313723005
      Cr-Commit-Position: refs/heads/master@{#39222}
      2aab10f5
  10. 22 Jul, 2016 1 commit
    • jwolfe's avatar
      Adjust whitespace to make tests oblivious to --harmony-function-tostring · 3cfd80d6
      jwolfe authored
      See discussion in https://codereview.chromium.org/2156303002/#msg8
      
      With the new --harmony-function-tostring behavior, these tests would
      fail without this change. This change makes the tests pass regardless
      of whether or not --harmony-function-tostring is used.
      
      All of these changes are simply inserting a space after the "function"
      keyword to match the current function toString behavior. When
      --harmony-function-tostring is enabled, the toString behavior matches
      the spacing used in the function declaration. With the declaration
      matching the current formatting, the toString behavior becomes
      unaffected by --harmony-function-tostring.
      
      BUG=v8:4958
      LOG=n
      
      Review-Url: https://codereview.chromium.org/2161413002
      Cr-Commit-Position: refs/heads/master@{#37959}
      3cfd80d6
  11. 24 Jun, 2016 1 commit
  12. 10 Mar, 2016 1 commit
  13. 19 Feb, 2016 1 commit
    • adamk's avatar
      Don't reflect ES2015 Function name inference in Function.prototype.toString · cc2ea257
      adamk authored
      Various syntactic forms now cause functions to have names where they
      didn't before. Per the upcoming changes to the toString spec, only
      a name that was literally part of a function's expression or declaration
      is meant to be reflected in toString. This also happens to be the same
      set of names that V8 currently outputs (without the --harmony-function-name
      flag).
      
      This required distinguishing anonymous FunctionExpressions from other sorts
      of function definitions (like methods and getters/setters) in the AST, parser,
      and at runtime.
      
      The patch also takes the opportunity to remove one more argument (and enum)
      from FunctionLiteral, as well as adding a special factory method for the
      case of a FunctionLiteral representing toplevel or eval'd code.
      
      BUG=v8:4760
      LOG=n
      
      Review URL: https://codereview.chromium.org/1712833002
      
      Cr-Commit-Position: refs/heads/master@{#34132}
      cc2ea257
  14. 04 Feb, 2016 1 commit
    • adamk's avatar
      Support computed properties for ES2015 Function.name · 21c045a2
      adamk authored
      Adds a new runtime function, %DefineDataPropertyInLiteral, which
      takes a fifth argument specifying whether the property and value
      are syntactically such that the value is a function (or class)
      literal that should have its name set at runtime.
      
      The new runtime call also allows us to eliminate the now-redundant
      %DefineClassMethod runtime function.
      
      This should get much less ugly once we can desugar the "dynamic"
      part of object literals in the parser (but that work is currently
      blocked on having a performant way of desugaring literals).
      
      BUG=v8:3699, v8:3761
      LOG=n
      
      Review URL: https://codereview.chromium.org/1626423003
      
      Cr-Commit-Position: refs/heads/master@{#33756}
      21c045a2
  15. 27 Jan, 2016 1 commit
  16. 13 Jan, 2016 1 commit
  17. 06 Jan, 2016 1 commit
  18. 12 Dec, 2015 1 commit