1. 20 Sep, 2016 1 commit
    • 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
  2. 14 Sep, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Call frequencies for JSCallFunction and JSCallConstruct. · 0b8a6945
      bmeurer authored
      Extract the call counts from the type feedback vector during graph
      building (either via the AstGraphBuilder or the BytecodeGraphBuilder),
      and put them onto the JSCallFunction and JSCallConstruct operators,
      so that they work even across inlinine through .apply and .call (which
      was previously hacked by creating a temporary type feedback vector
      for those).
      
      The next logic step will be to make those call counts into real
      relative call frequencies (also during graph building), so that we
      can make inlining decisions that make sense for the function being
      optimized (where absolute values are misleading).
      
      R=jarin@chromium.org
      BUG=v8:5267,v8:5372
      
      Review-Url: https://codereview.chromium.org/2330883002
      Cr-Commit-Position: refs/heads/master@{#39400}
      0b8a6945
  3. 06 Sep, 2016 1 commit
  4. 05 Sep, 2016 1 commit
    • jochen's avatar
      Store the scope info in catch contexts · 9b6ff3a8
      jochen authored
      Since the extension field is already used for the catch name, store a
      ContextExtension there instead.
      
      In the future, this will allow for chaining ScopeInfos together, so we
      no longer need a context chain for lazy parsing / compilation.
      
      BUG=v8:5215
      R=bmeurer@chromium.org,neis@chromium.org,marja@chromium.org
      
      Review-Url: https://codereview.chromium.org/2302013002
      Cr-Commit-Position: refs/heads/master@{#39164}
      9b6ff3a8
  5. 29 Aug, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Remove special JSForInStep and JSForInDone. · 1915762c
      bmeurer authored
      These JavaScript operators were special hacks to ensure that we always
      operate on Smis for the magic for-in index variable, but this never
      really worked in the OSR case, because the OsrValue for the index
      variable didn't have the proper information (that we have for the
      JSForInPrepare in the non-OSR case).
      
      Now that we have loop induction variable analysis and binary operation
      hints, we can just use JSLessThan and JSAdd instead with appropriate
      Smi hints, which handle the OSR case by inserting Smi checks (that are
      always true). Thanks to OSR deconstruction and loop peeling these Smi
      checks will be hoisted so they don't hurt the OSR case too much.
      
      Drive-by-change: Rename the ForInDone bytecode to ForInContinue, since
      we have to lower it to JSLessThan to get the loop induction variable
      goodness.
      
      R=epertoso@chromium.org
      BUG=v8:5267
      
      Review-Url: https://codereview.chromium.org/2289613002
      Cr-Commit-Position: refs/heads/master@{#38968}
      1915762c
  6. 28 Aug, 2016 2 commits
  7. 26 Aug, 2016 1 commit
  8. 09 Aug, 2016 1 commit
  9. 16 Jun, 2016 1 commit
  10. 02 Jun, 2016 1 commit
    • jarin's avatar
      [turbofan] Initial version of number type feedback. · 216bcf9f
      jarin authored
      This introduces optimized number operations based on type feedback.
      
      Summary of changes:
      
      1. Typed lowering produces SpeculativeNumberAdd/Subtract for JSAdd/Subtract if
         there is suitable feedback. The speculative nodes are connected to both the
         effect chain and the control chain and they retain the eager frame state.
      
      2. Simplified lowering now executes in three phases:
        a. Propagation phase computes truncations by traversing the graph from uses to
           definitions until checkpoint is reached. It also records type-check decisions
           for later typing phase, and computes representation.
        b. The typing phase computes more precise types base on the speculative types (and recomputes
           representation for affected nodes).
        c. The lowering phase performs lowering and inserts representation changes and/or checks.
      
      3. Effect-control linearization lowers the checks to machine graphs.
      
      Notes:
      
      - SimplifiedLowering will be refactored to have handling of each operation one place and
        with clearer input/output protocol for each sub-phase. I would prefer to do this once
        we have more operations implemented, and the pattern is clearer.
      
      - The check operations (Checked<A>To<B>) should have some flags that would affect
        the kind of truncations that they can handle. E.g., if we know that a node produces
        a number, we can omit the oddball check in the CheckedTaggedToFloat64 lowering.
      
      - In future, we want the typer to reuse the logic from OperationTyper.
      
      BUG=v8:4583
      LOG=n
      
      Review-Url: https://codereview.chromium.org/1921563002
      Cr-Commit-Position: refs/heads/master@{#36674}
      216bcf9f
  11. 20 May, 2016 1 commit
  12. 18 May, 2016 1 commit
  13. 01 Apr, 2016 1 commit
  14. 08 Mar, 2016 1 commit
    • mstarzinger's avatar
      [turbofan] Thread through object boilerplate length. · f7934b64
      mstarzinger authored
      This adds the number of properties to be expected within the boilerplate
      object for object literals to the TurboFan IR. The reason is that this
      length can no longer be easily inferred from just the constants array.
      The length is potentially non-zero for empty object literals and might
      also diverge in the presence of constant functions or duplicate property
      names.
      
      For future safety and for symmetry reasons, the same change was applied
      to array literals as well, even though inferring the length from the
      constant elements is still possible there.
      
      R=verwaest@chromium.org
      BUG=chromium:593008
      LOG=n
      
      Review URL: https://codereview.chromium.org/1772803003
      
      Cr-Commit-Position: refs/heads/master@{#34594}
      f7934b64
  15. 17 Feb, 2016 2 commits
  16. 16 Feb, 2016 1 commit
  17. 11 Feb, 2016 1 commit
    • bmeurer's avatar
      [compiler] Sanitize entry points to LookupSlot access. · 4ff159bd
      bmeurer authored
      Add dedicated %LoadLookupSlot, %LoadLookupSlotInsideTypeof,
      %LoadLookupSlotForCall, %StoreLookupSlot_Sloppy and
      %StoreLookupSlot_Strict runtime entry points and use them
      appropriately in the various compilers. This way we can
      finally drop the machine operators from the JS graph level
      completely in TurboFan.
      
      Also drop the funky JSLoadDynamic operator from TurboFan,
      which was by now just a small wrapper around the runtime
      call to %LoadLookupSlot.
      
      R=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1683103002
      
      Cr-Commit-Position: refs/heads/master@{#33880}
      4ff159bd
  18. 08 Feb, 2016 1 commit
    • bmeurer's avatar
      [runtime] Optimize and unify rest parameters. · 3ef573e9
      bmeurer authored
      Replace the somewhat awkward RestParamAccessStub, which would always
      call into the runtime anyway with a proper FastNewRestParameterStub,
      which is basically based on the code that was already there for strict
      arguments object materialization. But for rest parameters we could
      optimize even further (leading to 8-10x improvements for functions with
      rest parameters), by fixing the internal formal parameter count:
      
      Every SharedFunctionInfo has a formal_parameter_count field, which
      specifies the number of formal parameters, and is used to decide whether
      we need to create an arguments adaptor frame when calling a function
      (i.e. if there's a mismatch between the actual and expected parameters).
      Previously the formal_parameter_count included the rest parameter, which
      was sort of unfortunate, as that meant that calling a function with only
      the non-rest parameters still required an arguments adaptor (plus some
      other oddities). Now with this CL we fix, so that we do no longer
      include the rest parameter in that count. Thereby checking for rest
      parameters is very efficient, as we only need to check whether there is
      an arguments adaptor frame, and if not create an empty array, otherwise
      check whether the arguments adaptor frame has more parameters than
      specified by the formal_parameter_count.
      
      The FastNewRestParameterStub is written in a way that it can be directly
      used by Ignition as well, and with some tweaks to the TurboFan backends
      and the CodeStubAssembler, we should be able to rewrite it as
      TurboFanCodeStub in the near future.
      
      Drive-by-fix: Refactor and unify the CreateArgumentsType which was
      different in TurboFan and Ignition; now we have a single enum class
      which is used in both TurboFan and Ignition.
      
      R=jarin@chromium.org, rmcilroy@chromium.org
      TBR=rossberg@chromium.org
      BUG=v8:2159
      LOG=n
      
      Review URL: https://codereview.chromium.org/1676883002
      
      Cr-Commit-Position: refs/heads/master@{#33809}
      3ef573e9
  19. 26 Jan, 2016 1 commit
    • ishell's avatar
      [es6] Tail calls support. · 6131ab1e
      ishell authored
      This CL implements PrepareForTailCall() mentioned in ES6 spec for full codegen, Crankshaft and Turbofan.
      When debugger is active tail calls are disabled.
      
      Tail calling can be enabled by --harmony-tailcalls flag.
      
      BUG=v8:4698
      LOG=Y
      TBR=rossberg@chromium.org
      
      Review URL: https://codereview.chromium.org/1609893003
      
      Cr-Commit-Position: refs/heads/master@{#33509}
      6131ab1e
  20. 18 Jan, 2016 1 commit
  21. 16 Dec, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Add support for CreateIterResultObject. · 01662f1b
      bmeurer authored
      Introduce JSCreateIterResultObject operator, as a way to optimize the
      %_CreateIterResultObject intrinsic, which is used to provide uniform,
      non-polymorphic result objects for iterators (and generators).  We
      cannot utilize the existing JSCreate operator here, because there's no
      constructor function for iterator result objects (as required by the
      spec).
      
      R=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1531753002
      
      Cr-Commit-Position: refs/heads/master@{#32901}
      01662f1b
  22. 03 Dec, 2015 1 commit
  23. 02 Dec, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Desugar JSUnaryNot(x) to Select(x, false, true). · 411c5b7f
      bmeurer authored
      Also remove the ResultMode from ToBooleanStub and always return true or
      false and use the same mechanism in fullcodegen.  This is in preparation
      for adding ToBoolean hints to TurboFan.
      
      Drive-by-fix: We can use the power of the ToBooleanIC in TurboFan now
      that the ResultMode is gone (and the runtime always returns true or
      false from the miss handler).
      
      R=mstarzinger@chromium.org
      BUG=v8:4583
      LOG=n
      
      Review URL: https://codereview.chromium.org/1491223002
      
      Cr-Commit-Position: refs/heads/master@{#32524}
      411c5b7f
  24. 01 Dec, 2015 1 commit
  25. 27 Nov, 2015 3 commits
  26. 25 Nov, 2015 3 commits
  27. 24 Nov, 2015 1 commit
  28. 20 Nov, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Initial support for Array constructor specialization. · aeb41de0
      bmeurer authored
      Introduce a JSCreateArray operator that represents the Array
      constructor, and lower call and construct calls to the Array
      constructor to JSCreateArray. Currently we don't yet replace
      that with an inline allocation, but always use the specialized
      stubs for the Array constructor.
      
      This saves a lot of unnecessary deopts and elements transitions
      because now we can actually consume the allocation site feedback
      for the transitions.
      
      R=mstarzinger@chromium.org
      BUG=v8:4470
      LOG=n
      
      Review URL: https://codereview.chromium.org/1466643002
      
      Cr-Commit-Position: refs/heads/master@{#32145}
      aeb41de0
  29. 09 Nov, 2015 2 commits
    • mstarzinger's avatar
      [turbofan] Switch message object manipulation to JSOperator. · 270be935
      mstarzinger authored
      This switches loading and storing of the message object within the
      Isolate to use JavaScript operators built by the JSOperatorBuilder
      instead of machine operators. This is a preparation for a stricter
      representation selection for loads and stores.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1412443010
      
      Cr-Commit-Position: refs/heads/master@{#31879}
      270be935
    • bmeurer's avatar
      [builtins] Introduce specialized Call/CallFunction builtins. · 7c3396d0
      bmeurer authored
      Introduce receiver conversion mode specialization for the Call and
      CallFunction builtins, so we can specialize the builtin functionality
      (actually an optimization only) based on static information from the
      callsite (this is basically a superset of the optimizations that were
      available with the CallFunctionStub and CallICStub, except that these
      optimizations are correct now).
      
      This fixes a regression introduced by the removal of CallFunctionStub,
      for programs that call a lot.
      
      R=yangguo@chromium.org
      BUG=chromium:552244
      LOG=n
      
      Review URL: https://codereview.chromium.org/1436493002
      
      Cr-Commit-Position: refs/heads/master@{#31871}
      7c3396d0
  30. 04 Nov, 2015 1 commit
  31. 02 Nov, 2015 1 commit
  32. 28 Oct, 2015 1 commit
  33. 27 Oct, 2015 1 commit
    • mstarzinger's avatar
      [turbofan] Fix receiver binding for inlined callees. · 37f5e23b
      mstarzinger authored
      This introduces a JSConvertReceiver operator to model the implicit
      conversion of receiver values for sloppy callees. It is used by the
      JSInliner for now, but can also be used to model direction function
      calls that bypass call stubs.
      
      Also note that a hint is passed to said operator whenever the source
      structure constrains the receiver value type. This hint allows for
      optimizations in the lowering of the operator.
      
      The underlying specification in ES6, section 9.2.1.2 is the basis for
      this implementation.
      
      R=bmeurer@chromium.org
      TEST=mjsunit/compiler/receiver-conversion
      BUG=v8:4493, v8:4470
      LOG=n
      
      Review URL: https://codereview.chromium.org/1412223015
      
      Cr-Commit-Position: refs/heads/master@{#31598}
      37f5e23b