1. 14 Jun, 2019 1 commit
  2. 08 May, 2019 1 commit
  3. 03 May, 2019 2 commits
  4. 11 Feb, 2019 1 commit
  5. 14 Aug, 2018 1 commit
  6. 06 Oct, 2017 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Add support to inline new Array(n) calls. · 34de39bf
      Benedikt Meurer authored
      Make calls like
      
        new Array(n)
        new A(n)
      
      (where A is a subclass of Array) inlinable into TurboFan. We do this by
      speculatively checking that n is an unsigned integer that is not greater
      than JSArray::kInitialMaxFastElementArray, and then lowering the backing
      store allocation to a builtin call. The speculative optimization is
      either protected by the AllocationSite for the Array constructor
      invocation (if we have one), or by a newly introduced global protector
      cell that is used for Array constructor invocations that don't have an
      AllocationSite, i.e. the ones from Array#map, Array#filter, or from
      subclasses of Array.
      
      Next step will be to implement the backing store allocations inline in
      TurboFan, but that requires Loop support in the GraphAssembler, so it's
      done as a separate CL. This should further boost the performance.
      
      This boosts the ARES6 ML benchmark by up to 8% on the steady state,
      and also improves monomorphic Array#map calls by around 20-25% on the
      initial setup.
      
      Bug: v8:6399
      Tbr: ulan@chromium.org
      Change-Id: I7c8bdecf7c814ce52db6ee3051c3206a4f7d4bb6
      Reviewed-on: https://chromium-review.googlesource.com/704639
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#48348}
      34de39bf
  7. 10 Aug, 2017 1 commit
  8. 13 Jul, 2017 1 commit
  9. 10 Jul, 2017 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Widen the fast-path for JSCreateArray. · 1edb46cc
      Benedikt Meurer authored
      This improves the general Array constructor call performance (w/o
      usable AllocationSite feedback) in TurboFan by ~2x, i.e. for example
      invoking the Array constructor like this
      
        var a = Array.call(undefined, n);
      
      instead of
      
        var a = Array(n);
      
      such that the CallIC doesn't know that it's eventually calling the
      Array constructor.
      
      It also thus changes the single argument Array constructor to always
      return holey arrays. Previously the single argument case for the Array
      constructor was somehow trying to dynamically detect 0 and in that case
      returned a packed array instead of a holey one. That adds quite a lot
      of churn, and doesn't seem to be very useful, especially since this
      might lead to unnecessary feedback pollution later.
      
      R=mvstanton@chromium.org
      
      Bug: v8:2229, v8:5269, v8:6399
      Change-Id: I3d7cb9bd975ec0e491e3cdbcf1230185cfd1e3de
      Reviewed-on: https://chromium-review.googlesource.com/565721Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46538}
      1edb46cc
  10. 03 Jul, 2017 1 commit
    • Mathias Bynens's avatar
      [elements] Rename Has*Elements and Is*ElementsKind methods · 7915cf93
      Mathias Bynens authored
      Commit 26c00f4a improved the names of
      most FAST_* elements kinds in the enum. This patch updates the matching
      Has*Elements and Is*ElementsKind method names accordingly.
      
      - HasFastSmiElements => HasSmiElements
      - IsFastSmiElementsKind => IsSmiElementsKind
      - HasFastObjectElements => HasObjectElements
      - IsFastObjectElementsKind => IsObjectElementsKind
      - HasFastSmiOrObjectElements => HasSmiOrObjectElements
      - IsFastSmiOrObjectElementsKind => IsSmiOrObjectElementsKind
      - HasFastDoubleElements => HasDoubleElements
      - IsFastDoubleElementsKind => IsDoubleElementsKind
      - HasFastHoleyElements => HasHoleyElements
      - IsFastHoleyElementsKind => IsHoleyElementsKind
      
      Additionally, FastHoleyElementsUsage is renamed to HoleyElementsUsage.
      
      BUG=v8:6548
      
      Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
      Change-Id: Ie8f3d01eb43e909cbc6c372d88c5fbc4dfc2ac04
      Reviewed-on: https://chromium-review.googlesource.com/558356Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Commit-Queue: Mathias Bynens <mathias@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#46376}
      7915cf93
  11. 28 Apr, 2017 1 commit
  12. 18 Apr, 2017 1 commit
  13. 26 Jan, 2017 3 commits
  14. 06 Jul, 2016 1 commit
  15. 15 Apr, 2015 1 commit
    • mvstanton's avatar
      Array() in optimized code can create with wrong ElementsKind in corner cases. · 13459c1a
      mvstanton authored
      Calling new Array(JSObject::kInitialMaxFastElementArray) in optimized code
      makes a stub call that bails out due to the length. Currently, the bailout
      code a) doesn't have the allocation site, and b) wouldn't use it if it did
      because the length is perceived to be too high.
      
      This CL passes the allocation site to the stub call (rather than undefined),
      and alters the bailout code to utilize the feedback.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1086873003
      
      Cr-Commit-Position: refs/heads/master@{#27857}
      13459c1a
  16. 14 Apr, 2015 1 commit
  17. 28 Jul, 2014 1 commit
  18. 24 Jul, 2014 2 commits
  19. 18 Jul, 2014 1 commit
  20. 26 May, 2014 2 commits
  21. 22 May, 2014 1 commit
  22. 19 Mar, 2014 1 commit
    • mvstanton@chromium.org's avatar
      Pretenure call new support. · 535f3427
      mvstanton@chromium.org authored
      When FLAG_pretenure_call_new is on, we emit mementos on new object creation
      in full code, and consume the feedback in crankshaft. A key difference in the
      generated code for stubs is the allocation of an additional type vector slot for the
      CallNew AST node, which simplifies the CallConstructStub and CallFunctionStub
      considerably.
      
      Some performance tuning still needs to be addressed, therefore the flag is off at
      this moment, though fully functional. The goal is to remove the flag as soon as
      possible, which allows much code deletion (yay).
      
      R=hpayer@chromium.org
      
      Review URL: https://codereview.chromium.org/132963012
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      535f3427
  23. 17 Feb, 2014 2 commits
  24. 21 Jan, 2014 1 commit
  25. 07 Jan, 2014 1 commit
  26. 20 Dec, 2013 2 commits
  27. 14 Nov, 2013 1 commit
    • mvstanton@chromium.org's avatar
      Inline zero argument array constructor. · 3cf157b4
      mvstanton@chromium.org authored
      patch from issue 54583003 (dependent code).
      
      Zero arguments - very easy
      
      1 argument - three special cases:
        a) If length is a constant in valid array length range,
           no need to check it at runtime.
        b) respect DoNotInline feedback on the AllocationSite for
           cases that the argument is not a smi or is an integer
           with a length that should create a dictionary.
        c) if kind feedback is non-holey, and length is non-constant,
           we'd have to generate a lot of code to be correct.
           Don't inline this case.
      
      N arguments - one special case:
        a) If a deopt ever occurs because an input argument isn't
           compatible with the elements kind, then set the
           DoNotInline flag.
      
      BUG=
      R=verwaest@chromium.org
      
      Review URL: https://codereview.chromium.org/55933002
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      3cf157b4
  28. 22 Jul, 2013 1 commit
  29. 17 Jul, 2013 1 commit
  30. 28 Jun, 2013 1 commit
    • mvstanton@chromium.org's avatar
      Hydrogen array constructor cleanup and improvements · 83519ec8
      mvstanton@chromium.org authored
      * Cleanup of LCallNewArray::PrintDataTo() method
      * Created HCallNewArray::PrintDataTo()
      * Created many more tests in array-constructor-feedback.js
      * Removed redundant instructions in
        GenerateRecordCallTarget
      * Bugfix in CreateArrayDispatchOneArgument: on a call to
        new Array(0), we'd like to set the type feedback cell to
        a packed elements kind, but we shouldn't do it if the
        cell contains the megamorphic sentinel.
      * When used from crankshaft, ArrayConstructorStubs can
        avoid verifying that the function being called is the
        array function from the current native context, relying
        instead on the fact that crankshaft issues an
        HCheckFunction to protect the constructor call. (this
        new minor key is used in LCodeGen::DoCallNewArray(), and
        influences code generation in
        CodeStubGraphBuilderBase::BuildArrayConstructor()).
      * Optimization: the array constructor specialized for
        FAST_SMI_ELEMENTS can save some instructions by looking
        up the correct map on the passed in constructor, rather
        than indexing into the array of cached maps per element
        kind.
      
      BUG=
      R=danno@chromium.org
      
      Review URL: https://codereview.chromium.org/17091002
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      83519ec8
  31. 25 Jun, 2013 1 commit
  32. 13 Jun, 2013 1 commit
  33. 12 Jun, 2013 1 commit