1. 14 Nov, 2016 1 commit
    • tebbi's avatar
      This CL enables precise source positions for all V8 compilers. It merges... · c3a6ca68
      tebbi authored
      This CL enables precise source positions for all V8 compilers. It merges compiler::SourcePosition and internal::SourcePosition to a single class used throughout the codebase. The new internal::SourcePosition instances store an id identifying an inlined function in addition to a script offset.
      SourcePosition::InliningId() refers to a the new table DeoptimizationInputData::InliningPositions(), which provides the following data for every inlining id:
       - The inlined SharedFunctionInfo as an offset into DeoptimizationInfo::LiteralArray
       - The SourcePosition of the inlining. Recursively, this yields the full inlining stack.
      Before the Code object is created, the same information can be found in CompilationInfo::inlined_functions().
      
      If SourcePosition::InliningId() is SourcePosition::kNotInlined, it refers to the outer (non-inlined) function.
      So every SourcePosition has full information about its inlining stack, as long as the corresponding Code object is known. The internal represenation of a source position is a positive 64bit integer.
      
      All compilers create now appropriate source positions for inlined functions. In the case of Turbofan, this required using AstGraphBuilderWithPositions for inlined functions too. So this class is now moved to a header file.
      
      At the moment, the additional information in source positions is only used in --trace-deopt and --code-comments. The profiler needs to be updated, at the moment it gets the correct script offsets from the deopt info, but the wrong script id from the reconstructed deopt stack, which can lead to wrong outputs. This should be resolved by making the profiler use the new inlining information for deopts.
      
      I activated the inlined deoptimization tests in test-cpu-profiler.cc for Turbofan, changing them to a case where the deopt stack and the inlining position agree. It is currently still broken for other cases.
      
      The following additional changes were necessary:
       - The source position table (internal::SourcePositionTableBuilder etc.) supports now 64bit source positions. Encoding source positions in a single 64bit int together with the difference encoding in the source position table results in very little overhead for the inlining id, since only 12% of the source positions in Octane have a changed inlining id.
       - The class HPositionInfo was effectively dead code and is now removed.
       - SourcePosition has new printing and information facilities, including computing a full inlining stack.
       - I had to rename compiler/source-position.{h,cc} to compiler/compiler-source-position-table.{h,cc} to avoid clashes with the new src/source-position.cc file.
       - I wrote the new wrapper PodArray for ByteArray. It is a template working with any POD-type. This is used in DeoptimizationInputData::InliningPositions().
       - I removed HInlinedFunctionInfo and HGraph::inlined_function_infos, because they were only used for the now obsolete Crankshaft inlining ids.
       - Crankshaft managed a list of inlined functions in Lithium: LChunk::inlined_functions. This is an analog structure to CompilationInfo::inlined_functions. So I removed LChunk::inlined_functions and made Crankshaft use CompilationInfo::inlined_functions instead, because this was necessary to register the offsets into the literal array in a uniform way. This is a safe change because LChunk::inlined_functions has no other uses and the functions in CompilationInfo::inlined_functions have a strictly longer lifespan, being created earlier (in Hydrogen already).
      
      BUG=v8:5432
      
      Review-Url: https://codereview.chromium.org/2451853002
      Cr-Commit-Position: refs/heads/master@{#40975}
      c3a6ca68
  2. 10 Nov, 2016 1 commit
  3. 07 Nov, 2016 1 commit
  4. 02 Nov, 2016 1 commit
    • verwaest's avatar
      Thread decls-list through Declaration using a ThreadedList · 5a18685e
      verwaest authored
      This reduces per-scope overhead from minimally 6 words to 2 words, with one additional pointer per entry, rather than an average of 2 per entry for larger-than-4 element lists. For temp zone parsed functions it additionally makes the declaration-list actually freeable.
      
      This introduces ThreadedList to implement the details of dealing with such a list.
      
      BUG=v8:5209
      
      Review-Url: https://codereview.chromium.org/2457393003
      Cr-Commit-Position: refs/heads/master@{#40703}
      5a18685e
  5. 31 Oct, 2016 1 commit
  6. 25 Oct, 2016 1 commit
    • jgruber's avatar
      [regexp] Remove unused code · 77ddcfb3
      jgruber authored
      This CL removes code that is now unused since the port of regexp.js has been
      completed. Removed functions / classes are:
      
      * regexp.js (GetSubstitution moved to string.js)
      * RegExpConstructResult stub
      * RegExpFlags intrinsic
      * RegExpSource intrinsic
      * RegExpInitializeAndCompile runtime function
      
      BUG=v8:5339
      
      Review-Url: https://codereview.chromium.org/2448463002
      Cr-Commit-Position: refs/heads/master@{#40547}
      77ddcfb3
  7. 20 Oct, 2016 1 commit
  8. 18 Oct, 2016 1 commit
  9. 17 Oct, 2016 4 commits
  10. 11 Oct, 2016 2 commits
  11. 07 Oct, 2016 2 commits
  12. 30 Sep, 2016 1 commit
  13. 28 Sep, 2016 1 commit
  14. 23 Sep, 2016 1 commit
  15. 20 Sep, 2016 3 commits
  16. 19 Sep, 2016 2 commits
  17. 13 Sep, 2016 1 commit
  18. 06 Sep, 2016 1 commit
    • marja's avatar
      Include only stuff you need, part 8: Fix debug.h -> liveedit.h. · 51a3ffd9
      marja authored
      Rebuilding (after touching certain files) is crazy slow because
      includes are out of control.
      
      The (last remaining) offending include path is: ast.h <- liveedit.h <-
      debug.h <- src/x64/assembler-whatever-port-inl.h <-
      src/macro-assembler.h <- everything possible
      
      With this CL, the rebuild steps needed when touching ast-value-factory.h
      drops from 365 to 181.
      
      BUG=v8:5294
      TBR=bmeurer@chromium.org
      
      Review-Url: https://codereview.chromium.org/2316443002
      Cr-Commit-Position: refs/heads/master@{#39195}
      51a3ffd9
  19. 02 Sep, 2016 1 commit
    • 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
  20. 31 Aug, 2016 1 commit
  21. 25 Aug, 2016 1 commit
    • rmcilroy's avatar
      [Compiler] Add compile operations to CompilerDispatcherJob. · c2d2d4d1
      rmcilroy authored
      Adds compile operations to the CompilerDispatcherJob interface. As such,
      introduces Compiler::PrepareUnoptimizedCompilationJob and updates the
      unoptimized compilation path to use CompilationJobs. Also unifies
      FinalizeCompilationJob to deal with both optimized and unoptimized
      compilation jobs.
      
      A dummy FullCodegenCompilationJob is also introduced, where all the work
      is done in the ExecuteJob phase, which cannot be run on a
      background thread.
      
      BUG=v8:5203
      
      Review-Url: https://codereview.chromium.org/2251713002
      Cr-Commit-Position: refs/heads/master@{#38897}
      c2d2d4d1
  22. 23 Aug, 2016 1 commit
  23. 22 Aug, 2016 2 commits
  24. 18 Aug, 2016 2 commits
  25. 16 Aug, 2016 4 commits
    • rmcilroy's avatar
      Revert of [Interpreter] Introduce InterpreterCompilationJob (patchset #7... · de2f16d3
      rmcilroy authored
      Revert of [Interpreter] Introduce InterpreterCompilationJob (patchset #7 id:140001 of https://codereview.chromium.org/2240463002/ )
      
      Reason for revert:
      Breaks Win64 bot
      
      Original issue's description:
      > [Interpreter] Introduce InterpreterCompilationJob
      >
      > Adds InterpreterCompilationJob as a sub-class of
      > CompilationJob, to enable off-thread bytecode
      > generation. Currently only used in
      > Interpreter::MakeBytecode.
      >
      > As part of this change, CompilationJob is modified
      > to make it less specific to optimized compilation,
      > renaming the phases as follows:
      >  - CreateGraph -> PrepareJob
      >  - OptimizeGraph -> ExecuteJob
      >  - GenerateCode -> FinalizeJob
      >
      > RegisterWeakObjectsInOptimizedCode is also moved out
      > of CompilationJob and instead becomes a static function
      > on Compiler.
      >
      > BUG=v8:5203
      >
      > Committed: https://crrev.com/1fb6a7e697e8bc5b4af51647553741f966e00cdc
      > Committed: https://crrev.com/785990e9fc0dd9a9d963d25d0bed2909165e4ca9
      > Cr-Original-Commit-Position: refs/heads/master@{#38662}
      > Cr-Commit-Position: refs/heads/master@{#38668}
      
      TBR=mstarzinger@chromium.org,jkummerow@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:5203
      
      Review-Url: https://codereview.chromium.org/2251673003
      Cr-Commit-Position: refs/heads/master@{#38669}
      de2f16d3
    • rmcilroy's avatar
      [Interpreter] Introduce InterpreterCompilationJob · 785990e9
      rmcilroy authored
      Adds InterpreterCompilationJob as a sub-class of
      CompilationJob, to enable off-thread bytecode
      generation. Currently only used in
      Interpreter::MakeBytecode.
      
      As part of this change, CompilationJob is modified
      to make it less specific to optimized compilation,
      renaming the phases as follows:
       - CreateGraph -> PrepareJob
       - OptimizeGraph -> ExecuteJob
       - GenerateCode -> FinalizeJob
      
      RegisterWeakObjectsInOptimizedCode is also moved out
      of CompilationJob and instead becomes a static function
      on Compiler.
      
      BUG=v8:5203
      
      Committed: https://crrev.com/1fb6a7e697e8bc5b4af51647553741f966e00cdc
      Review-Url: https://codereview.chromium.org/2240463002
      Cr-Original-Commit-Position: refs/heads/master@{#38662}
      Cr-Commit-Position: refs/heads/master@{#38668}
      785990e9
    • rmcilroy's avatar
      Revert of [Interpreter] Introduce InterpreterCompilationJob (patchset #7... · ce65e105
      rmcilroy authored
      Revert of [Interpreter] Introduce InterpreterCompilationJob (patchset #7 id:140001 of https://codereview.chromium.org/2240463002/ )
      
      Reason for revert:
      Failing on Win64 bot:
      https://build.chromium.org/p/client.v8/builders/V8%20Win64/builds/12061/steps/Check/logs/regress-635429
      
      Original issue's description:
      > [Interpreter] Introduce InterpreterCompilationJob
      >
      > Adds InterpreterCompilationJob as a sub-class of
      > CompilationJob, to enable off-thread bytecode
      > generation. Currently only used in
      > Interpreter::MakeBytecode.
      >
      > As part of this change, CompilationJob is modified
      > to make it less specific to optimized compilation,
      > renaming the phases as follows:
      >  - CreateGraph -> PrepareJob
      >  - OptimizeGraph -> ExecuteJob
      >  - GenerateCode -> FinalizeJob
      >
      > RegisterWeakObjectsInOptimizedCode is also moved out
      > of CompilationJob and instead becomes a static function
      > on Compiler.
      >
      > BUG=v8:5203
      >
      > Committed: https://crrev.com/1fb6a7e697e8bc5b4af51647553741f966e00cdc
      > Cr-Commit-Position: refs/heads/master@{#38662}
      
      TBR=mstarzinger@chromium.org,jkummerow@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:5203
      
      Review-Url: https://codereview.chromium.org/2249153002
      Cr-Commit-Position: refs/heads/master@{#38663}
      ce65e105
    • rmcilroy's avatar
      [Interpreter] Introduce InterpreterCompilationJob · 1fb6a7e6
      rmcilroy authored
      Adds InterpreterCompilationJob as a sub-class of
      CompilationJob, to enable off-thread bytecode
      generation. Currently only used in
      Interpreter::MakeBytecode.
      
      As part of this change, CompilationJob is modified
      to make it less specific to optimized compilation,
      renaming the phases as follows:
       - CreateGraph -> PrepareJob
       - OptimizeGraph -> ExecuteJob
       - GenerateCode -> FinalizeJob
      
      RegisterWeakObjectsInOptimizedCode is also moved out
      of CompilationJob and instead becomes a static function
      on Compiler.
      
      BUG=v8:5203
      
      Review-Url: https://codereview.chromium.org/2240463002
      Cr-Commit-Position: refs/heads/master@{#38662}
      1fb6a7e6
  26. 05 Aug, 2016 2 commits