1. 18 Mar, 2016 1 commit
    • vogelheim's avatar
      Parser: Make skipping HTML comments optional. · 91d34428
      vogelheim authored
      API change: This adds a new flag skip_html_comments to v8::ScriptOriginOptions. This flag controls whether V8 will attempt to honour HTML-style comments in JS sources.
      
      (That is: Gracefully ignore <!-- ... ---> in JS sources, which was a popular technique in the early days of JavaScript, to prevent non-JS-enabled browsers from displaying script sources to uses.)
      
      The flag defaults to 'true' when using v8::ScriptOrigin constructor, which preserves the existing behaviour. Embedders which are happy with the existing behaviour will thus not need any changes.
      
      BUG=chromium:573887
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1801203002
      
      Cr-Commit-Position: refs/heads/master@{#34904}
      91d34428
  2. 17 Mar, 2016 1 commit
  3. 08 Mar, 2016 1 commit
  4. 04 Mar, 2016 5 commits
  5. 03 Mar, 2016 2 commits
    • littledan's avatar
      Restrict FunctionDeclarations in Statement position · 0e7f095c
      littledan authored
      ES2015 generally bans FunctionDeclarations in positions which expect a Statement,
      as opposed to a StatementListItem, such as a FunctionDeclaration which constitutes
      the body of a for loop. However, Annex B 3.2 and 3.4 make exceptions for labeled
      function declarations and function declarations as the body of an if statement in
      sloppy mode, in the latter case specifying that the semantics are as if the
      function declaration occurred in a block. Chrome has historically permitted
      further extensions, for the body of any flow control construct.
      
      This patch addresses both the syntactic and semantic mismatches between V8 and
      the spec. For the semantic mismatch, function declarations as the body of if
      statements change from unconditionally hoisting in certain cases to acquiring
      the sloppy mode function in block semantics (based on Annex B 3.3). For the
      extra syntax permitted, this patch adds a flag,
      --harmony-restrictive-declarations, which excludes disallowed function declaration
      cases. A new UseCounter, LegacyFunctionDeclaration, is added to count how often
      function declarations occur as the body of other constructs in sloppy mode. With
      this patch, the code generally follows the form of the specification with respect
      to parsing FunctionDeclarations, rather than allowing them in arbitrary Statement
      positions, and makes it more clear where our extensions occur.
      
      BUG=v8:4647
      R=adamk
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1757543003
      
      Cr-Commit-Position: refs/heads/master@{#34470}
      0e7f095c
    • machenbach's avatar
      Revert "Speed up the LookupIterator" · 70ac41a8
      machenbach authored
      This reverts commit 2608ecc7.
      
      Revert "Specialize helper methods in the LookupIterator by is_element."
      
      This reverts commit 6eb483f8.
      
      Revert "Avoid SetPropertyInternal if the LookupIterator is NotFound"
      
      This reverts commit ca5bd8d4.
      
      Revert "Inline fast-bailout-checks for LookupIterator::UpdateProtector"
      
      This reverts commit d98570a1.
      
      This breaks layout tests with timeouts:
      https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/5060
      
      It also seems to break jsfunfuzz:
      https://build.chromium.org/p/client.v8/builders/V8%20Fuzzer/builds/7930
      
      The other three CLs are reverted to be able to revert the first.
      
      BUG=v8:4798
      LOG=n
      TBR=verwaest@chromium.org
      
      Review URL: https://codereview.chromium.org/1761593003
      
      Cr-Commit-Position: refs/heads/master@{#34457}
      70ac41a8
  6. 02 Mar, 2016 1 commit
    • verwaest's avatar
      Speed up the LookupIterator · 2608ecc7
      verwaest authored
      This introduces a new instance type and reorders the JSObject types so any type requiring special LookupIterator support can be identified with a single range check.
      
      In addition, it restructures the Next for better performance, avoiding unnecessary calls.
      
      BUG=
      
      Review URL: https://codereview.chromium.org/1751043002
      
      Cr-Commit-Position: refs/heads/master@{#34429}
      2608ecc7
  7. 01 Mar, 2016 1 commit
  8. 29 Feb, 2016 2 commits
  9. 28 Feb, 2016 1 commit
  10. 26 Feb, 2016 1 commit
    • fmeawad's avatar
      Reland: Add Scoped Context Info (Isolate) to V8 Traces · 567e5839
      fmeawad authored
      This patch adds the newly added support for contexts in V8 Tracing, as well
      as use it to mark all the entry points for a V8 Isolate.
      
      Update for reland: The current tracing interface needs to be updated (AddTraceEvent),
      but the embedders need to migrate to the new version before removing the old version.
      (Reland of: https://codereview.chromium.org/1686233002)
      
      The revert happened because the 2 signatures of the old and new AddTraceEvent where different
      so it threw an overload-virtual error on cross arm debug. This issue is temporary, and to solve
      it, I added an implementation of the old and new everywhere until the embedder implements the new.
      
      BUG=v8:4565
      LOG=N
      
      R=jochen@chromium.org
      
      Review URL: https://codereview.chromium.org/1704253002
      
      Cr-Commit-Position: refs/heads/master@{#34332}
      567e5839
  11. 25 Feb, 2016 2 commits
  12. 22 Feb, 2016 1 commit
    • littledan's avatar
      Optimize @@species based on a global 'protector' cell · 7033ae51
      littledan authored
      This patch makes ArraySpeciesCreate fast in V8 by avoiding two property reads
      when the following conditions are met:
      - No Array instance has had its __proto__ reset
      - No Array instance has had a constructor property defined
      - Array.prototype has not had its constructor changed
      - Array[Symbol.species] has not been reset
      
      For subclasses of Array, or for conditions where one of these assumptions is
      violated, the full lookup of species is done according to the ArraySpeciesCreate
      algorithm. Although this is a "performance cliff", it does not come up in the
      expected typical use case of @@species (Array subclassing), so it is hoped that
      this can form a good start. Array subclasses will incur the slowness of looking
      up @@species, but their use won't slow down invocations of, for example,
      Array.prototype.slice on Array base class instances.
      
      Possible future optimizations:
      - For the fallback case where the assumptions don't hold, optimize the two
        property lookups.
      - For Array.prototype.slice and Array.prototype.splice, even if the full lookup
        of @@species needs to take place, we still could take the rest of the C++
        fastpath. However, to do this correctly requires changing the calling convention
        from C++ to JS to pass the @@species out, so it is not attempted in this patch.
      
      With this patch, microbenchmarks of Array.prototype.slice do not suffer a
      noticeable performance regression, unlike their previous 2.5x penalty.
      
      TBR=hpayer@chromium.org
      
      Review URL: https://codereview.chromium.org/1689733002
      
      Cr-Commit-Position: refs/heads/master@{#34199}
      7033ae51
  13. 19 Feb, 2016 2 commits
  14. 18 Feb, 2016 1 commit
  15. 17 Feb, 2016 3 commits
  16. 05 Feb, 2016 1 commit
  17. 03 Feb, 2016 2 commits
  18. 02 Feb, 2016 2 commits
  19. 01 Feb, 2016 1 commit
    • littledan's avatar
      Add UseCounters for some nonstandard JavaScript features · 11e8c03f
      littledan authored
      This patch adds a UseCounter for each of the following:
      - Allowing duplicate sloppy-mode block-scoped function declarations
        in the exact same scope
      - for-in loops with an initializer
      
      The patch also refactors some of the declaration code to clean it up and
      enable the first counter, and adds additional unit tests to nail down
      the semantics of edge cases of sloppy-mode block-scoped function declarations.
      
      BUG=v8:4693,chromium:579395
      LOG=N
      R=adamk
      
      Review URL: https://codereview.chromium.org/1633743003
      
      Cr-Commit-Position: refs/heads/master@{#33650}
      11e8c03f
  20. 29 Jan, 2016 1 commit
    • xaxxon's avatar
      Make handle ctors explicit · b6c9b703
      xaxxon authored
      Without this change, the v8::Local<> constructor will be picked up by the
      compiler as an option for an implicit cast for any pointer type.  This leads
      to bad error messages when accidentally passing an erroneous pointer type to
      a function wanting a Local<> (complains about a pointer assignment in Local<>'s
      constructor as opposed to a bad type for the parameter of the function being
      called) and also causes ambiguity errors where none should exist when calling
      overloaded functions (for example a function taking either a std::string or a
      v8::Local<v8::Script> cannot be called with a const char * because the compiler
      sees both types as being constructable with a const char *).
      
      R=jochen@chromium.org
      BUG=
      
      Review URL: https://codereview.chromium.org/1647833005
      
      Cr-Commit-Position: refs/heads/master@{#33602}
      b6c9b703
  21. 27 Jan, 2016 2 commits
  22. 26 Jan, 2016 1 commit
  23. 22 Jan, 2016 2 commits
  24. 21 Jan, 2016 3 commits