1. 23 Feb, 2016 1 commit
    • mstarzinger's avatar
      [fullcodegen] Implement operand stack depth tracking. · 38915ed7
      mstarzinger authored
      This implements a mechanism to track the exact depth of the operand
      stack in full-codegen for every sub-expression visitation. So far we
      only tracked the depth at statement level, but not at expression level.
      With the introduction of do-expressions it will be possible to construct
      local control flow (i.e. break, continue and friends) that target labels
      at an arbitrary operand stack depth, making this tracking a prerequisite
      for full do-expression support.
      
      R=rossberg@chromium.org,jarin@chromium.org
      BUG=v8:4755,v8:4488
      LOG=n
      
      Review URL: https://codereview.chromium.org/1706283002
      
      Cr-Commit-Position: refs/heads/master@{#34211}
      38915ed7
  2. 21 Jan, 2016 1 commit
  3. 18 Jan, 2016 1 commit
    • nikolaos's avatar
      Fix re-indexing for literals in do-expressions · 9ed5596a
      nikolaos authored
      This became temporarily a big issue, because spreads are desugared
      into do-expressions.  This patch fixes the problem with having
      spreads as parameter initializers in arrow expressions, e.g., this
      line would crash:
      
          [], ((x = [...[42]]) => x)();
      
      R=rossberg@chromium.org
      BUG=chromium:578038
      LOG=N
      
      Review URL: https://codereview.chromium.org/1581403007
      
      Cr-Commit-Position: refs/heads/master@{#33365}
      9ed5596a
  4. 14 Jan, 2016 1 commit
    • rossberg's avatar
      Don't pre-initialise block contexts with holes · 92e6f7a3
      rossberg authored
      Respective declarations will explicitly initialise slots
      with the hole anyway, so this always was unnecessary.
      With varblocks it even became wrong, because block contexts
      may now host var bindings, which want undefined.
      
      Fixes the hole leaking when accessing an unitialised,
      block-context-allocated var.
      
      R=neis@chromium.org
      BUG=571149
      LOG=N
      
      Review URL: https://codereview.chromium.org/1584243002
      
      Cr-Commit-Position: refs/heads/master@{#33309}
      92e6f7a3
  5. 12 Jan, 2016 1 commit
  6. 08 Jan, 2016 2 commits
    • littledan's avatar
      Reland of Ship ES2015 sloppy-mode function hoisting, let, class (patchset #1... · 23235b5f
      littledan authored
      Reland of Ship ES2015 sloppy-mode function hoisting, let, class (patchset #1 id:1 of https://codereview.chromium.org/1565263002/ )
      
      Reason for revert:
      Crash fixed by https://codereview.chromium.org/1564923007
      
      Original issue's description:
      > Revert of Ship ES2015 sloppy-mode function hoisting, let, class (patchset #7 id:120001 of https://codereview.chromium.org/1551443002/ )
      >
      > Reason for revert:
      > Causes frequent crashes in Canary: chromium:537816
      >
      > Original issue's description:
      > > Ship ES2015 sloppy-mode function hoisting, let, class
      > >
      > > This patch doesn't ship all features of ES2015 variable/scoping
      > > changes, notably omitting the removal of legacy const. I think
      > > function hoisting, let and class in sloppy mode can stand to
      > > themselves as a package, and the legacy const change is much
      > > riskier and more likely to be reverted, so my intention is to
      > > pursue those as a separate, follow-on patch.
      > >
      > > R=adamk@chromium.org
      > > BUG=v8:4285,v8:3305
      > > LOG=Y
      > > CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
      > >
      > > Committed: https://crrev.com/fcff8588a5a01587643d6c2507c7b882c78a2957
      > > Cr-Commit-Position: refs/heads/master@{#33133}
      >
      > TBR=adamk@chromium.org
      > # Not skipping CQ checks because original CL landed more than 1 days ago.
      > BUG=v8:4285,v8:3305,chromium:537816
      > LOG=Y
      >
      > Committed: https://crrev.com/adac5956c6216056a211cfaa460a00ac1500d8f8
      > Cr-Commit-Position: refs/heads/master@{#33162}
      
      TBR=adamk@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4285,v8:3305,chromium:537816
      
      Review URL: https://codereview.chromium.org/1571793002
      
      Cr-Commit-Position: refs/heads/master@{#33189}
      23235b5f
    • nikolaos's avatar
      Fix for temporaries in parameter initializers · 0406fa22
      nikolaos authored
      This patch introduces a mechanism for changing the scope of temporary
      variables, which is necessary for rewriting arrow parameter
      initializers.
      
      It also fixes a potential bug in AstExpressionVisitor, which did not
      visit the automatically generated members of ForEachStatement.
      
      Fixes test/mjsunit/harmony/regress/regress-4658.js
      
      R=rossberg@chromium.org
      BUG=v8:4658
      LOG=N
      
      Review URL: https://codereview.chromium.org/1564343002
      
      Cr-Commit-Position: refs/heads/master@{#33183}
      0406fa22
  7. 07 Jan, 2016 1 commit
    • littledan's avatar
      Revert of Ship ES2015 sloppy-mode function hoisting, let, class (patchset #7... · adac5956
      littledan authored
      Revert of Ship ES2015 sloppy-mode function hoisting, let, class (patchset #7 id:120001 of https://codereview.chromium.org/1551443002/ )
      
      Reason for revert:
      Causes frequent crashes in Canary: chromium:537816
      
      Original issue's description:
      > Ship ES2015 sloppy-mode function hoisting, let, class
      >
      > This patch doesn't ship all features of ES2015 variable/scoping
      > changes, notably omitting the removal of legacy const. I think
      > function hoisting, let and class in sloppy mode can stand to
      > themselves as a package, and the legacy const change is much
      > riskier and more likely to be reverted, so my intention is to
      > pursue those as a separate, follow-on patch.
      >
      > R=adamk@chromium.org
      > BUG=v8:4285,v8:3305
      > LOG=Y
      > CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
      >
      > Committed: https://crrev.com/fcff8588a5a01587643d6c2507c7b882c78a2957
      > Cr-Commit-Position: refs/heads/master@{#33133}
      
      TBR=adamk@chromium.org
      # Not skipping CQ checks because original CL landed more than 1 days ago.
      BUG=v8:4285,v8:3305,chromium:537816
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1565263002
      
      Cr-Commit-Position: refs/heads/master@{#33162}
      adac5956
  8. 06 Jan, 2016 1 commit
    • littledan's avatar
      Ship ES2015 sloppy-mode function hoisting, let, class · fcff8588
      littledan authored
      This patch doesn't ship all features of ES2015 variable/scoping
      changes, notably omitting the removal of legacy const. I think
      function hoisting, let and class in sloppy mode can stand to
      themselves as a package, and the legacy const change is much
      riskier and more likely to be reverted, so my intention is to
      pursue those as a separate, follow-on patch.
      
      R=adamk@chromium.org
      BUG=v8:4285,v8:3305
      LOG=Y
      CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
      
      Review URL: https://codereview.chromium.org/1551443002
      
      Cr-Commit-Position: refs/heads/master@{#33133}
      fcff8588
  9. 12 Dec, 2015 1 commit
  10. 11 Dec, 2015 1 commit
  11. 01 Dec, 2015 1 commit
  12. 18 Nov, 2015 1 commit
  13. 13 Nov, 2015 1 commit
  14. 12 Nov, 2015 1 commit
  15. 29 Oct, 2015 1 commit
    • adamk's avatar
      Fix eval calls in initializers of arrow function parameters · 0bdaa4d8
      adamk authored
      This requires copying usage flags from the outer scope to the
      arrow scope upon encountering the arrow token.
      
      In order to properly pass-on the calls_eval bit, now record
      that bit on script scopes just like everywhere else, and add
      necessary code to scopes.cc to handle that change in behavior.
      
      Also factored out scope flag propagation to its own method to
      make the call site simple (though note that only the eval
      bit makes any difference for arrows).
      
      BUG=v8:4395
      LOG=n
      
      Review URL: https://codereview.chromium.org/1423613002
      
      Cr-Commit-Position: refs/heads/master@{#31660}
      0bdaa4d8
  16. 28 Oct, 2015 1 commit
  17. 24 Oct, 2015 1 commit
  18. 21 Oct, 2015 2 commits
  19. 20 Oct, 2015 2 commits
    • bmeurer's avatar
      Revert of [es6] Fix scoping for default parameters in arrow functions... · e41614a0
      bmeurer authored
      Revert of [es6] Fix scoping for default parameters in arrow functions (patchset #5 id:80001 of https://codereview.chromium.org/1405313002/ )
      
      Reason for revert:
      Breaks nosnap: http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug%20-%202/builds/2407/steps/Check/logs/regress-4395
      
      Original issue's description:
      > [es6] Fix scoping for default parameters in arrow functions
      >
      > When eagerly parsing arrow functions, expressions in default
      > parameter initializers are parsed in the enclosing scope,
      > rather than in the function's scope (since that scope does not
      > yet exist). This leads to VariableProxies being added to the
      > wrong scope, and scope chains for FunctionLiterals being incorrect.
      >
      > This patch addresses these problems by adding a subclass of
      > AstExpressionVisitor that moves VariableProxies to the proper
      > scope and fixes up scope chains of FunctionLiterals.
      >
      > More work likely still needs to be done to make this work completely,
      > but it's very close to correct.
      >
      > BUG=v8:4395
      > LOG=y
      >
      > Committed: https://crrev.com/cf72aad39e51de9b7074ea039377c1812f4a2c6b
      > Cr-Commit-Position: refs/heads/master@{#31402}
      
      TBR=rossberg@chromium.org,caitpotter88@gmail.com,adamk@chromium.org
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4395
      
      Review URL: https://codereview.chromium.org/1417463004
      
      Cr-Commit-Position: refs/heads/master@{#31404}
      e41614a0
    • adamk's avatar
      [es6] Fix scoping for default parameters in arrow functions · cf72aad3
      adamk authored
      When eagerly parsing arrow functions, expressions in default
      parameter initializers are parsed in the enclosing scope,
      rather than in the function's scope (since that scope does not
      yet exist). This leads to VariableProxies being added to the
      wrong scope, and scope chains for FunctionLiterals being incorrect.
      
      This patch addresses these problems by adding a subclass of
      AstExpressionVisitor that moves VariableProxies to the proper
      scope and fixes up scope chains of FunctionLiterals.
      
      More work likely still needs to be done to make this work completely,
      but it's very close to correct.
      
      BUG=v8:4395
      LOG=y
      
      Review URL: https://codereview.chromium.org/1405313002
      
      Cr-Commit-Position: refs/heads/master@{#31402}
      cf72aad3
  20. 12 Oct, 2015 1 commit
  21. 30 Sep, 2015 1 commit
  22. 22 Sep, 2015 1 commit
    • adamk's avatar
      Don't crash when preparsing destructured arguments · 7485da7a
      adamk authored
      This adds the materialized literal count accumulated while parsing the
      parameters (in the parser proper) to that accumulated by the preparser.
      
      This should have been caught in cctest/test-parsing, but it's not covered
      because the parsing tests call directly into the preparser rather than
      using Parser::ParseFunctionLiteral (which fully-parses the parameters
      and then calls into the preparser to skip over the function body).
      
      Note that this further-inflates the materialized literal count for
      functions with destructured arguments, since some of the counted
      literals are actually binding patterns. But that's not specific to
      binding patterns in formal parameters: it happens in function bodies, too.
      
      BUG=v8:4400,v8:4407
      LOG=n
      
      Review URL: https://codereview.chromium.org/1350913005
      
      Cr-Commit-Position: refs/heads/master@{#30868}
      7485da7a
  23. 15 Sep, 2015 1 commit
  24. 02 Sep, 2015 1 commit
  25. 26 Aug, 2015 1 commit
  26. 24 Aug, 2015 1 commit
    • yangguo's avatar
      Revert of Parse arrow functions at proper precedence level (patchset #2... · cc97e524
      yangguo authored
      Revert of Parse arrow functions at proper precedence level (patchset #2 id:60001 of https://codereview.chromium.org/1286383005/ )
      
      Reason for revert:
      Breaks layout test. Please change test expectation on blink first.
      
      --- /mnt/data/b/build/slave/V8-Blink_Linux_64/build/layout-test-results/inspector/sources/debugger-pause/debugger-pause-in-internal-expected.txt
      +++ /mnt/data/b/build/slave/V8-Blink_Linux_64/build/layout-test-results/inspector/sources/debugger-pause/debugger-pause-in-internal-actual.txt
      @@ -1,4 +1,4 @@
      -CONSOLE ERROR: line 9: Uncaught SyntaxError: Expected () to start arrow function, but got '}' instead of '=>'
      +CONSOLE ERROR: line 9: Uncaught SyntaxError: Unexpected token )
       Tests that pause on exception in internal script does not crash.
      
       Script source was shown.
      
      Original issue's description:
      > Parse arrow functions at proper precedence level
      >
      > BUG=v8:4211
      > LOG=Y
      > R=rossberg@chromium.org
      >
      > Committed: https://crrev.com/9271b0ccf9ddb217deb1f0b9ef9b59b64dc40214
      > Cr-Commit-Position: refs/heads/master@{#30298}
      
      TBR=rossberg@chromium.org,mstarzinger@chromium.org,fennyfanny655@gmail.com,machenbach@chromium.org,wingo@igalia.com
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=v8:4211
      
      Review URL: https://codereview.chromium.org/1315503002
      
      Cr-Commit-Position: refs/heads/master@{#30318}
      cc97e524
  27. 21 Aug, 2015 1 commit
  28. 07 Aug, 2015 1 commit
  29. 05 Aug, 2015 1 commit
  30. 04 Aug, 2015 1 commit
  31. 24 Jul, 2015 1 commit
  32. 15 Jul, 2015 1 commit
    • adamk's avatar
      Fix spread array inside array literal · 24e98281
      adamk authored
      During parsing, we now keep track of the first spread seen in an array
      literal (if any), and make use of that information when creating the
      FixedArray backing store representing the constant elements for array
      literal materialization.
      
      The old code tried to do this by setting the generated JSArray's length
      in ArrayLiteral::BuildConstantElements(), but that Array length is never
      read by the rest of the literal materialization code (it always uses
      the length of the FixedArray backing store).
      
      BUG=v8:4298
      LOG=n
      
      Review URL: https://codereview.chromium.org/1225223004
      
      Cr-Commit-Position: refs/heads/master@{#29684}
      24e98281
  33. 26 Jun, 2015 1 commit
  34. 10 Jun, 2015 1 commit
  35. 03 Jun, 2015 1 commit
    • mstarzinger's avatar
      Fix arrow functions requiring context without slots. · 68beef53
      mstarzinger authored
      This fixes a corner-case where arrow functions that require a context
      allocate none, because there are no additional slots allocated. Note
      that this didn't happen with true function scopes because they always
      had at least the receiver slot.
      
      The outcome was a context chain that no longer was in sync with the
      scope chain, hence context slot loads were bogus. This is observable
      using the DYNAMIC_LOCAL optimization in all compilers.
      
      R=rossberg@chromium.org,wingo@igalia.com
      TEST=mjsunit/harmony/regress/regress-4160
      BUG=v8:4160
      LOG=N
      
      Review URL: https://codereview.chromium.org/1146063006
      
      Cr-Commit-Position: refs/heads/master@{#28788}
      68beef53
  36. 23 Apr, 2015 1 commit
  37. 20 Mar, 2015 1 commit