1. 06 Jun, 2016 1 commit
  2. 25 May, 2016 1 commit
  3. 24 May, 2016 2 commits
  4. 20 May, 2016 1 commit
  5. 18 May, 2016 1 commit
  6. 17 May, 2016 1 commit
    • jgruber's avatar
      [compiler] Add a traversing AST visitor · 62b397a3
      jgruber authored
      Contrary to AstVisitor, which does not implement any traversal logic,
      AstTraversalVisitor provides default implementations for each Visit*
      function which walk through the AST. It is intended to be used as a base
      class for visitors which are only interested in a small portion of the
      AST.
      
      R=yangguo@chromium.org
      
      Review-Url: https://codereview.chromium.org/1963243003
      Cr-Commit-Position: refs/heads/master@{#36283}
      62b397a3
  7. 16 May, 2016 1 commit
  8. 12 May, 2016 3 commits
    • vogelheim's avatar
      Remove Expression::bounds_, in order to conserve memory during parsing. · bb04e124
      vogelheim authored
      Expression::bounds_ is used only by a subset of compile passes, but the
      data structure occupies space for every Expression node ever parsed. This
      unneccessarily increases memory consumption. Particularly, peak memory
      consumption during startup, which may cause out-of-memory errors.
      
      This CL
      - removes Expression::bounds_;
      - introduces an AstTypeBounds container, which mappes Expression* to Bounds;
      - modifies the code that actually requires bounds information, namely
        Crankshaft compile and AsmWasmBuilder, to instantiate such an AstTypeBounds
        container before typing and to pass it to the code that consumes this
        information; and
      - modifies all accesses to Expression::bounds_ to instead access the bounds
        via the container instead.
      
      Additionally, this rewrites test-ast-expression-visitor. The reason is that
      this code attempted to test AstExpressionVisitor but did so exclusively
      through its subclass ExpressionTypeCollector, meaning that the test dealt
      almost exclusively with type bounds despite the class-under-test having
      no knowledge or functionality related to it. Worse, the test was written
      in a way to assume that type bounds were available outside & after
      compilation, which is something this change changes.
      
      BUG=v8:4947
      
      Review-Url: https://codereview.chromium.org/1968383002
      Cr-Commit-Position: refs/heads/master@{#36222}
      bb04e124
    • mstarzinger's avatar
      [wasm] Add flag to validate asm.js modules. · f73cf983
      mstarzinger authored
      This adds the --validate-asm flag which will trigger validation of all
      asm.js modules before they are being compiled. In case a module doesn't
      pass validation, a warning will be printed, but compilation as well as
      execution will continue unhampered.
      
      R=mvstanton@chromium.org
      
      Review-Url: https://codereview.chromium.org/1972593002
      Cr-Commit-Position: refs/heads/master@{#36216}
      f73cf983
    • adamk's avatar
      [cleanup] Split ForOf and ForIn AST nodes apart as they share little · 4a7b9b97
      adamk authored
      Also make all AstVisitors consistently visit all the relevant parts
      of ForOfStatement. PrettyPrinter no longer fares well, but given
      how much desugaring happens to ForOf in the parser, any pretty-printed
      view of it isn't going to be human readable. AstPrinter, on the other
      hand, now gives a realistic view of what's been generated for for-of.
      
      Review-Url: https://codereview.chromium.org/1968753004
      Cr-Commit-Position: refs/heads/master@{#36215}
      4a7b9b97
  9. 10 May, 2016 1 commit
    • adamk's avatar
      ParameterInitializerRewriter must maintain temporary variable order · 2d090ee4
      adamk authored
      When the rewriter moves a temporary variable between scopes, it must
      be sure to maintain the order, so that the rewritten order is the
      same as it would have been without rewriting.
      
      To expose the difference in behavior, this patch removes the superfluous
      visitation of ForOfStatement::each() from AstExpressionVisitor, which
      happened to be the only thing keeping all the temporaries in order
      in mjsunit/harmony/regress/regress-crbug-578038.js. Without the proper
      order, this test would fail under --stress-opt, because the ".for"
      variable (behind the "each" proxy) would get two different positions
      in the scope, one on first parse (with rewriting) and the other on
      second parse (lazy parsing for optimization).
      
      A follow-up patch will remove each() and iterable() from ForOfStatement
      altogether, but I wanted to keep this patch small to highlight exactly
      the bit of code needed to make the test pass when not visiting each().
      
      BUG=v8:4791
      LOG=n
      
      Review-Url: https://codereview.chromium.org/1784893003
      Cr-Commit-Position: refs/heads/master@{#36150}
      2d090ee4
  10. 04 May, 2016 2 commits
  11. 02 May, 2016 1 commit
  12. 29 Apr, 2016 1 commit
  13. 28 Apr, 2016 1 commit
  14. 27 Apr, 2016 2 commits
  15. 22 Apr, 2016 2 commits
  16. 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
  17. 15 Apr, 2016 1 commit
  18. 13 Apr, 2016 1 commit
  19. 12 Apr, 2016 1 commit
  20. 11 Apr, 2016 3 commits
  21. 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
  22. 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
  23. 31 Mar, 2016 1 commit
  24. 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
  25. 18 Mar, 2016 2 commits
  26. 17 Mar, 2016 1 commit
  27. 16 Mar, 2016 1 commit
  28. 15 Mar, 2016 2 commits