1. 19 Dec, 2016 3 commits
  2. 16 Dec, 2016 1 commit
    • mstarzinger's avatar
      Introduce {ConstantElementsPair} struct for type safety. · 92b370ee
      mstarzinger authored
      This introduces an explicit struct for the communication channel between
      the {ArrayLiteral} AST node and the corresponding runtime methods. Those
      methods take a pair of {ElementsKind} as well as an array (can either be
      a FixedArray or a FixedDoubleArray) of constant values.
      
      For bonus points it also reduces the size of the involved heap object by
      one word (i.e. length field of FixedArray not needed anymore).
      
      R=mvstanton@chromium.org
      
      Review-Url: https://codereview.chromium.org/2581683003
      Cr-Commit-Position: refs/heads/master@{#41752}
      92b370ee
  3. 15 Dec, 2016 1 commit
    • mstarzinger's avatar
      Fix usage of literal cloning for large double arrays. · 6c620e53
      mstarzinger authored
      This fixes a corner case where the {FastCloneShallowArrayStub} was used
      for literals that are backed by a double backing store and would exceed
      limits for new-space allocations on 32-bit architectures. The stub in
      question does not support such literals, callers must use the runtime.
      Note that this fix is for Ignition as well as FullCodeGenerator.
      
      R=rmcilroy@chromium.org
      TEST=mjsunit/regress/regress-crbug-672792
      BUG=chromium:672792
      
      Review-Url: https://codereview.chromium.org/2570843002
      Cr-Commit-Position: refs/heads/master@{#41713}
      6c620e53
  4. 21 Nov, 2016 1 commit
  5. 14 Nov, 2016 3 commits
    • rmcilroy's avatar
      Only treat possible eval calls going through 'with' as special. · be9b820c
      rmcilroy authored
      This removes the POSSIBLY_EVAL_CALL call type, and instead uses OTHER_CALL
      or WITH_CALL to decide whether to do the special LOOKUP_SLOT_CALL runtime
      call to find the callee and possibly update the receiver with the with-object.
      This means that eval calls out of 'with' blocks can now just do a normal
      LdaLookupGlobalSlot operation, which can check the context chain for eval
      extentions and fast-path the lookup if none exist.
      
      BUG=661556
      
      Review-Url: https://codereview.chromium.org/2487483004
      Cr-Commit-Position: refs/heads/master@{#40965}
      be9b820c
    • verwaest's avatar
      Only treat lookup-slot-calls going through 'with' special · 733af7eb
      verwaest authored
      This replaces LOOKUP_SLOT_CALL with WITH_CALL, and relies on regular lookup-slot handling in variable load to support other lookup slots (variables resolved in the context of sloppy eval). This allows optimizations for such variable loads to kick in for calls as well. We only need special handling for function calls in the context of with, since it changes the receiver of the call from undefined/global to the with-object.
      
      This currently doesn't yet make it work for the direct eval call itself, since the POSSIBLY_EVAL_CALL flag is also used to deal with direct eval later.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2480253006
      Cr-Commit-Position: refs/heads/master@{#40962}
      733af7eb
    • yangguo's avatar
      Compiling an array literal should be context-independent. · 08f09ed7
      yangguo authored
      We are removing use of the debugger context. When the debugger triggers
      compilation, we may not have a context from which to create a JSArray.
      
      R=ishell@chromium.org
      BUG=chromium:664577
      
      Review-Url: https://codereview.chromium.org/2479123002
      Cr-Commit-Position: refs/heads/master@{#40956}
      08f09ed7
  6. 10 Nov, 2016 3 commits
  7. 25 Oct, 2016 1 commit
  8. 24 Oct, 2016 1 commit
    • adamk's avatar
      [full-codegen] Eliminate unnecessary hole checks for stores · 231c8ac0
      adamk authored
      Loads already used source position elimination to avoid unnecessary hole checks,
      but for reasons unknown stores did not. This CL corrects that, making full-codegen's
      hole elimination equivalent to ignition's.
      
      Also introduced a HoleCheckMode enum class to avoid more bool flags and updated
      VariableProxy and BytecodeGenerator appropriately.
      
      Review-Url: https://codereview.chromium.org/2441543005
      Cr-Commit-Position: refs/heads/master@{#40522}
      231c8ac0
  9. 20 Oct, 2016 1 commit
    • adamk's avatar
      [ignition] Eliminate hole checks where statically possible for loads and stores · 35a3ccbf
      adamk authored
      Move hole check logic from full-codegen into scope analysis, and store the
      "needs hole check" bit on VariableProxy. This makes it easy to re-use in
      any backend: it will be trivial to extend the use of this logic in, e.g.,
      full-codegen variable stores.
      
      While changing the signatures of the variable loading/storing methods in
      Ignition, I took the liberty of replacing the verb "Visit" with "Build", since these
      are not part of AST visiting.
      
      BUG=v8:5460
      
      Review-Url: https://chromiumcodereview.appspot.com/2411873004
      Cr-Commit-Position: refs/heads/master@{#40479}
      35a3ccbf
  10. 18 Oct, 2016 1 commit
    • bmeurer's avatar
      [ic] Unify CallIC feedback collection and handling. · 308788b3
      bmeurer authored
      Consistently collect CallIC feedback in fullcodegen and Ignition, even
      for possibly direct eval calls, that were treated specially so far, for
      no apparent reason. With the upcoming SharedFunctionInfo based CallIC
      feedback, we might be able to even inline certain direct eval calls, if
      they manage to hit the eval cache. More importantly, this patch
      simplifies the collection and dealing with CallIC feedback (and as a
      side effect fixes an inconsistency with feedback for super constructor
      calls).
      
      R=mvstanton@chromium.org, mythria@chromium.org
      BUG=v8:2206,v8:4280,v8:5267
      
      Review-Url: https://codereview.chromium.org/2426693002
      Cr-Commit-Position: refs/heads/master@{#40397}
      308788b3
  11. 17 Oct, 2016 2 commits
  12. 13 Oct, 2016 1 commit
  13. 07 Oct, 2016 4 commits
  14. 06 Oct, 2016 1 commit
  15. 30 Sep, 2016 1 commit
  16. 28 Sep, 2016 1 commit
  17. 26 Sep, 2016 5 commits
    • bmeurer's avatar
      Revert of [compiler] Properly guard the speculative optimizations for... · b9cdb630
      bmeurer authored
      Revert of [compiler] Properly guard the speculative optimizations for instanceof. (patchset #3 id:40001 of https://codereview.chromium.org/2370693002/ )
      
      Reason for revert:
      Tanks EarleyBoyer.
      
      Original issue's description:
      > [compiler] Properly guard the speculative optimizations for instanceof.
      >
      > Add a general feedback slot for instanceof similar to what we already have
      > for for-in, which basically has a fast (indicated by the uninitialized
      > sentinel) and a slow (indicated by the megamorphic sentinel) mode. Now
      > we can only take the fast path when the feedback slot says it hasn't
      > seen any funky inputs and nothing funky appeared in the prototype chain.
      > In the TurboFan code we also deoptimize whenever we see a funky object
      > (i.e. a proxy or an object that requires access checks) in the prototype
      > chain (similar to what Crankshaft already did).
      >
      > Drive-by-fix: Also make Crankshaft respect the mode and therefore
      > address the deopt loop in Crankshaft around instanceof.
      >
      > We might want to introduce an InstanceOfIC mechanism at some point and
      > track the map of the right-hand side.
      >
      > BUG=v8:5267
      > R=mvstanton@chromium.org
      >
      > Committed: https://crrev.com/a0484bc6116ebc2b855de87d862945e2ae07169b
      > Cr-Commit-Position: refs/heads/master@{#39718}
      
      TBR=mvstanton@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:5267
      
      Review-Url: https://codereview.chromium.org/2365223003
      Cr-Commit-Position: refs/heads/master@{#39736}
      b9cdb630
    • hablich's avatar
      Reland of VariableProxy: when cloning, don't even think about creating... · 43503288
      hablich authored
      Reland of VariableProxy: when cloning, don't even think about creating dangling references. (patchset #1 id:1 of https://codereview.chromium.org/2368303002/ )
      
      Reason for revert:
      wrong CL
      
      Original issue's description:
      > Revert of VariableProxy: when cloning, don't even think about creating dangling references. (patchset #1 id:1 of https://codereview.chromium.org/2368253002/ )
      >
      > Reason for revert:
      > Needed for  https://codereview.chromium.org/2373443003/
      >
      > Original issue's description:
      > > VariableProxy: when cloning, don't even think about creating dangling references.
      > >
      > > The code path for cloning resolved VariableProxys (into a different
      > > Zone) was never hit, but if it was, it would create a dangling
      > > reference, since the Variable would stay in the original Zone.
      > >
      > > Kudos to verwaest@ for finding this!
      > >
      > > R=verwaest@chromium.org
      > > BUG=
      > >
      > > Committed: https://crrev.com/fd429bdb9e70cb8c4f8a4bbef0806e008c60440c
      > > Cr-Commit-Position: refs/heads/master@{#39723}
      >
      > TBR=verwaest@chromium.org,marja@chromium.org
      > # Skipping CQ checks because original CL landed less than 1 days ago.
      > NOPRESUBMIT=true
      > NOTREECHECKS=true
      > NOTRY=true
      > BUG=
      >
      > Committed: https://crrev.com/8edf2905693a2b486a97a0547ec53bb552f7db15
      > Cr-Commit-Position: refs/heads/master@{#39726}
      
      TBR=verwaest@chromium.org,marja@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review-Url: https://codereview.chromium.org/2366373002
      Cr-Commit-Position: refs/heads/master@{#39728}
      43503288
    • hablich's avatar
      Revert of VariableProxy: when cloning, don't even think about creating... · 8edf2905
      hablich authored
      Revert of VariableProxy: when cloning, don't even think about creating dangling references. (patchset #1 id:1 of https://codereview.chromium.org/2368253002/ )
      
      Reason for revert:
      Needed for  https://codereview.chromium.org/2373443003/
      
      Original issue's description:
      > VariableProxy: when cloning, don't even think about creating dangling references.
      >
      > The code path for cloning resolved VariableProxys (into a different
      > Zone) was never hit, but if it was, it would create a dangling
      > reference, since the Variable would stay in the original Zone.
      >
      > Kudos to verwaest@ for finding this!
      >
      > R=verwaest@chromium.org
      > BUG=
      >
      > Committed: https://crrev.com/fd429bdb9e70cb8c4f8a4bbef0806e008c60440c
      > Cr-Commit-Position: refs/heads/master@{#39723}
      
      TBR=verwaest@chromium.org,marja@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=
      
      Review-Url: https://codereview.chromium.org/2368303002
      Cr-Commit-Position: refs/heads/master@{#39726}
      8edf2905
    • marja's avatar
      VariableProxy: when cloning, don't even think about creating dangling references. · fd429bdb
      marja authored
      The code path for cloning resolved VariableProxys (into a different
      Zone) was never hit, but if it was, it would create a dangling
      reference, since the Variable would stay in the original Zone.
      
      Kudos to verwaest@ for finding this!
      
      R=verwaest@chromium.org
      BUG=
      
      Review-Url: https://codereview.chromium.org/2368253002
      Cr-Commit-Position: refs/heads/master@{#39723}
      fd429bdb
    • bmeurer's avatar
      [compiler] Properly guard the speculative optimizations for instanceof. · a0484bc6
      bmeurer authored
      Add a general feedback slot for instanceof similar to what we already have
      for for-in, which basically has a fast (indicated by the uninitialized
      sentinel) and a slow (indicated by the megamorphic sentinel) mode. Now
      we can only take the fast path when the feedback slot says it hasn't
      seen any funky inputs and nothing funky appeared in the prototype chain.
      In the TurboFan code we also deoptimize whenever we see a funky object
      (i.e. a proxy or an object that requires access checks) in the prototype
      chain (similar to what Crankshaft already did).
      
      Drive-by-fix: Also make Crankshaft respect the mode and therefore
      address the deopt loop in Crankshaft around instanceof.
      
      We might want to introduce an InstanceOfIC mechanism at some point and
      track the map of the right-hand side.
      
      BUG=v8:5267
      R=mvstanton@chromium.org
      
      Review-Url: https://codereview.chromium.org/2370693002
      Cr-Commit-Position: refs/heads/master@{#39718}
      a0484bc6
  18. 22 Sep, 2016 1 commit
  19. 20 Sep, 2016 2 commits
    • mvstanton's avatar
      [TypeFeedbackVector] special ic slots for interpreter compare/binary ops. · b88d132f
      mvstanton authored
      Full code uses patching ICs for this feedback, and the interpreter uses
      the type feedback vector. It's a good idea to code the vector slots
      appropriately as ICs so that the runtime profiler can better gauge if
      the function is ready for tiering up from Ignition to TurboFan.
      
      As is, the feedback is stored in "general" slots which can't be
      characterized by the runtime profiler into feedback states.
      
      This CL addresses that problem. Note that it's also important to
      carefully exclude these slots from the profiler's consideration when
      determining if you want to optimize from Full code.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2342853002
      Cr-Commit-Position: refs/heads/master@{#39555}
      b88d132f
    • leszeks's avatar
      [base] Move hashmap allocator to a field · b42ecda5
      leszeks authored
      Moves the hashmap's allocator from being a parameter in the various
      hashmap functions, to being a field in the hashmap itself. This
      
      1. Protects against incorrectly passed allocators, and
      2. Cleans up the API so that e.g. callers don't have to store their
         allocator
      
      This is part of a wider set of changes discussed in:
      https://groups.google.com/forum/#!topic/v8-dev/QLsC0XPYLeM
      
      Review-Url: https://codereview.chromium.org/2345233003
      Cr-Commit-Position: refs/heads/master@{#39538}
      b42ecda5
  20. 19 Sep, 2016 1 commit
  21. 09 Sep, 2016 2 commits
  22. 06 Sep, 2016 1 commit
    • bakkot's avatar
      Split the AST representation of class properties from object properties. · 7bc200c7
      bakkot authored
      This introduces ClassLiteralProperty and a supertype LiteralProperty of
      it and ObjectLiteralProperty. It also splits the parsing of the two.
      This substiantially clarifies some logic, especially as classes
      continue to evolve, and is also about a 2% performance improvement to
      parsing either kind of property (since no work is wasted on logic
      only necessary for the other kind). Also, it saves a word on
      ObjectLiteralProperties.
      
      Review-Url: https://codereview.chromium.org/2302643002
      Cr-Commit-Position: refs/heads/master@{#39219}
      7bc200c7
  23. 02 Sep, 2016 2 commits
    • adamk's avatar
      Remove unnessary includes of parser.h · 6dd2bc20
      adamk authored
      This makes for slightly faster rebuilds when touching parser-base.h
      (which changes frequently!). Also takes care of an old TODO,
      moving CompileTimeValue into its own file under ast/, where it
      properly belongs.
      
      BUG=v8:5294
      
      Review-Url: https://codereview.chromium.org/2305883002
      Cr-Commit-Position: refs/heads/master@{#39141}
      6dd2bc20
    • mvstanton's avatar
      Forking the type system between Crankshaft & Turbofan. · 17e9e2f4
      mvstanton authored
      Our Type class has a semantic and representational dimension.
      Much code in src/ast, Crankshaft and Turbofan is based on it.
      Going forward in Turbofan we'd like to remove representational information
      entirely. To that end, new type AstType has been created to preserve
      existing behavior for the benefit of Crankshaft and the AST.
      
      BUG=
      
      Review-Url: https://codereview.chromium.org/2302283002
      Cr-Commit-Position: refs/heads/master@{#39135}
      17e9e2f4