1. 09 Mar, 2020 1 commit
    • Dan Elphick's avatar
      [api] Create v8::String::NewFromLiteral that returns Local<String> · b097a8e5
      Dan Elphick authored
      String::NewFromLiteral is a templated function that takes a char[N]
      argument that can be used as an alternative to String::NewFromUtf8 and
      returns a Local<String> rather than a MaybeLocal<String> reducing the
      number of ToLocalChecked() or other checks.
      
      Since the string length is known at compile time, it can statically
      assert that the length is less than String::kMaxLength, which means that
      it can never fail at runtime.
      
      This also converts all found uses of NewFromUtf8 taking a string literal
      or a variable initialized from a string literal to use the new API. In
      some cases the types of stored string literals are changed from const
      char* to const char[] to ensure the size is retained.
      
      This API does introduce a small difference compared to NewFromUtf8. For
      a case like "abc\0def", NewFromUtf8 (using length -1 to infer length)
      would treat this as a 3 character string, whereas the new API will treat
      it as a 7 character string.
      
      As a drive-by fix, this also fixes all redundant uses of
      v8::NewStringType::kNormal when passed to any of the String::New*
      functions.
      
      Change-Id: Id96a44bc068d9c4eaa634aea688e024675a0e5b3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2089935
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarMathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66622}
      b097a8e5
  2. 24 May, 2019 1 commit
  3. 23 May, 2019 2 commits
  4. 21 May, 2019 1 commit
  5. 17 May, 2019 1 commit
  6. 16 May, 2019 2 commits
  7. 01 Mar, 2019 1 commit
    • Sathya Gunasekaran's avatar
      [fni] Mark computed props as computed, not anonymous function · ab24897c
      Sathya Gunasekaran authored
      I thought about potentially adding the identifer ref to the error but
      that would require allocating a new string or at the very least
      increasing the size of the resulting cons string. Given that the
      parser is pretty performance sensitive, I've decided to not display
      the identifier.
      
      Previously, the error was:
        _test.js:3: Error
        a[foo].c = () => { throw Error(); };
                           ^
        Error
          at a.(anonymous function).c (_test.js:3:26)
          at _test.js:5:1
      
      With this patch, the error becomes:
        _test.js:3: Error
        a[foo].c = () => { throw Error(); };
                           ^
        Error
          at a.<computed>.c (_test.js:3:26)
          at _test.js:5:1
      
      Bug: v8:8823
      Change-Id: I557b3517e317652c447ca06c5a400e9625353d9b
      Reviewed-on: https://chromium-review.googlesource.com/c/1495017
      Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
      Reviewed-by: 's avatarMathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59985}
      ab24897c
  8. 04 Dec, 2018 1 commit
  9. 23 Jul, 2018 1 commit
  10. 27 Jun, 2018 1 commit
  11. 23 Jun, 2018 1 commit
  12. 14 Dec, 2017 1 commit
  13. 11 Dec, 2017 1 commit
  14. 09 Feb, 2017 1 commit
  15. 15 Nov, 2016 1 commit
    • luoe's avatar
      Generate inferred names for es6 class functions · e80cfa00
      luoe authored
      Inferred names are currently generated for FunctionLiterals but not generated
      for ClassLiterals. Without them, DevTools does not have enough information to
      make descriptive descriptions.
      
      E.g.
      var x = {y: class{}};
      var a = new x.y();
      console.log(a);
      
      This shows "Object{}" when it could be more descriptive "x.y {}"
      
      BUG=v8:5621
      CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
      
      Review-Url: https://codereview.chromium.org/2488193003
      Cr-Commit-Position: refs/heads/master@{#41013}
      e80cfa00
  16. 15 Aug, 2016 1 commit
  17. 25 Jul, 2016 1 commit
  18. 09 Dec, 2015 1 commit
  19. 17 Nov, 2015 1 commit
  20. 31 Jul, 2015 1 commit
  21. 30 Jul, 2015 1 commit
  22. 20 Jul, 2015 1 commit
    • yangguo's avatar
      Debugger: prepare code for debugging on a per-function basis. · 35c28ce0
      yangguo authored
      Prior to this patch, we enter a global debug mode whenever a break point
      is set. By entering this mode, all code is deoptimized and activated
      frames are recompiled and redirected to newly compiled debug code.
      
      After this patch, we only deoptimize/redirect for functions we want to
      debug. Trigger for this is Debug::EnsureDebugInfo, and having DebugInfo
      object attached to the SFI prevents optimization/inlining.
      
      The result is that we can have optimized code for functions without break
      points alongside functions that do have break points, which are not
      optimized.
      
      R=mstarzinger@chromium.org, ulan@chromium.org
      BUG=v8:4132
      LOG=Y
      
      Review URL: https://codereview.chromium.org/1233073005
      
      Cr-Commit-Position: refs/heads/master@{#29758}
      35c28ce0
  23. 13 Jul, 2015 1 commit
  24. 04 Mar, 2015 1 commit
    • yangguo's avatar
      Refactor BreakLocationIterator. · 1a608493
      yangguo authored
      We now have BreakLocation::Iterator to iterate via RelocIterator, and
      create a BreakLocation when we are done iterating. The reloc info is
      stored in BreakLocation in a GC-safe way and instantiated on demand.
      
      R=ulan@chromium.org
      BUG=v8:3924
      LOG=N
      
      Review URL: https://codereview.chromium.org/967323002
      
      Cr-Commit-Position: refs/heads/master@{#26983}
      1a608493
  25. 30 Jan, 2015 3 commits
  26. 20 Oct, 2014 1 commit
  27. 25 Sep, 2014 1 commit
  28. 03 Jun, 2014 1 commit
  29. 25 Apr, 2014 1 commit
  30. 17 Apr, 2014 1 commit
  31. 09 Dec, 2013 1 commit
  32. 22 Nov, 2013 1 commit
  33. 19 Sep, 2013 2 commits
  34. 04 Jun, 2013 1 commit
  35. 31 May, 2013 1 commit