1. 04 Mar, 2015 1 commit
  2. 03 Mar, 2015 2 commits
  3. 05 Feb, 2015 1 commit
  4. 08 Jan, 2015 1 commit
  5. 18 Dec, 2014 1 commit
  6. 04 Dec, 2014 2 commits
  7. 03 Dec, 2014 1 commit
  8. 02 Dec, 2014 1 commit
  9. 14 Nov, 2014 1 commit
  10. 07 Nov, 2014 1 commit
    • marja@chromium.org's avatar
      Scanner: disallow unicode escapes in regexp flags. · 2b026851
      marja@chromium.org authored
      The spec explicitly forbids them. V8 never handled them properly either, just
      the Scanner accepted them (it had code to add them literally to the
      LiteralBuffer) and later on, Regexp constructor disallowed them.
      
      According to the spec, unicode escapes in regexp flags should be an early error
      ("It is a Syntax Error if IdentifierPart contains a Unicode escape sequence.").
      
      Note that Scanner is still more relaxed about regexp flags than the
      spec. Especially, it accepts any identifier parts (not just a small set of
      letters) and doesn't check for duplicates.
      
      R=rossberg@chromium.org
      
      Review URL: https://codereview.chromium.org/700373003
      
      Cr-Commit-Position: refs/heads/master@{#25215}
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      2b026851
  11. 24 Oct, 2014 1 commit
  12. 14 Oct, 2014 1 commit
  13. 10 Oct, 2014 1 commit
    • yangguo@chromium.org's avatar
      Allow identifier code points from supplementary multilingual planes. · 0dd69ec4
      yangguo@chromium.org authored
      ES5.1 section 6 ("Source Text"):
      "Throughout the rest of this document, the phrase “code unit” and the
      word “character” will be used to refer to a 16-bit unsigned value
      used to represent a single 16-bit unit of text."
      
      This changed in ES6 draft section 10.1 ("Source Text"):
      "The ECMAScript code is expressed using Unicode, version 5.1 or later.
      ECMAScript source text is a sequence of code points. All Unicode code
      point values from U+0000 to U+10FFFF, including surrogate code points,
      may occur in source text where permitted by the ECMAScript grammars."
      
      This patch is to reflect this spec change.
      
      BUG=v8:3617
      LOG=Y
      R=jochen@chromium.org
      
      Review URL: https://codereview.chromium.org/640193002
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      0dd69ec4
  14. 08 Oct, 2014 1 commit
  15. 16 Sep, 2014 1 commit
  16. 10 Sep, 2014 1 commit
  17. 18 Aug, 2014 1 commit
  18. 04 Aug, 2014 1 commit
  19. 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
  20. 11 Jul, 2014 1 commit
  21. 10 Jul, 2014 1 commit
    • 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
  22. 08 Jul, 2014 2 commits
    • marja@chromium.org's avatar
      Revert "Implement handling of arrow functions in the parser" · c393b9a5
      marja@chromium.org authored
      This reverts r22265.
      
      Reason: ASAN tests fail.
      
      BUG=
      TBR=marja@chromium.org,aperez@igalia.com
      
      Review URL: https://codereview.chromium.org/372983003
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      c393b9a5
    • marja@chromium.org's avatar
      Implement handling of arrow functions in the parser · 7367720d
      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 ParseFunctionLiteral(),
      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 ParseExpression() expects parenthesized expressions
      to not be empty, so checking for a closing parenthesis is added in
      handling the empty parameter list "()" will accept a right-paren and
      return an empty expression, which means that the parameter list is
      empty.
      
      Additionally, this adds the following machinery:
      
       - A runtime flag "harmony_arrow_functions" (disabled by default).
         Enabling "harmony" will enable it as well.
       - An IsArrow bit in SharedFunctionInfo, and accessors for it.
       - An IsArrow bit in FunctionLiteral, accessorts for it, and
         a constructor parameter to set its value.
       - In ParserBase: allow_arrow_functions() and set_allow_arrow_functions()
       - A V8 native %FunctionIsArrow(), which is used to skip adding the
         "function " prefix when getting the source code for an arrow
         function.
      
      R=marja@chromium.org
      
      Review URL: https://codereview.chromium.org/160073006
      
      Patch from Adrián Pérez de Castro <aperez@igalia.com>.
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      7367720d
  23. 02 Jul, 2014 1 commit
  24. 30 Jun, 2014 1 commit
  25. 24 Jun, 2014 1 commit
  26. 18 Jun, 2014 1 commit
  27. 13 Jun, 2014 1 commit
  28. 03 Jun, 2014 1 commit
  29. 27 May, 2014 1 commit
  30. 26 May, 2014 2 commits
  31. 05 May, 2014 1 commit
  32. 29 Apr, 2014 1 commit
  33. 13 Mar, 2014 2 commits
  34. 12 Mar, 2014 1 commit
  35. 10 Feb, 2014 1 commit