1. 21 Oct, 2014 3 commits
  2. 16 Oct, 2014 1 commit
    • wingo@igalia.com's avatar
      Track usage of "this" and "arguments" in Scope · 0841f724
      wingo@igalia.com authored
      This adds flags in Scope to track wheter a Scope uses "this" and,
      "arguments". The information is exposed via Scope::uses_this(),
      and Scope::uses_arguments(), respectively. Flags for tracking
      usage on any inner scope uses are available as well via
      Scope::inner_uses_this(), and Scope::inner_uses_arguments().
      
      Knowing whether scopes use "this" and "arguments" will be handy
      to generate the code needed to capture their values when generating
      the code for arrow functions.
      
      BUG=v8:2700
      LOG=
      R=rossberg@chromium.org
      
      Review URL: https://codereview.chromium.org/422923004
      
      Patch from Adrian Perez de Castro <aperez@igalia.com>.
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24663 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      0841f724
  3. 09 Oct, 2014 2 commits
  4. 08 Oct, 2014 1 commit
  5. 07 Oct, 2014 3 commits
  6. 29 Sep, 2014 1 commit
  7. 24 Sep, 2014 1 commit
  8. 18 Sep, 2014 2 commits
  9. 16 Sep, 2014 2 commits
  10. 10 Sep, 2014 1 commit
  11. 02 Sep, 2014 2 commits
  12. 22 Aug, 2014 2 commits
  13. 21 Aug, 2014 2 commits
    • arv@chromium.org's avatar
      Add back the duplicate property checker · 98f7b7e1
      arv@chromium.org authored
      We're not quite ready to make this change.
      
      BUG=v8:3498
      LOG=Y
      R=rossberg@chromium.org
      
      Review URL: https://codereview.chromium.org/491053002
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      98f7b7e1
    • marja@chromium.org's avatar
      Refactor parser Checkpoints. · ad3a1a99
      marja@chromium.org authored
      Why this is better:
      
      1) Not needing an extra template parameter for Checkpoints ctors. This was
      especially confusing since the template parameter was named Parser and Parser is
      also used as a type name and is also a concrete type. This CL makes it clear
      that ParserTraits::Checkpoint is consturcted with ParserBase<ParserTraits> -
      that's the only sensemaking type for the ctor param anyway.
      
      2) This CL makes ParserBase define a Checkpoint base class (which knows how
      to create and restore a checkpoint with ParserBase) which
      PreParserTraits::Checkpoint and ParserTraits::Checkpoint inherit, and not the
      other way around.
      
      This is a more intuitive way to implement the "base functionality + extending
      it" concept than the previous solution. The previous solution was to allow
      Traits to define a Checkpoint class and make ParserBase<Traits>::ParserCheckpoint
      (which defines the base functionality) inherit from it.
      
      3) This CL moves the Checkpoint class definitions out of the SomeTraits::Type
      struct; SomeTraits::Type is supposed to be a collection of typedefs and not
      contain anything else.
      
      Checkpoints were introduced in r22925 ( https://codereview.chromium.org/443903003 ).
      
      BUG=
      R=wingo@igalia.com
      
      Review URL: https://codereview.chromium.org/485473004
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      ad3a1a99
  14. 20 Aug, 2014 2 commits
  15. 18 Aug, 2014 1 commit
  16. 07 Aug, 2014 1 commit
  17. 06 Aug, 2014 3 commits
  18. 05 Aug, 2014 2 commits
  19. 04 Aug, 2014 1 commit
  20. 23 Jul, 2014 1 commit
  21. 21 Jul, 2014 1 commit
  22. 14 Jul, 2014 1 commit
    • marja@chromium.org's avatar
      Implement handling of arrow functions in the parser · 70da8959
      marja@chromium.org authored
      Arrow functions are parsed from ParseAssignmentExpression(). Handling the
      parameter list is done by letting ParseConditionalExpression() parse a comma
      separated list of identifiers, and it returns a tree of BinaryOperation nodes
      with VariableProxy leaves, or a single VariableProxy if there is only one
      parameter. When the arrow token "=>" is found, the VariableProxy nodes are
      passed to ParseArrowFunctionLiteral(), which will then skip parsing the
      paramaeter list. This avoids having to rewind when the arrow is found and
      restart parsing the parameter list.
      
      Note that the empty parameter list "()" is handled directly in
      ParsePrimaryExpression(): after is has consumed the opening parenthesis,
      if a closing parenthesis follows, then the only valid input is an arrow
      function. In this case, ParsePrimaryExpression() directly calls
      ParseArrowFunctionLiteral(), to avoid needing to return a sentinel value
      to signal the empty parameter list. Because it will consume the body of
      the arrow function, ParseAssignmentExpression() will not see the arrow
      "=>" token as next, and return the already-parser expression.
      
      The implementation is done in ParserBase, so it was needed to do some
      additions to ParserBase, ParserTraits and PreParserTraits. Some of the
      glue code can be removed later on when more more functionality is moved
      to ParserBase.
      
      Additionally, this adds a runtime flag "harmony_arrow_functions"
      (disabled by default); enabling "harmony" will enable it as well.
      
      BUG=v8:2700
      LOG=N
      R=marja@chromium.org
      
      Review URL: https://codereview.chromium.org/383983002
      
      Patch from Adrián Pérez de Castro <aperez@igalia.com>.
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      70da8959
  23. 11 Jul, 2014 1 commit
  24. 10 Jul, 2014 2 commits
    • rossberg@chromium.org's avatar
      Make `let` usable as an identifier in ES6 sloppy mode. · e274edc8
      rossberg@chromium.org authored
      All of our mjsunit suite now runs through with --harmony-scoping enabled, up to expected failures (tests checking syntax errors for const/function in strict mode).
      
      R=marja@chromium.org, ulan@chromium.org
      BUG=v8:2198
      LOG=Y
      
      Review URL: https://codereview.chromium.org/378303003
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      e274edc8
    • marja@chromium.org's avatar
      Implement handling of arrow functions in the parser · e5991fc3
      marja@chromium.org authored
      Arrow functions are parsed from ParseAssignmentExpression(). Handling the
      parameter list is done by letting ParseConditionalExpression() parse a comma
      separated list of identifiers, and it returns a tree of BinaryOperation nodes
      with VariableProxy leaves, or a single VariableProxy if there is only one
      parameter. When the arrow token "=>" is found, the VariableProxy nodes are
      passed to ParseArrowFunctionLiteral(), which will then skip parsing the
      paramaeter list. This avoids having to rewind when the arrow is found and
      restart parsing the parameter list.
      
      Note that the empty parameter list "()" is handled directly in
      ParsePrimaryExpression(): after is has consumed the opening parenthesis,
      if a closing parenthesis follows, then the only valid input is an arrow
      function. In this case, ParsePrimaryExpression() directly calls
      ParseArrowFunctionLiteral(), to avoid needing to return a sentinel value
      to signal the empty parameter list. Because it will consume the body of
      the arrow function, ParseAssignmentExpression() will not see the arrow
      "=>" token as next, and return the already-parser expression.
      
      The implementation is done in ParserBase, so it was needed to do some
      additions to ParserBase, ParserTraits and PreParserTraits. Some of the
      glue code can be removed later on when more more functionality is moved
      to ParserBase.
      
      Additionally, this adds a runtime flag "harmony_arrow_functions"
      (disabled by default); enabling "harmony" will enable it as well.
      
      BUG=v8:2700
      LOG=N
      R=marja@chromium.org
      
      Review URL: https://codereview.chromium.org/385553003
      
      Patch from Adrián Pérez de Castro <aperez@igalia.com>.
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      e5991fc3
  25. 08 Jul, 2014 1 commit