1. 03 Nov, 2016 1 commit
  2. 17 Oct, 2016 1 commit
  3. 20 Sep, 2016 1 commit
  4. 19 Aug, 2016 1 commit
  5. 02 Aug, 2016 1 commit
  6. 27 Jul, 2016 1 commit
    • mstarzinger's avatar
      [interpreter] Implement OSR graph construction from bytecode. · 1314406c
      mstarzinger authored
      This implements graph construction for entry via on-stack replacement
      within the {BytecodeGraphBuilder}. Entry points are at loop headers
      similar to previous OSR implementations. All interpreter registers are
      addressable via {OsrValue} nodes in the graph. Currently we rely on
      {OsrPoll} bytecodes to be placed right after loop headers (i.e. at the
      targets of back edges).
      
      R=jarin@chromium.org
      BUG=v8:4764
      
      Review-Url: https://codereview.chromium.org/2171083004
      Cr-Commit-Position: refs/heads/master@{#38083}
      1314406c
  7. 22 Jul, 2016 1 commit
    • yangguo's avatar
      [debug] use catch prediction flag for promise rejections. · 6d0a4202
      yangguo authored
      This is in preparation to implementing exception prediction for async
      functions.  Each handler table entry can now predict "caught", "uncaught", or
      "promise". The latter indicates that the exception will lead to a promise
      rejection.
      
      To mark the relevant try-catch blocks, we add a new native syntax.
      try { } %catch (e) { } indicates a TryCatchStatement with the "promise"
      prediction.
      
      The previous implementation of using the function to tell the relevant
      try-catch apart from inner try-catch blocks will not work for async functions
      since these can have inner try-catch blocks inside the same function.
      
      BUG=v8:5167
      
      Review-Url: https://codereview.chromium.org/2161263003
      Cr-Commit-Position: refs/heads/master@{#37966}
      6d0a4202
  8. 12 Jul, 2016 1 commit
    • danno's avatar
      [turbofan] Robustify tail parameter stack size computations · e92e9118
      danno authored
      This CL separates the check whether something is tail-callable from
      the computation of the size of the stack parameters that a function
      takes.
      
      In order to track this precisely, the stack parameter size calculation
      uses the recently landed MachineType information that's embedded
      in return and parameter value LinkageLocations.
      
      Review-Url: https://codereview.chromium.org/2121753002
      Cr-Commit-Position: refs/heads/master@{#37668}
      e92e9118
  9. 11 Jul, 2016 1 commit
    • danno's avatar
      [turbofan] Add MachineType to LinkageLocation · 3e2085eb
      danno authored
      By adding MachineType to LinkageLocation, it is possible not only to reason
      about the location of a LinkageLocation on the stack, but also about it's
      size. This will be useful in follow-on CLs that attempt to merge some of the
      parameter passing logic of tail calls and normal (non-tail) calls.
      
      As a nice side-effect, it is no longer necessary to separately keep a
      MachineSignature in a CallDescriptor, because the MachineTypes contianed in
      LinkageLocation for all of the Descriptor's parameters and return types are
      sufficient. This CL therefore removes the MachineSignature from the
      CallDescriptor and adjusts all the calling code accordingly, simplifying and
      de-duplicating code in a bunch of places.
      
      R=titzer@chromium.org, bmeurer@chromium.org
      LOG=N
      
      Review-Url: https://codereview.chromium.org/2124023003
      Cr-Commit-Position: refs/heads/master@{#37633}
      3e2085eb
  10. 01 Jul, 2016 1 commit
    • danno's avatar
      [turbofan]: Support using push instructions for setting up tail call parameters · bd0d9e7d
      danno authored
      This optimizes the passing of stack parameters in function calls.
      
      For some architectures (ia32/x64), using pushes when possible instead
      of bumping the stack and then storing parameters generates much
      smaller code, and in some cases is faster (e.g. when a push of a memory
      location can implement a memory-to-memory copy and thus elide an
      intermediate load. On others (e.g. ARM), the benefit is smaller, where
      it's only possible to elide direct stack pointer adjustment in certain cases
      or combine multiple register stores into a single instruction in other limited
      situations. On yet other platforms (ARM64, MIPS), there are no push instructions,
      and this optimization isn't used at all.
      
      Ideally, this mechanism would be used for both tail calls and normal calls,
      but "normal" calls are currently pretty efficient, and tail calls are very
      inefficient, so this CL sets the bar low for building a new mechanism to
      handle parameter pushing that only needs to raise the bar on tail calls for now.
      
      The key aspect of this change is that adjustment to the stack pointer
      for tail calls (and perhaps later real calls) is an explicit step separate from
      instruction selection and gap resolution, but aware of both, making it possible
      to safely recognize gap moves that are actually pushes.
      
      Review-Url: https://codereview.chromium.org/2082263002
      Cr-Commit-Position: refs/heads/master@{#37477}
      bd0d9e7d
  11. 02 Jun, 2016 1 commit
  12. 10 May, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Initial version of allocation folding and write barrier elimination. · b8229ec4
      bmeurer authored
      This adds a new pass MemoryOptimizer that walks over the effect chain
      from Start and lowers all Allocate, LoadField, StoreField, LoadElement,
      and StoreElement nodes, trying to fold allocations into allocation
      groups and eliminate write barriers on StoreField and StoreElement if
      possible (i.e. if the object belongs to the current allocation group and
      that group allocates in new space).
      
      R=hpayer@chromium.org, jarin@chromium.org
      BUG=v8:4931, chromium:580959
      LOG=n
      
      Review-Url: https://codereview.chromium.org/1963583004
      Cr-Commit-Position: refs/heads/master@{#36128}
      b8229ec4
  13. 03 May, 2016 1 commit
  14. 30 Apr, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Run everything after representation selection concurrently. · d1b3d426
      bmeurer authored
      Further refactor the pipeline to even run the first scheduler (part of
      the effect control linearization) concurrently. This temporarily
      disables most of the write barrier elimination, but we will get back to
      that later.
      
      Drive-by-fix: Remove the dead code from ChangeLowering, and stack
      allocate the Typer in the pipeline. Also migrate the AllocateStub to a
      native code builtin, so that we have the code object + a handle to it
      available all the time.
      
      CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux64_tsan_rel
      R=mstarzinger@chromium.org
      BUG=v8:4969
      LOG=n
      
      Review-Url: https://codereview.chromium.org/1926023002
      Cr-Commit-Position: refs/heads/master@{#35918}
      d1b3d426
  15. 15 Apr, 2016 1 commit
  16. 14 Apr, 2016 1 commit
    • rmcilroy's avatar
      [Interpreter] Make dispatch table point to code entry instead of code objects. · 0c05e02f
      rmcilroy authored
      Modifies Ignition to store code entry addresses in the dispatch table
      rather than code objects. This allows the interpreter to avoid
      calculating the code entry address from the code object on every
      dispatch and provides a ~5-7% performance improvement on Octane with
      Ignition.
      
      This change adds ArchOpcode::kArchTailCallAddress to TurboFan to enable
      tail call dispatch using these code addresses. It also adds a Dispatch
      linkage creator (distinct from the stub linkage type used previously) to
      allow targetting a code address target (which will diverge further from
      the stub linkage type when we remove the context machine register in
      Ignition).
      
      BUG=v8:4280
      LOG=N
      
      Review URL: https://codereview.chromium.org/1882073002
      
      Cr-Commit-Position: refs/heads/master@{#35480}
      0c05e02f
  17. 29 Mar, 2016 1 commit
    • titzer's avatar
      [wasm] Fix arm64 frame alignment. · c9f59780
      titzer authored
          In JavaScript code and stubs, JSSP mirrors the CSP but may be unaligned.
          But in WASM code only CSP is used, like native code, and it must be
          aligned.
          Calls into WASM from JS need to carefully align the C stack
          pointer (csp) and restore the previous JSSP, while calls from WASM
          to JS need to compute a new JSSP and restore their CSP after the
          call.
      
      R=ahaas@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1811283003
      
      Cr-Commit-Position: refs/heads/master@{#35096}
      c9f59780
  18. 08 Mar, 2016 1 commit
    • danno's avatar
      [runtime] Unify and simplify how frames are marked · 9dcd0857
      danno authored
      Before this CL, various code stubs used different techniques
      for marking their frames to enable stack-crawling and other
      access to data in the frame. All of them were based on a abuse
      of the "standard" frame representation, e.g. storing the a
      context pointer immediately below the frame's fp, and a
      function pointer after that. Although functional, this approach
      tends to make stubs and builtins do an awkward, unnecessary
      dance to appear like standard frames, even if they have
      nothing to do with JavaScript execution.
      
      This CL attempts to improve this by:
      
      * Ensuring that there are only two fundamentally different
        types of frames, a "standard" frame and a "typed" frame.
        Standard frames, as before, contain both a context and
        function pointer. Typed frames contain only a minimum
        of a smi marker in the position immediately below the fp
        where the context is in standard frames.
      * Only interpreted, full codegen, and optimized Crankshaft and
        TurboFan JavaScript frames use the "standard" format. All
        other frames use the type frame format with an explicit
        marker.
      * Typed frames can contain one or more values below the
        type marker. There is new magic macro machinery in
        frames.h that simplifies defining the offsets of these fields
        in typed frames.
      * A new flag in the CallDescriptor enables specifying whether
        a frame is a standard frame or a typed frame. Secondary
        register location spilling is now only enabled for standard
        frames.
      * A zillion places in the code have been updated to deal with
        the fact that most code stubs and internal frames use the
        typed frame format. This includes changes in the
        deoptimizer, debugger, and liveedit.
      * StandardFrameConstants::kMarkerOffset is deprecated,
        (CommonFrameConstants::kContextOrFrameTypeOffset
        and StandardFrameConstants::kFrameOffset are now used
        in its stead).
      
      LOG=N
      
      Review URL: https://codereview.chromium.org/1696043002
      
      Cr-Commit-Position: refs/heads/master@{#34571}
      9dcd0857
  19. 01 Mar, 2016 1 commit
  20. 16 Feb, 2016 1 commit
  21. 15 Feb, 2016 1 commit
    • bmeurer's avatar
      [turbofan] Remove the function reload hack for OSR. · 359ba8e0
      bmeurer authored
      Initially we were unable to address certain stack slots in the callee
      part of the frame, including the function marker, therefore we had to
      hack a reload of the function register into the OSR prologue. Now that
      we are able to address all stack slots, we no longer need this hack.
      
      R=jarin@chromium.org
      
      Review URL: https://codereview.chromium.org/1666073002
      
      Cr-Commit-Position: refs/heads/master@{#33974}
      359ba8e0
  22. 10 Feb, 2016 1 commit
    • rmcilroy's avatar
      [Interpreter] Make InterpreterAssembler a subclass of CodeStubAssembler. · d1c28849
      rmcilroy authored
      Moves InterpreterAssembler out of the compiler directory and into the
      interpreter directory. Makes InterpreterAssembler as subclass of
      CodeStubAssembler.
      
      As part of this change, the special bytecode dispatch linkage type
      is removed and instead we use a InterfaceDispatchDescriptor and
      a normal CodeStub linkage type.
      
      Removes a bunch of duplicated logic in InterpreterAssembler and
      instead uses the CodeStubAssembler logic. Refactors Interpreter
      with these changes.
      
      Modifies CodeStubAssembler to add the extra operations required
      by the Interpreter (extra call types, raw memory access and some extra
      binary ops). Also adds the ability for subclasses to add extra
      prologue and epilogue operations around calls, which is required
      for the Interpreter.
      
      BUG=v8:4280
      LOG=N
      
      Review URL: https://codereview.chromium.org/1673333004
      
      Cr-Commit-Position: refs/heads/master@{#33873}
      d1c28849
  23. 01 Feb, 2016 1 commit
  24. 18 Jan, 2016 1 commit
  25. 08 Jan, 2016 1 commit
  26. 10 Dec, 2015 1 commit
    • jarin's avatar
      [turbofan] Make MachineType a pair of enums. · bb2a830d
      jarin authored
      MachineType is now a class with two enum fields:
      - MachineRepresentation
      - MachineSemantic
      
      Both enums are usable on their own, and this change switches some places from using MachineType to use just MachineRepresentation. Most notably:
      - register allocator now uses just the representation.
      - Phi and Select nodes only refer to representations.
      
      Review URL: https://codereview.chromium.org/1513543003
      
      Cr-Commit-Position: refs/heads/master@{#32738}
      bb2a830d
  27. 03 Dec, 2015 2 commits
  28. 02 Dec, 2015 1 commit
    • danno's avatar
      [stubs] A new approach to TF stubs · 3e7e3ed7
      danno authored
      * Add a sibling interface to InterpreterAssembler called
        CodeStubAssembler which provides a wrapper around the
        RawMachineAssembler and is intented to make it easy to build
        efficient cross-platform code stubs. Much of the implementation
        of CodeStubAssembler is shamelessly stolen from the
        InterpreterAssembler, and the idea is to eventually merge the
        two interfaces somehow, probably moving the
        InterpreterAssembler interface over to use the
        CodeStubAssembler. Short-term, however, the two interfaces
        shall remain decoupled to increase our velocity developing the
        two systems in parallel.
      * Implement the StringLength stub in TurboFan with the new
        CodeStubAssembler. Replace and remove the old Hydrogen-stub
        version.
      * Remove a whole slew of machinery to support JavaScript-style
        code stub generation, since it ultimately proved unwieldy,
        brittle and baroque. This cleanup includes removing the shared
        code stub context, several example stubs and a tangle of build
        file changes.
      
      BUG=v8:4587
      LOG=n
      
      Review URL: https://codereview.chromium.org/1475953002
      
      Cr-Commit-Position: refs/heads/master@{#32508}
      3e7e3ed7
  29. 24 Nov, 2015 1 commit
    • danno's avatar
      [turbofan] Add general support for sp-based frame access · 51669873
      danno authored
      Some highlights of this CL:
      * Refactor the mutable state out of Frame into FrameAccessState,
        which is maintained and updated during code generation to
        record whether sp- or fp-based frame access is currently active
        and how deep the stack on top of the frame is.
      * The operand resultion in linkage.cc now uses FrameAccessState
        to determine how to generate frame-accessing operands.
      * Update all platforms to accurately track additionally pushed
        stack slots (e.g. arguments for calls) in the FrameAccessState.
      * Add a flag, --turbo_sp_frame_access, which forces all frame
        access to be sp-based whenever possible. This will likely never
        be used in production, but for testing it's useful in verifying
        that the stack-tracking of each platform maintained in the
        FrameAccessState is correct.
      * Use sp-based frame access for gap resolving before tail
        calls. This will allow for slightly more efficient restoration
        of the frame pointer in the tail call in a later CL.
      * Remove most ad hoc groping into CallDescriptors to
        determine if a frame is needed, instead consistently use
        predicates like needs_frame(), IsCFunctionCall() and
        IsJSFunctionCall().
      
      BUG=v8:4076
      LOG=n
      
      Review URL: https://codereview.chromium.org/1460183002
      
      Cr-Commit-Position: refs/heads/master@{#32234}
      51669873
  30. 20 Nov, 2015 1 commit
  31. 19 Nov, 2015 1 commit
    • mstarzinger's avatar
      [turbofan] Make new.target explicit in JSCallDescriptor. · 0227857d
      mstarzinger authored
      This adds an explicit parameter to the call descriptor having kind
      kJSCallFunction representing the new.target value. Note that for now
      this parameter is not yet passed in and hence cannot be used yet. Also
      contains some refactoring of how parameter index value are calculated,
      establishing Linkage as the central point for such index computations.
      
      This is a preparatory CL to allows us passing new.target in a register
      instead of via a side-channel through the construct stub frame.
      
      R=bmeurer@chromium.org
      BUG=v8:4544
      LOG=n
      
      Review URL: https://codereview.chromium.org/1461973002
      
      Cr-Commit-Position: refs/heads/master@{#32112}
      0227857d
  32. 13 Nov, 2015 2 commits
    • mtrofin's avatar
      [turbofan] Spill rsi and rdi in their existing locations. · 20f3a077
      mtrofin authored
      We push the context and the js function onto the stack as part of the
      frame construction. The register allocator is presented with virtual
      registers for the above as defined from their corresponding registers. It
      then goes on to spilling them somewhere else on the stack.
      
      This means each function spends two redundant spills and two
      unnecessary stack slots.
      
      This change addresses this issue.
      
      We present these parameters (context and function) to the register
      allocator as an UnallocatedOperand having a "secondary storage". The
      secondary storage is then associated to the live range as its
      spill operand. We capture the definition of the live range so that we can
      then commit the spill (in this case, eliminate) through a variation of the
      mechanics of the CommitAssignment phase.
      
      The register allocator validator also needed update to understand
      UnallocatedOperands with a secondary storage.
      
      The change renames the SpillAtDefinitionList and related APIs to better
      capture their intent - the old names suggested spills happened upon
      calling. In reality, potential spill locations were thus recorded, and later
      committed (or not, in certain cases) after register allocation.
      
      BUG= v8:4548
      LOG=n
      
      Review URL: https://codereview.chromium.org/1426943010
      
      Cr-Commit-Position: refs/heads/master@{#31988}
      20f3a077
    • danno's avatar
      [turbofan] Better and more sane support for tail calls · ff283f7d
      danno authored
      * Limit triggering of tail calls to explicit use of a new inline runtime
        function %_TailCall. %_TailCall works just like %_Call except for using
        tail-calling mechanics (currently only in TF).
      * Remove hack that recognized some specific usages of %_Call and converted them
        into tail calls.
      * Support tail calls for all calls where the number of callee stack parameters
        is less than or equal to the number of caller stack parameters.
      * Use the gap resolver to swizzle parameters and registers to tail calls.
      
      BUG=v8:4076
      LOG=n
      
      Review URL: https://codereview.chromium.org/1439613003
      
      Cr-Commit-Position: refs/heads/master@{#31987}
      ff283f7d
  33. 04 Nov, 2015 1 commit
    • bmeurer's avatar
      [turbofan] Implement the call protocol properly for direct calls. · 30aca03a
      bmeurer authored
      The callees are expected to properly set the number of actual
      arguments passed to the callee, which is now represented correctly
      in the TurboFan graphs by a new Parameter right before the context
      Parameter.  Currently this is only being used for outgoing calls.
      
      Note that this requires disabling two of the TF code stub tests,
      because of the JavaScript graphs are not automagically compatible
      with abitrary (incoming) code stub interface descriptors.  If we
      want to support JS code stubs at all, then we need to find a sane
      way to feed in this information.
      
      Drive-by-fix: Don't insert a direct call to a classConstructor.
      
      R=mstarzinger@chromium.org
      BUG=v8:4413, v8:4428
      LOG=n
      
      Review URL: https://codereview.chromium.org/1410633006
      
      Cr-Commit-Position: refs/heads/master@{#31789}
      30aca03a
  34. 19 Oct, 2015 1 commit
    • jarin's avatar
      [turbofan] Introduce lazy bailout, masked as a call. · f9a9c6be
      jarin authored
      This introduces an explicit lazy bailout. It is wrapped in the call
      node, mostly because the lazy deoptimization processing is married
      to the call processing in the instruction selector and the code generator.
      
      It is still a terrible hack.
      
      R=bmeurer@chromium.org,mstarzinger@chromium.org
      BUG=chromium:543994,v8:4195
      LOG=n
      
      Review URL: https://codereview.chromium.org/1412443003
      
      Cr-Commit-Position: refs/heads/master@{#31353}
      f9a9c6be
  35. 08 Oct, 2015 1 commit
  36. 10 Sep, 2015 1 commit
    • bmeurer's avatar
      [runtime] Move binary operator fallbacks into the runtime. · a1b2ec60
      bmeurer authored
      Replace the ADD, SUB, etc. builtins with proper runtime implementations,
      and expose them as runtime calls that can be used by the code stubs and
      the interpreter (for now).
      
      Also remove all the support runtime functions for ADD, SUB and friends,
      namely %NumberAdd, %NumberSub, and so on.
      
      R=mstarzinger@chromium.org
      CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
      
      Review URL: https://codereview.chromium.org/1333843002
      
      Cr-Commit-Position: refs/heads/master@{#30680}
      a1b2ec60
  37. 24 Aug, 2015 1 commit
  38. 18 Aug, 2015 1 commit