1. 22 Mar, 2017 3 commits
  2. 20 Mar, 2017 1 commit
    • franzih's avatar
      [type profile] Collect return types. · de04df74
      franzih authored
      Collect type information of return values.
      
      Use *one* feedback slot per function for all its return
      statements. For assignments, we currently use
      several slots per function, because not all
      assignments refer to the same variable.
      
      Instead of the variable names, pass the
      source location and print the function name.
      
      Add an integration test for --type-profile that checks
      for crashes.
      
      Remove type feedback for assignments for now as it convolutes the output.
      
      ************ Function with 2 return statements ********
      function testFunction(param, flag) {
        // We want to test 2 different return positions in one function.
        if (flag) {
          var first_var = param;
          return first_var;
        }
        var second_var = param;
        return second_var;
      }
      
      testFunction({});
      testFunction(123, true);
      testFunction('hello');
      testFunction(undefined);
      *******************************************************
      
      ************* Sample Output ***************************
      Function: testFunction
      424: Object
      374: number
      424: string
      424: undefined
      *******************************************************
      
      Missing work:
      * Handle fall-off returns
      * Collect types for parameters
      * Remove duplicates from the list of collected types and use a common base class.
      
      BUG=v8:5935
      
      Review-Url: https://codereview.chromium.org/2755973002
      Cr-Commit-Position: refs/heads/master@{#43956}
      de04df74
  3. 16 Mar, 2017 5 commits
  4. 14 Mar, 2017 4 commits
  5. 22 Feb, 2017 1 commit
  6. 19 Feb, 2017 1 commit
  7. 17 Feb, 2017 1 commit
  8. 14 Feb, 2017 1 commit
  9. 10 Feb, 2017 1 commit
    • caitp's avatar
      [async-await] (simpler) fix for Return in try/finally in async functions · 39642fa2
      caitp authored
      Alternative approach to https://codereview.chromium.org/2667983004/, which
      does not depend on implicit control flow changes from
      https://codereview.chromium.org/2664083002
      
      - Remove handling for `async function` from Parser::RewriteReturn(). This functionality
      is moved to BytecodeGenerator::BuildAsyncReturn(). This ensures that promise resolution
      is deferred until all finally blocks are evaluated fully.
      
      - Add a new deferred command (CMD_ASYNC_RETURN), which instructs ControlScope to
      generate return code using BuildAsyncReturn rather than BuildReturn.
      
      - Parser has a new `NewReturnStatement()` helper which determines what type of return
      statement to generate based on the type of function.
      
      BUG=v8:5896, v8:4483
      R=littledan@chromium.org, neis@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, gsathya@chromium.org
      
      Review-Url: https://codereview.chromium.org/2685683002
      Cr-Commit-Position: refs/heads/master@{#43104}
      39642fa2
  10. 07 Feb, 2017 2 commits
  11. 06 Feb, 2017 1 commit
  12. 04 Feb, 2017 1 commit
  13. 02 Feb, 2017 1 commit
  14. 30 Jan, 2017 1 commit
    • mvstanton's avatar
      [TypeFeedbackVector] Combine the literals array and the feedback vector. · 93f05b64
      mvstanton authored
      They have the same lifetime. It's a match!
      
      Both structures are native context dependent and dealt with (creation,
      clearing, gathering feedback) at the same time. By treating the spaces used
      for literal boilerplates as feedback vector slots, we no longer have to keep
      track of the materialized literal count elsewhere.
      
      A follow-on CL removes even more parser infrastructure related to this count.
      
      BUG=v8:5456
      
      Review-Url: https://codereview.chromium.org/2655853010
      Cr-Commit-Position: refs/heads/master@{#42771}
      93f05b64
  15. 26 Jan, 2017 1 commit
    • leszeks's avatar
      [ast] Temporarily allow handle dereference for debug printing · ba1d747d
      leszeks authored
      There is a print in AstNumbering which needs to dereference the string
      containing the function name, which clashes with the disallowed handle
      reference scope used to allow ast-numbering to run off-thread.
      
      This could be fixed by pushing the print out of this function, and
      somehow propagating disable_crankshaft_reason out of the visitor, but in
      reality this check will soon be removed anyway, and until it is this
      function will be on the main thread, so we may as well just hack it.
      
      Review-Url: https://codereview.chromium.org/2653953006
      Cr-Commit-Position: refs/heads/master@{#42711}
      ba1d747d
  16. 23 Jan, 2017 1 commit
  17. 20 Jan, 2017 3 commits
  18. 19 Jan, 2017 1 commit
  19. 18 Jan, 2017 2 commits
  20. 16 Jan, 2017 1 commit
  21. 11 Jan, 2017 1 commit
    • rmcilroy's avatar
      [compiler] Collect eager inner functions for compilation during renumbering. · a3052cfe
      rmcilroy authored
      This CL modifies the ast-numbering phase to collect function literals which
      should be compiled eagerly. This is then used to eagerly compile the inner
      functions before compiling the outer function. This will be used to queue
      compilation jobs on the CompilerDispatcher in a later CL.
      
      This CL moves the compilation of eager inner functions out of the
      GetSharedFunctionInfo function and instead compiles them explicitly. This
      simplifies GetSharedFunctionInfo and also means there is no need to pass a
      LazyCompilationMode to the function, so this concept has been removed.
      
      BUG=v8:5203,v8:5215
      
      Review-Url: https://codereview.chromium.org/2618553004
      Cr-Commit-Position: refs/heads/master@{#42221}
      a3052cfe
  22. 09 Jan, 2017 2 commits
  23. 22 Dec, 2016 1 commit
  24. 21 Dec, 2016 1 commit
    • mvstanton's avatar
      [TypeFeedbackVector] Root literal arrays in function literals slots · 93df0940
      mvstanton authored
      Literal arrays and feedback vectors for a function can be garbage
      collected if we don't have a rooted closure for the function, which
      happens often. It's expensive to come back from this (recreating
      boilerplates and gathering feedback again), and the cost is
      disproportionate if the function was inlined into optimized code.
      
      To guard against losing these arrays when we need them, we'll now
      create literal arrays when creating the feedback vector for the outer
      closure, and root them strongly in that vector.
      
      BUG=v8:5456
      
      Review-Url: https://codereview.chromium.org/2504153002
      Cr-Commit-Position: refs/heads/master@{#41893}
      93df0940
  25. 07 Dec, 2016 1 commit
    • caitp's avatar
      [ignition] desugar GetIterator() via bytecode rather than via AST · b5f146a0
      caitp authored
      Introduces:
      - a new AST node representing the GetIterator() algorithm in the specification, to be used by ForOfStatement, YieldExpression (in the case of delegating yield*), and the future `for-await-of` loop proposed in http://tc39.github.io/proposal-async-iteration/#sec-async-iterator-value-unwrap-functions.
      - a new opcode (JumpIfJSReceiver), which is useful for `if Type(object) is not Object` checks which are common throughout the specification. This node is easily eliminated by TurboFan.
      
      The AST node is desugared specially in bytecode, rather than manually when building the AST. The benefit of this is that desugaring in the BytecodeGenerator is much simpler and easier to understand than desugaring the AST.
      
      This also reduces parse time very slightly, and allows us to use LoadIC rather than KeyedLoadIC, which seems to have  better baseline performance. This results in a ~20% improvement in test/js-perf-test/Iterators micro-benchmarks, which I believe owes to the use of the slightly faster LoadIC as opposed to the KeyedLoadIC in the baseline case. Both produce identical optimized code via TurboFan when the type check can be eliminated, and the load can be replaced with a constant value.
      
      BUG=v8:4280
      R=bmeurer@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, neis@chromium.org, jarin@chromium.org
      TBR=rossberg@chromium.org
      
      Review-Url: https://codereview.chromium.org/2557593004
      Cr-Commit-Position: refs/heads/master@{#41555}
      b5f146a0
  26. 06 Dec, 2016 1 commit
    • bmeurer's avatar
      [compiler] Improve let+const decision in AstNumbering. · 78691367
      bmeurer authored
      Incooperate suggestion from adamk@ to only sent lexical variables to
      I+TF that require explicit initialization, i.e. don't send named
      function expressions to I+TF. This should recover most of the regression
      now.
      
      Also introduce a regression test for the original let issue.
      
      BUG=chromium:670691,v8:5666
      R=adamk@chromium.org,yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/2556663002
      Cr-Commit-Position: refs/heads/master@{#41507}
      78691367