1. 30 Jan, 2015 2 commits
  2. 29 Jan, 2015 1 commit
    • arv's avatar
      Move object literal checking into checker classes · b004b1d8
      arv authored
      This removes the duplicate property check from object literals.
      
      Instead we repurpose the ObjectLiteralChecker into two cases, implemented
      by two subclasses to ObjectLiteralCheckerBase called ObjectLiteralChecker
      and ClassLiteralChecker.
      
      The object literal checker now only checks for duplicate __proto__ fields in
      object literals.
      
      The class literal checker checks for duplicate constructors, non constructor
      fields named constructor as well as static properties named prototype.
      
      BUG=v8:3819
      LOG=Y
      R=adamk, dslomov@chromium.org
      
      Review URL: https://codereview.chromium.org/873823003
      
      Cr-Commit-Position: refs/heads/master@{#26336}
      b004b1d8
  3. 18 Dec, 2014 1 commit
  4. 10 Dec, 2014 1 commit
  5. 05 Dec, 2014 1 commit
    • arv's avatar
      Optimize GetPrototype · c8c73956
      arv authored
      This introduces Hydrogen for %_GetPrototype. The code falls back on
      runtime if the object needs access checks or if its prototype is a
      hidden prototype.
      
      BUG=None
      LOG=Y
      R=dslomov@chromium.org
      
      Review URL: https://codereview.chromium.org/756423006
      
      Cr-Commit-Position: refs/heads/master@{#25694}
      c8c73956
  6. 28 Nov, 2014 2 commits
  7. 20 Nov, 2014 1 commit
  8. 18 Nov, 2014 1 commit
  9. 14 Nov, 2014 1 commit
  10. 12 Nov, 2014 3 commits
  11. 11 Nov, 2014 1 commit
  12. 31 Oct, 2014 1 commit
    • marja@chromium.org's avatar
      Scanner: remove PushBack calls when we're going to return ILLEGAL. · 1bb79539
      marja@chromium.org authored
      This simplifies escape handling and makes it easier to extend escapes for ES6.
      
      PushBack just before detecting ILLEGAL is unnecessary, since we will abort the
      scanning / parsing anyway at that point, and it doesn't matter where the cursor
      exactly is. The error messages w/ PushBack are not any better or more correct
      than without.
      
      In addition: remove a comment about handling invalid escapes gracefully when we
      no longer do. (*)
      
      This CL includes a behavioral change: For input "var r = /foobar/g\urrrr;" we
      used to report "unexpected_token: ILLEGAL" for "\u", but now we report
      malformed_regexp_flags which is a more correct error message. (Note that the
      code for reporting invalid_regexp_flags was dead, and invalid_regexp_flags is
      not the right error message.)
      
      Note that the V8 is more relaxed about unicode escapes in regexp flags than ES6
      (see
      http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regular-expressions )
      and this CL doesn't change it. (V8 accepts any \uxxxx, ES6 spec says only a
      certain value range is acceptable.)
      
      (*) Code archaeology:
      
      Originally, doing PushBack in ScanHexEscape made sense (see e.g., here
      https://codereview.chromium.org/5063003/diff/6001/src/prescanner.h ), since we
      wouldn't return ILLEGAL but treat an invalid escape sequence "\uxxxx" as
      "uxxxx".
      
      (The repo at that point contains another instance of the same function, from the
      initial commit. The logic is the same.)
      
      This behavior was changed in a "renaming" commit
      https://codereview.chromium.org/7739020.
      
      BUG=
      R=rossberg@chromium.org
      
      Review URL: https://codereview.chromium.org/684873002
      
      Cr-Commit-Position: refs/heads/master@{#25031}
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      1bb79539
  13. 30 Oct, 2014 1 commit
  14. 28 Oct, 2014 1 commit
  15. 21 Oct, 2014 1 commit
  16. 07 Oct, 2014 1 commit
  17. 24 Sep, 2014 2 commits
  18. 19 Sep, 2014 1 commit
  19. 16 Sep, 2014 1 commit
  20. 21 Aug, 2014 1 commit
  21. 18 Aug, 2014 1 commit
  22. 11 Aug, 2014 1 commit
  23. 21 Jul, 2014 1 commit
  24. 16 Jul, 2014 1 commit
  25. 14 Jul, 2014 3 commits
  26. 11 Jul, 2014 1 commit
  27. 10 Jul, 2014 3 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
    • yangguo@chromium.org's avatar
      Refactor ScriptData class for cached compile data. · 339bc813
      yangguo@chromium.org authored
      R=marja@chromium.org, vogelheim@chromium.org
      
      Review URL: https://codereview.chromium.org/376223002
      
      git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      339bc813
  28. 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
  29. 07 Jul, 2014 1 commit
  30. 02 Jul, 2014 1 commit