1. 05 Feb, 2016 1 commit
    • mvstanton's avatar
      Revert of Type Feedback Vector lives in the closure (patchset #2 id:40001 of... · 3f36e658
      mvstanton authored
      Revert of Type Feedback Vector lives in the closure (patchset #2 id:40001 of https://codereview.chromium.org/1668103002/ )
      
      Reason for revert:
      Must revert for now due to chromium api natives issues.
      
      Original issue's description:
      > Type Feedback Vector lives in the closure
      >
      > (RELAND: the problem before was a missing write barrier for adding the code
      > entry to the new closure. It's been addressed with a new macro instruction
      > and test. The only change to this CL is the addition of two calls to
      > __ RecordWriteCodeEntryField() in the platform CompileLazy builtin.)
      >
      > We get less "pollution" of type feedback if we have one vector per native
      > context, rather than one for the whole system. This CL moves the vector
      > appropriately.
      >
      > We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
      > vector actually lives in the first slot of the literals array (indeed there is
      > great commonality between those arrays, they can be thought of as the same
      > thing). So we make greater effort to ensure there is a valid literals array
      > after compilation.
      >
      > This meant, for performance reasons, that we needed to extend
      > FastNewClosureStub to support creating closures with literals. And ultimately,
      > it drove us to move the optimized code map lookup out of FastNewClosureStub
      > and into the compile lazy builtin.
      >
      > The heap change is trivial so I TBR Hannes for it...
      > Also, Yang has had a look at the debugger changes already and approved 'em. So he is TBR style too.
      > And Benedikt reviewed it as well.
      >
      > TBR=hpayer@chromium.org, yangguo@chromium.org, bmeurer@chromium.org
      >
      > BUG=
      >
      > Committed: https://crrev.com/bb31db3ad6de16f86a61f6c7bbfd3274e3d957b5
      > Cr-Commit-Position: refs/heads/master@{#33741}
      
      TBR=bmeurer@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/1670813005
      
      Cr-Commit-Position: refs/heads/master@{#33766}
      3f36e658
  2. 04 Feb, 2016 1 commit
    • mvstanton's avatar
      Type Feedback Vector lives in the closure · bb31db3a
      mvstanton authored
      (RELAND: the problem before was a missing write barrier for adding the code
      entry to the new closure. It's been addressed with a new macro instruction
      and test. The only change to this CL is the addition of two calls to
      __ RecordWriteCodeEntryField() in the platform CompileLazy builtin.)
      
      We get less "pollution" of type feedback if we have one vector per native
      context, rather than one for the whole system. This CL moves the vector
      appropriately.
      
      We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
      vector actually lives in the first slot of the literals array (indeed there is
      great commonality between those arrays, they can be thought of as the same
      thing). So we make greater effort to ensure there is a valid literals array
      after compilation.
      
      This meant, for performance reasons, that we needed to extend
      FastNewClosureStub to support creating closures with literals. And ultimately,
      it drove us to move the optimized code map lookup out of FastNewClosureStub
      and into the compile lazy builtin.
      
      The heap change is trivial so I TBR Hannes for it...
      Also, Yang has had a look at the debugger changes already and approved 'em. So he is TBR style too.
      And Benedikt reviewed it as well.
      
      TBR=hpayer@chromium.org, yangguo@chromium.org, bmeurer@chromium.org
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1668103002
      
      Cr-Commit-Position: refs/heads/master@{#33741}
      bb31db3a
  3. 27 Jan, 2016 2 commits
    • mvstanton's avatar
      Revert of Type Feedback Vector lives in the closure (patchset #2 id:20001 of... · a7027851
      mvstanton authored
      Revert of Type Feedback Vector lives in the closure (patchset #2 id:20001 of https://codereview.chromium.org/1642613002/ )
      
      Reason for revert:
      Bug: failing to use write barrier when writing code entry into closure.
      
      Original issue's description:
      > Reland of Type Feedback Vector lives in the closure
      >
      > (Fixed a bug found by nosnap builds.)
      >
      > We get less "pollution" of type feedback if we have one vector per native
      > context, rather than one for the whole system. This CL moves the vector
      > appropriately.
      >
      > We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
      > vector actually lives in the first slot of the literals array (indeed there is
      > great commonality between those arrays, they can be thought of as the same
      > thing). So we make greater effort to ensure there is a valid literals array
      > after compilation.
      >
      > This meant, for performance reasons, that we needed to extend
      > FastNewClosureStub to support creating closures with literals. And ultimately,
      > it drove us to move the optimized code map lookup out of FastNewClosureStub
      > and into the compile lazy builtin.
      >
      > The heap change is trivial so I TBR Hannes for it...
      >
      > TBR=hpayer@chromium.org
      > BUG=
      >
      > Committed: https://crrev.com/d984b3b0ce91e55800f5323b4bb32a06f8a5aab1
      > Cr-Commit-Position: refs/heads/master@{#33548}
      
      TBR=bmeurer@chromium.org,yangguo@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/1643533003
      
      Cr-Commit-Position: refs/heads/master@{#33556}
      a7027851
    • mvstanton's avatar
      Reland of Type Feedback Vector lives in the closure · d984b3b0
      mvstanton authored
      (Fixed a bug found by nosnap builds.)
      
      We get less "pollution" of type feedback if we have one vector per native
      context, rather than one for the whole system. This CL moves the vector
      appropriately.
      
      We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
      vector actually lives in the first slot of the literals array (indeed there is
      great commonality between those arrays, they can be thought of as the same
      thing). So we make greater effort to ensure there is a valid literals array
      after compilation.
      
      This meant, for performance reasons, that we needed to extend
      FastNewClosureStub to support creating closures with literals. And ultimately,
      it drove us to move the optimized code map lookup out of FastNewClosureStub
      and into the compile lazy builtin.
      
      The heap change is trivial so I TBR Hannes for it...
      
      TBR=hpayer@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1642613002
      
      Cr-Commit-Position: refs/heads/master@{#33548}
      d984b3b0
  4. 26 Jan, 2016 2 commits
    • mvstanton's avatar
      Revert of Type Feedback Vector lives in the closure (patchset #12 id:260001 of... · e2e7dc32
      mvstanton authored
      Revert of Type Feedback Vector lives in the closure (patchset #12 id:260001 of https://codereview.chromium.org/1563213002/ )
      
      Reason for revert:
      FAilure on win32 bot, need to investigate webkit failures.
      
      Original issue's description:
      > Type Feedback Vector lives in the closure
      >
      > We get less "pollution" of type feedback if we have one vector per native
      > context, rather than one for the whole system. This CL moves the vector
      > appropriately.
      >
      > We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
      > vector actually lives in the first slot of the literals array (indeed there is
      > great commonality between those arrays, they can be thought of as the same
      > thing). So we make greater effort to ensure there is a valid literals array
      > after compilation.
      >
      > This meant, for performance reasons, that we needed to extend
      > FastNewClosureStub to support creating closures with literals. And ultimately,
      > it drove us to move the optimized code map lookup out of FastNewClosureStub
      > and into the compile lazy builtin.
      >
      > The heap change is trivial so I TBR Hannes for it...
      >
      > TBR=hpayer@chromium.org
      >
      > BUG=
      >
      > Committed: https://crrev.com/a5200f7ed4d11c6b882fa667da7a1864226544b4
      > Cr-Commit-Position: refs/heads/master@{#33518}
      
      TBR=bmeurer@chromium.org,akos.palfi@imgtec.com
      # 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/1632993003
      
      Cr-Commit-Position: refs/heads/master@{#33520}
      e2e7dc32
    • mvstanton's avatar
      Type Feedback Vector lives in the closure · a5200f7e
      mvstanton authored
      We get less "pollution" of type feedback if we have one vector per native
      context, rather than one for the whole system. This CL moves the vector
      appropriately.
      
      We rely more heavily on the Optimized Code Map in the SharedFunctionInfo. The
      vector actually lives in the first slot of the literals array (indeed there is
      great commonality between those arrays, they can be thought of as the same
      thing). So we make greater effort to ensure there is a valid literals array
      after compilation.
      
      This meant, for performance reasons, that we needed to extend
      FastNewClosureStub to support creating closures with literals. And ultimately,
      it drove us to move the optimized code map lookup out of FastNewClosureStub
      and into the compile lazy builtin.
      
      The heap change is trivial so I TBR Hannes for it...
      
      TBR=hpayer@chromium.org
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1563213002
      
      Cr-Commit-Position: refs/heads/master@{#33518}
      a5200f7e
  5. 18 Dec, 2015 1 commit
    • rmcilroy's avatar
      [Interpreter] Add basic deoptimization support from TurboFan to Ignition. · b10d24ff
      rmcilroy authored
      Adds support for generating deoptimization translations for interpreter
      stack frames, and building interpreter frames for these translations
      when a function deopts. Also adds builtins for
      InterpreterNotifyDeoptimized which resume the function's continuation at
      the correct point in the interpreter after deopt.
      
      MIPS patch contributed by balazs.kilvady@igmtec.com
      
      BUG=v8:4280
      LOG=N
      TEST=test-deoptimization.cc with --ignition and --turbo
      
      Review URL: https://codereview.chromium.org/1528913003
      
      Cr-Commit-Position: refs/heads/master@{#32971}
      b10d24ff
  6. 16 Dec, 2015 1 commit
  7. 10 Dec, 2015 1 commit
  8. 09 Dec, 2015 1 commit
  9. 03 Dec, 2015 3 commits
  10. 11 Nov, 2015 1 commit
  11. 09 Nov, 2015 1 commit
  12. 18 Aug, 2015 1 commit
    • danno's avatar
      [turbofan] Unify referencing of stack slots · cbbaf9ea
      danno authored
      Previously, it was not possible to specify StackSlotOperands for all
      slots in both the caller and callee stacks. Specifically, the region
      of the callee's stack including the saved return address, frame
      pointer, function pointer and context pointer could not be addressed
      by the register allocator/gap resolver.
      
      In preparation for better tail call support, which will use the gap
      resolver to reconcile outgoing parameters, this change makes it
      possible to address all slots on the stack, because slots in the
      previously inaccessible dead zone may become parameter slots for
      outgoing tail calls. All caller stack slots are accessible as they
      were before, with slot -1 corresponding to the last stack
      parameter. Stack slot indices >= 0 access the callee stack, with slot
      0 corresponding to the callee's saved return address, 1 corresponding
      to the saved frame pointer, 2 corresponding to the current function
      context, 3 corresponding to the frame marker/JSFunction, and slots 4
      and above corresponding to spill slots.
      
      The following changes were specifically	needed:
      
      * Frame	has been changed to explicitly manage three areas of the
        callee frame, the fixed header, the spill slot area, and the
        callee-saved register area.
      * Conversions from stack slot indices to fp offsets all now go through
        a common bottleneck: OptimizedFrame::StackSlotOffsetRelativeToFp
      * The generation of deoptimization translation tables has been changed
        to support the new stack slot indexing scheme. Crankshaft, which
        doesn't support the new slot numbering in its register allocator,
        must adapt the indexes when creating translation tables.
      * Callee-saved parameters are now kept below spill slots, not above,
        to support saving only the optimal set of used registers, which is
        only known after register allocation is finished and spill slots
        have been allocated.
      
      Review URL: https://codereview.chromium.org/1261923007
      
      Cr-Commit-Position: refs/heads/master@{#30224}
      cbbaf9ea
  13. 11 Aug, 2015 1 commit
    • mstarzinger's avatar
      Remove several grab-bag includes from the v8.h header. · 58109a2c
      mstarzinger authored
      This is the first step of turning the v8.h file into a normal header
      instead of an include-the-world header. The new rule is that no other
      header files are allowed to include v8.h, which is enforced by DEPS.
      
      Also the number of includes inside the v8.h file has been drastically
      reduced. Basically the last missing piece is the inclusion of the big
      objects-inl.h file.
      
      This in turn makes many headers follow the IWYU principle.
      
      R=bmeurer@chromium.org,hpayer@chromium.org,titzer@chromium.org
      
      Review URL: https://codereview.chromium.org/1282503003
      
      Cr-Commit-Position: refs/heads/master@{#30102}
      58109a2c
  14. 03 Aug, 2015 1 commit
  15. 31 Jul, 2015 1 commit
    • bmeurer's avatar
      [stubs] Unify (and optimize) implementation of ToObject. · 4fc6f547
      bmeurer authored
      This is the initial (big) step towards a more uniform implementation of
      the ToObject abstract operation (ES6 7.1.13), where we have a fallback
      implementation in JSReceiver::ToObject() and a fast (hydrogen) CodeStub
      to deal with the fast case (we should be able to do more cleanup on this
      in a followup CL).  For natives we expose the abstract operation via a
      %_ToObject intrinsic, also exposed via a macro TO_OBJECT, that unifies
      the previous confusion with TO_OBJECT_INLINE, ToObject, TO_OBJECT,
      $toObject and %$toObject.  Now the whole implementation of the abstract
      operation is context independent, meaning we don't need any magic in the
      builtins object nor the native context.
      
      R=mvstanton@chromium.org,yangguo@chromium.org
      
      Review URL: https://codereview.chromium.org/1266013006
      
      Cr-Commit-Position: refs/heads/master@{#29953}
      4fc6f547
  16. 02 Jul, 2015 1 commit
  17. 30 Jun, 2015 1 commit
  18. 23 Jun, 2015 1 commit
  19. 17 Jun, 2015 1 commit
  20. 15 Jun, 2015 1 commit
  21. 10 Jun, 2015 1 commit
  22. 09 Jun, 2015 1 commit
  23. 08 Jun, 2015 1 commit
    • jarin's avatar
      Unify decoding of deoptimization translations. · 9127d4ee
      jarin authored
      This unifies methods Deoptimizer::DoTranslateCommand, Deotpimizer::DoTranslateObject and the arguments object materializer.
      
      To unify these, we have to separate reading of the input frame from writing to the output frame because the argument materializer does not write to output frames.
      
      Instead, we now deoptimize in following stages:
      
      1. Read out the input frame/registers, decode them using the translations from the deoptimizer and store them in the deoptimizer (Deoptimizer::translated_state_). This is done in TranslatedState::Init.
      
      2. Write out into the output frame buffer all the values that do not require allocation. We also remember references to the values that require materialization. As before, this is done in Deoptimizer::DoCompute*Frame method, but instead calling to DoTranslateCommand, we use the translated frame to obtain the values and write them to the output frames.
      
      3. The platform specific code then sets up the output frames and calls into the deoptimization notification. This has not been changed at all.
      
      4. Once the stack is setup, we handlify all the references in the saved translated values (TranslatedState::Prepare).
      
      5. Finally, we materialize all the values we remembered in step (1) and write them to their frames on the stack (using the TranslatedValue::GetValue method).
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1136223004
      
      Cr-Commit-Position: refs/heads/master@{#28826}
      9127d4ee
  24. 03 Jun, 2015 1 commit
    • bmeurer's avatar
      [date] Refactor the %_DateField intrinsic to be optimizable. · e4782a9b
      bmeurer authored
      Previously the %_DateField intrinsic would also check the object and
      throw an exception if you happen to pass something that is not a valid
      JSDate, which (a) violates our policy for instrinsics and (b) is hard to
      optimize in TurboFan (even Crankshaft has a hard time, but there we will
      never inline the relevant builtins, so it doesn't show up). The throwing
      part is now a separate intrinsics %_ThrowIfNotADate that throws an
      exception in full codegen and deoptimizes in Crankshaft, which means the
      code for the current use cases is roughly the same (modulo some register
      renamings/gap moves).
      
      R=jkummerow@chromium.org
      
      Review URL: https://codereview.chromium.org/1167813003
      
      Cr-Commit-Position: refs/heads/master@{#28782}
      e4782a9b
  25. 04 May, 2015 1 commit
  26. 28 Apr, 2015 1 commit
  27. 23 Apr, 2015 1 commit
  28. 16 Apr, 2015 1 commit
  29. 15 Apr, 2015 1 commit
  30. 18 Mar, 2015 1 commit
  31. 17 Mar, 2015 1 commit
  32. 10 Mar, 2015 1 commit
    • loislo's avatar
      CpuProfiler: fix for CollectDeoptEvents test on arm64 · 82e6824e
      loislo authored
      We use slightly different schema for JumpTable on arm64 than for x64.
      
      We do a branch (B) to the JumpTable from the code,
      then a branch (B) to the end of jump table code
      and then branch to the deoptimizer code with putting
      the return address into lr register (Call which is actually Blr).
      
      As a result the 'from' address in Deoptimizer always points to
      the end of JumpTable code and we can get nothing from this information.
      
      0) I moved save_doubles and needs_frame code out of for_loop.
      
      1) I replaced B commands with Bl so we put different return addresses
      to lr register for the different jump table entries and replaced
      the final Call with Br which do not touch lr register.
      
      Also I removed the last_entry check so we will always do the Bl
      even for the last entry because we need the right address in lr.
      I don't think that this will affect the performance because it
      just one more branch for entire deopt mechanics.
      
      BUG=chromium:452067
      LOG=n
      
      Review URL: https://codereview.chromium.org/984893003
      
      Cr-Commit-Position: refs/heads/master@{#27094}
      82e6824e
  33. 09 Mar, 2015 1 commit
    • loislo's avatar
      CpuProfiler: fix for GetDeoptReason code. · 66ab309e
      loislo authored
      The original code always returned the first entry from RelocInfo that matched with
      bailout_id. But we may have a few different deopt reasons for one bailout_id.
      So we need to get the one which matches with a particular call from JumpTable.
      
      We can do this by checking not 'target_address' (it maps to bailout_id)
      but 'from' address which maps to a particular JumpTable entry.
      
      The test was reworked so it tests identical functions against different reasons.
      
      BUG=chromium:452067
      LOG=n
      
      Review URL: https://codereview.chromium.org/984773003
      
      Cr-Commit-Position: refs/heads/master@{#27076}
      66ab309e
  34. 27 Feb, 2015 1 commit
  35. 17 Feb, 2015 1 commit
  36. 12 Feb, 2015 1 commit
    • loislo's avatar
      CPUProfiler: Push deopt reason further to ProfileNode. · d23ab23b
      loislo authored
      1) create beefy RelocInfo table when cpu profiler is active, so if a function
      was optimized when profiler was active RelocInfo would get separate DeoptInfo
      for the each deopt case.
      
      2) push DeoptInfo from CodeEntry to ProfileNode.
      When deopt happens we put the info collected on #1 into CodeEntry and record stack sample.
      On the sampling thread we grab the deopt data and append it to the corresponding ProfileNode deopts list.
      
      Sample profile dump.
      [Top down]:
          0  (root) 0 #1
          1     29 #2
          1      test 29 #3
          2        opt_function 29 #4
          2          opt_function 29 #5
                         deopted at 118 with reason 'not a heap number'
                         deopted at 137 with reason 'division by zero'
      
      BUG=452067
      LOG=n
      
      Committed: https://crrev.com/ce8701b247d3c6604f24f17a90c02d17b4417f54
      Cr-Commit-Position: refs/heads/master@{#26615}
      
      Review URL: https://codereview.chromium.org/919953002
      
      Cr-Commit-Position: refs/heads/master@{#26630}
      d23ab23b