1. 19 Apr, 2016 1 commit
    • adamk's avatar
      Remove all non-function-name uses of CONST_LEGACY · 59546149
      adamk authored
      Now that all 'const' declarations are of the ES2015 variety, the only
      use of CONST_LEGACY is for function name bindings in sloppy mode
      named function expressions.
      
      This patch aims to delete all code meant to handle other cases, which
      mostly had to do with hole initialization/hole checks. Since function
      name bindings are initialized at entry to a function, it's impossible
      to ever observe one in an uninitialized state.
      
      To simplify the patch further, it removes the `IMPORT` VariableMode,
      as it's not likely to be needed (IMPORT is identical to CONST for
      the purpose of VariableMode).
      
      Review URL: https://codereview.chromium.org/1895973002
      
      Cr-Commit-Position: refs/heads/master@{#35632}
      59546149
  2. 15 Apr, 2016 1 commit
  3. 13 Apr, 2016 1 commit
  4. 12 Apr, 2016 1 commit
  5. 11 Apr, 2016 3 commits
  6. 08 Apr, 2016 2 commits
    • jfb's avatar
      Revert of Fix printf formats (patchset #8 id:140001 of... · 4c4fdc2d
      jfb authored
      Revert of Fix printf formats (patchset #8 id:140001 of https://codereview.chromium.org/1869433004/ )
      
      Reason for revert:
      One small issue easily fixed here: https://codereview.chromium.org/1867333003/
      
      But it looks like MSVS 2013 doesn't like some of the formats and exists with the unhelpful:
      Stderr:
      f:\dd\vctools\crt\crtw32\stdio\output.c(1125) : Assertion failed: ("Incorrect
      format specifier", 0)
      
      It's easier to revert for now, I'll dig more into the docs:
      https://msdn.microsoft.com/en-us/library/56e442dc(v=vs.120).aspx
      https://msdn.microsoft.com/en-us/library/tcxf1dw6(v=vs.120).aspx
      
      And then resubmit, making sure I run these bots.
      
      Original issue's description:
      > Fix printf formats
      >
      > The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL:
      >
      >  - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h.
      >  - Uses it appropriately.
      >  - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done).
      >  - Fixes a bunch of incorrect formats.
      >
      > R= jochen@chromium.org, bmeurer@chromium.org, yangguo@chromium.org, ahaas@chromium.org
      >
      > Committed: https://crrev.com/6ebf9fbb93d31f9be41156a3325d58704ed4933d
      > Cr-Commit-Position: refs/heads/master@{#35365}
      
      TBR=jochen@chromium.org,bmeurer@chromium.org,yangguo@chromium.org,ahaas@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      
      Review URL: https://codereview.chromium.org/1867383002
      
      Cr-Commit-Position: refs/heads/master@{#35366}
      4c4fdc2d
    • jfb's avatar
      Fix printf formats · 6ebf9fbb
      jfb authored
      The usage of __attribute__((format(x, y)) was either wrong or missing from multiple functions, leading to erroneous formats. This CL:
      
       - Imports PRINTF_FORMAT macro from Chrome's src/base/compiler-specific.h.
       - Uses it appropriately.
       - Imports Chrome's base/format_macros.h mainly to fix size_t formats (further cleanup could be done).
       - Fixes a bunch of incorrect formats.
      
      R= jochen@chromium.org, bmeurer@chromium.org, yangguo@chromium.org, ahaas@chromium.org
      
      Review URL: https://codereview.chromium.org/1869433004
      
      Cr-Commit-Position: refs/heads/master@{#35365}
      6ebf9fbb
  7. 04 Apr, 2016 2 commits
    • neis's avatar
      Move comment above associated declaration so some GUIs can pick it up. · f5b8511b
      neis authored
      R=mstarzinger@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1857703002
      
      Cr-Commit-Position: refs/heads/master@{#35228}
      f5b8511b
    • neis's avatar
      Preserve exception message in iterator finalization. · f70b3d3b
      neis authored
      The parser uses a try-catch in order to record when the client of an iterator
      throws.  The exception then used to get rethrown via 'throw', which
      unfortunately resulted in the original exception message object getting
      overwritten.
      
      This CL solves this as follows:
      - add a clear_pending_message flag to TryCatchStatement (set to true in normal
        cases),
      - set clear_pending_message to false for the TryCatchStatement used in iterator
        finalization
      - change full-codegen, turbofan, and the interpreter to emit the ClearPendingMessage call
        only when the flag is set,
      - replace 'throw' with '%ReThrow' in the iterator finalization code, thus
        reusing the (not-cleared) pending message
      
      R=littledan@chromium.org, mstarzinger@chromium.org, yangguo@chromium.org
      BUG=v8:4875
      LOG=n
      
      Review URL: https://codereview.chromium.org/1842953003
      
      Cr-Commit-Position: refs/heads/master@{#35226}
      f70b3d3b
  8. 31 Mar, 2016 1 commit
  9. 22 Mar, 2016 1 commit
    • adamk's avatar
      Remove support for legacy const, part 1 · ed18aa65
      adamk authored
      Now that ES2015 const has shipped, in Chrome 49, legacy const declarations
      are no more. This lets us remove a bunch of code from many parts of the
      codebase.
      
      In this patch, I remove parser support for generating legacy const variables
      from const declarations. This also removes the special "illegal declaration"
      bit from Scope, which has ripples into all compiler backends.
      
      Also gone are any tests which relied on legacy const declarations.
      
      Note that we do still generate a Variable in mode CONST_LEGACY in one case:
      function name bindings in sloppy mode. The likely fix there is to add a new
      Variable::Kind for this case and handle it appropriately for stores in each
      backend, but I leave that for a later patch to make this one completely
      subtractive.
      
      Review URL: https://codereview.chromium.org/1819123002
      
      Cr-Commit-Position: refs/heads/master@{#35002}
      ed18aa65
  10. 18 Mar, 2016 2 commits
  11. 17 Mar, 2016 1 commit
  12. 16 Mar, 2016 1 commit
  13. 15 Mar, 2016 2 commits
  14. 10 Mar, 2016 1 commit
  15. 08 Mar, 2016 2 commits
  16. 07 Mar, 2016 1 commit
    • ishell's avatar
      [crankshaft] Support ES6 tail call elimination. · 22938040
      ishell authored
      HInvokeFunction and HApplyArguments instructions now support tail calling.
      
      Inlining of calls at tail position is not supported yet and therefore still disabled.
      
      The tail-call-megatest was modified so that the usages of "arguments" object do not disable Crankshaft.
      
      TBR=bmeurer@chromium.org
      BUG=v8:4698
      LOG=N
      
      Review URL: https://codereview.chromium.org/1760253003
      
      Cr-Commit-Position: refs/heads/master@{#34542}
      22938040
  17. 06 Mar, 2016 1 commit
    • neis's avatar
      Get rid of the different kinds of yield in the AST & full-codegen. · f24dffea
      neis authored
      Now there is just one kind, corresponding to what was called "initial" before.
      Replacement for "suspend": when the parser sees a yield in JS code, it
      will turn it into a Yield node but wrap its argument in an iterator result
      object.  Replacement for "final": the parser simply inserts a return statement
      instead.
      
      R=littledan@chromium.org, mstarzinger@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1751613004
      
      Cr-Commit-Position: refs/heads/master@{#34515}
      f24dffea
  18. 04 Mar, 2016 1 commit
    • mvstanton's avatar
      Allow Crankshaft to tolerate certain do-expressions · 67838546
      mvstanton authored
      Crankshaft can't track operand/environment changes between arbitrary statements.
      We need that to fully support do-expressions. Instead, a subset is supported
      by bailing out on break statements, continue statements, and if we've made an
      OSR entry within a do-expression.
      
      This partial support is a good idea because do-expressions are a useful tool
      for desugaring during parsing.
      
      BUG=
      R=mstarzinger@chromium.org
      
      Review URL: https://codereview.chromium.org/1769463002
      
      Cr-Commit-Position: refs/heads/master@{#34491}
      67838546
  19. 02 Mar, 2016 1 commit
  20. 01 Mar, 2016 1 commit
  21. 29 Feb, 2016 2 commits
  22. 26 Feb, 2016 1 commit
  23. 25 Feb, 2016 1 commit
  24. 19 Feb, 2016 6 commits
    • mvstanton's avatar
      ES6: Desugaring of instanceof to support @@hasInstance · deb7d5b0
      mvstanton authored
      This is a rework of the instanceof operator to support ES6 semantics
      (as per section 12.10.4 of the spec:
      https://tc39.github.io/ecma262/#sec-instanceofoperator).
      
      It's behind flag --harmony-instanceof for now, which is turned on for staging.
      
      BUG=v8:4447
      LOG=N
      
      Review URL: https://codereview.chromium.org/1692713005
      
      Cr-Commit-Position: refs/heads/master@{#34170}
      deb7d5b0
    • nikolaos's avatar
      This patch implements an alternative approach to the rewriting · ed665880
      nikolaos authored
      of non-pattern expressions, according to the (internally circulated)
      design document.  Details to be provided here.
      
      1.  RewritableAssignmentExpression has been renamed to RewritableExpression.
          It is a wrapper for AST nodes that wait for some potential rewriting
          (that may or may not happen).  Also, Is... and As... macros now see
          through RewritableExpressions.
      
      2.  The function state keeps a list of rewritable expressions that must be
          rewritten only if they are used as non-pattern expressions.
      
      3.  Expression classifiers are now templates, parameterized by parser
          traits.  They keep some additional state: a pointer to the list of
          non-pattern rewritable expressions.  It is important that expression
          classifiers be used strictly in a stack fashion, from now on.
      
      4.  The RewriteNonPattern function has been simplified.
      
      BUG=chromium:579913
      LOG=N
      
      Committed: https://crrev.com/7f5c864a6faf2b957b7273891e143b9bde35487c
      Cr-Commit-Position: refs/heads/master@{#34154}
      
      Review URL: https://codereview.chromium.org/1702063002
      
      Cr-Commit-Position: refs/heads/master@{#34162}
      ed665880
    • jarin's avatar
      Ship Turbofan try-catch. · bd6ddb83
      jarin authored
      Another attempt, after the failing test (flushed bug) has been disabled
      in chromium (https://codereview.chromium.org/1710353002).
      
      Review URL: https://codereview.chromium.org/1713033002
      
      Cr-Commit-Position: refs/heads/master@{#34159}
      bd6ddb83
    • machenbach's avatar
      Revert of Non-pattern rewriting revisited (patchset #3 id:40001 of... · 5bb6b47b
      machenbach authored
      Revert of Non-pattern rewriting revisited (patchset #3 id:40001 of https://codereview.chromium.org/1702063002/ )
      
      Reason for revert:
      [Sheriff] This makes jsfunfuzz unhappy:
      https://build.chromium.org/p/client.v8/builders/V8%20Fuzzer/builds/7681
      
      Original issue's description:
      > This patch implements an alternative approach to the rewriting
      > of non-pattern expressions, according to the (internally circulated)
      > design document.  Details to be provided here.
      >
      > 1.  RewritableAssignmentExpression has been renamed to RewritableExpression.
      >     It is a wrapper for AST nodes that wait for some potential rewriting
      >     (that may or may not happen).  Also, Is... and As... macros now see
      >     through RewritableExpressions.
      >
      > 2.  The function state keeps a list of rewritable expressions that must be
      >     rewritten only if they are used as non-pattern expressions.
      >
      > 3.  Expression classifiers are now templates, parameterized by parser
      >     traits.  They keep some additional state: a pointer to the list of
      >     non-pattern rewritable expressions.  It is important that expression
      >     classifiers be used strictly in a stack fashion, from now on.
      >
      > 4.  The RewriteNonPattern function has been simplified.
      >
      > BUG=chromium:579913
      > LOG=N
      >
      > Committed: https://crrev.com/7f5c864a6faf2b957b7273891e143b9bde35487c
      > Cr-Commit-Position: refs/heads/master@{#34154}
      
      TBR=rossberg@chromium.org,bmeurer@chromium.org,titzer@chromium.org,nikolaos@chromium.org
      # Skipping CQ checks because original CL landed less than 1 days ago.
      NOPRESUBMIT=true
      NOTREECHECKS=true
      NOTRY=true
      BUG=chromium:579913
      
      Review URL: https://codereview.chromium.org/1712203002
      
      Cr-Commit-Position: refs/heads/master@{#34158}
      5bb6b47b
    • nikolaos's avatar
      This patch implements an alternative approach to the rewriting · 7f5c864a
      nikolaos authored
      of non-pattern expressions, according to the (internally circulated)
      design document.  Details to be provided here.
      
      1.  RewritableAssignmentExpression has been renamed to RewritableExpression.
          It is a wrapper for AST nodes that wait for some potential rewriting
          (that may or may not happen).  Also, Is... and As... macros now see
          through RewritableExpressions.
      
      2.  The function state keeps a list of rewritable expressions that must be
          rewritten only if they are used as non-pattern expressions.
      
      3.  Expression classifiers are now templates, parameterized by parser
          traits.  They keep some additional state: a pointer to the list of
          non-pattern rewritable expressions.  It is important that expression
          classifiers be used strictly in a stack fashion, from now on.
      
      4.  The RewriteNonPattern function has been simplified.
      
      BUG=chromium:579913
      LOG=N
      
      Review URL: https://codereview.chromium.org/1702063002
      
      Cr-Commit-Position: refs/heads/master@{#34154}
      7f5c864a
    • adamk's avatar
      Don't reflect ES2015 Function name inference in Function.prototype.toString · cc2ea257
      adamk authored
      Various syntactic forms now cause functions to have names where they
      didn't before. Per the upcoming changes to the toString spec, only
      a name that was literally part of a function's expression or declaration
      is meant to be reflected in toString. This also happens to be the same
      set of names that V8 currently outputs (without the --harmony-function-name
      flag).
      
      This required distinguishing anonymous FunctionExpressions from other sorts
      of function definitions (like methods and getters/setters) in the AST, parser,
      and at runtime.
      
      The patch also takes the opportunity to remove one more argument (and enum)
      from FunctionLiteral, as well as adding a special factory method for the
      case of a FunctionLiteral representing toplevel or eval'd code.
      
      BUG=v8:4760
      LOG=n
      
      Review URL: https://codereview.chromium.org/1712833002
      
      Cr-Commit-Position: refs/heads/master@{#34132}
      cc2ea257
  25. 18 Feb, 2016 3 commits
    • adamk's avatar
      Remove strong mode support from Scope and Variable · 63efda35
      adamk authored
      This frees up one bit in FunctionKind, which I plan to make slightly
      more syntactic info about functions available in SharedFunctionInfo
      (needed for ES2015 Function.name support).
      
      BUG=v8:3956, v8:4760
      LOG=n
      
      Review URL: https://codereview.chromium.org/1704223002
      
      Cr-Commit-Position: refs/heads/master@{#34125}
      63efda35
    • ishell's avatar
      [es6] Disable tail call optimization in optimizing compilers for now. · 1d420199
      ishell authored
      BUG=v8:4698
      LOG=N
      
      Review URL: https://codereview.chromium.org/1713533002
      
      Cr-Commit-Position: refs/heads/master@{#34115}
      1d420199
    • rossberg's avatar
      [es6] Implement for-of iterator finalization · cb1bf4af
      rossberg authored
      Implements iterator finalisation by desugaring for-of loops with an additional try-finally wrapper. See comment in parser.cc for details.
      
      Also improved some AST printing facilities while there.
      
      @Ross, I had to disable the bytecode generation test for for-of, because it got completely out of hand after this change (the new bytecode has 150+ lines). See the TODO that I assigned to you.
      
      Patch set 1 is WIP patch by Georg (http://crrev.com/1695583003), patch set 2 relative changes.
      
      @Georg, FYI, I changed the following:
      
      - Moved try-finally out of the loop body, for performance, and in order to be able to handle `continue` correctly.
      - Fixed scope management in ParseForStatement, which was the cause for the variable allocation failure.
      - Fixed pre-existing zone initialisation bug in rewriter, which caused the crashes.
      - Enabled all tests, adjusted a few others, added a couple more.
      
      BUG=v8:2214
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1695393003
      
      Cr-Commit-Position: refs/heads/master@{#34111}
      cb1bf4af