1. 08 Jul, 2019 1 commit
  2. 03 Jul, 2019 2 commits
  3. 28 Jun, 2019 2 commits
  4. 11 Jun, 2019 2 commits
  5. 29 May, 2019 1 commit
    • Michael Mclaughlin's avatar
      Improve toString(radix) for doubles near zero · 348cc6f1
      Michael Mclaughlin authored
      Currently, Number.prototype.toString(radix) often fails to produce the
      least significant bit for doubles near zero. For example, for the
      minimum double, 5e-324, toString(2) produces "0". This means that a
      user cannot reliably get the exact binary or hexdecimal value of a
      double from JavaScript using toString.
      
      This patch makes a slight amendment to the DoubleToRadixCString
      function, so that doubles where the gap to the next double is 5e-324
      (i.e. doubles less than 2**-1021), are represented exactly in binary and
      other power-of-two bases, and close to exactly otherwise. It results
      in Number.prototype.toString producing the correct binary value for all
      doubles.
      
      R=jkummerow@chromium.org, mathias@chromium.org, yangguo@chromium.org
      
      Bug: v8:9294
      Change-Id: I71506149b7c4c0eac8c38675a1ee15fb4f36f9ef
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631601
      Commit-Queue: Mathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarMathias Bynens <mathias@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#61925}
      348cc6f1
  6. 13 May, 2019 1 commit
  7. 06 May, 2019 1 commit
  8. 03 May, 2019 2 commits
  9. 02 May, 2019 1 commit
  10. 30 Apr, 2019 1 commit
  11. 25 Apr, 2019 1 commit
  12. 11 Apr, 2019 1 commit
  13. 08 Mar, 2019 1 commit
  14. 28 Feb, 2019 1 commit
    • Benjamin's avatar
      [coverage] Extend SourceRangeAstVisitor for throw statements · 2d08967d
      Benjamin authored
      The SourceRangeAstVisitor has custom logic for blocks ending with a
      statement that has a continuation range. In these cases, the trailing
      continuation is removed which makes the reported coverage ranges a bit
      nicer.
      
      throw Error('foo') consists of an ExpressionStatement, with a
      Throw expression stored within the statement. The source range itself
      is stored with the Throw, not the statement.
      
      We now properly extract the correct AST node for trailing throw
      statements.
      
      R=jgruber@chromium.org, neis@chromium.org, yangguo@chromium.org
      
      Bug: v8:8691
      Change-Id: Ibcbab79fbe54719a8993045040349c863b139011
      Reviewed-on: https://chromium-review.googlesource.com/c/1480632
      Commit-Queue: Georg Neis <neis@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59936}
      2d08967d
  15. 26 Feb, 2019 1 commit
    • Allan Sandfeld Jensen's avatar
      Correct removal of redundant moves · 385aa80a
      Allan Sandfeld Jensen authored
      The logic for removing while iterating is non-standard and
      a left over from a previous index based loop. This patch
      replaces it with a standard erase based version.
      
      This fixes a runtime crash with MSVC that invalidates the
      iterator and then asserts. This also makes the code safe
      in case the last move can be redundant.
      
      Change-Id: Ie6990e0d65a3b83a4b7da3e2e89ed4e60a6cd215
      Reviewed-on: https://chromium-review.googlesource.com/c/1488762Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Commit-Queue: Ben Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59868}
      385aa80a
  16. 19 Feb, 2019 1 commit
  17. 14 Feb, 2019 1 commit
    • Hannu Trey's avatar
      Re-detect the host time zone if requested by an embedder · f781f522
      Hannu Trey authored
      Add an enum argument to DateTimeConfigurationChangeNotification to
      control whether or not to redetect the host time zone. The default value
      kSkip doesn't cause redetecting so that callers do not need to change if
      they want the current behavior (e.g. Chromium).
      
      Note that the host time zone detection does not work when v8 is run
      inside a sandbox as in Chromium so that Chromium detects the host time
      zone outside the sandbox before calling
      DateTimeConfigurationChangeNotification. OTOH, other v8 embedders may
      find it more convenient for v8 to do the host time zone detection on
      their behalf. In that case, they can call the function with the new
      argument set to value kRedetect.
      
      Test:
      With PHP+V8Js on linux, execute:
      php -r '
        putenv("TZ=Europe/Helsinki");
        $v8 = new V8Js();
        $v8->executeString("print((new Date(0)).toString()+\"\\n\");");
        putenv("TZ=America/New_York");
        $v8->executeString("print((new Date(0)).toString()+\"\\n\");");'
      
      Result before modification:
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      
      Result after modification:
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      
      Result after V8JS is modified to use value kRedetect when calling
      
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time)
      
      DateTimeConfigurationChangeNotification: 
      Change-Id: I005192dd42669a94f606a49baa9eafad3475b9fd
      Reviewed-on: https://chromium-review.googlesource.com/c/1449637Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJungshik Shin <jshin@chromium.org>
      Commit-Queue: Jungshik Shin <jshin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59613}
      f781f522
  18. 07 Feb, 2019 1 commit
    • deepak1556's avatar
      DISALLOW_IMPLICIT_CONSTRUCTORS for MacroAssembler · 9e060e47
      deepak1556 authored
      When BUILDING_V8_SHARED in release builds __declspec(dllexport)
      causes generation of implicit constructors in the forwarding class
      while its deleted in TurboAssemblerBase, which leads to compilation
      errors like:
      
      In file included from gen/v8/v8_base_jumbo_6.cc:41:
      In file included from .\../../v8/src/interface-descriptors.cc:7:
      In file included from ../../v8\src/macro-assembler.h:40:
      ../../v8\src/x64/macro-assembler-x64.h(92,9):  error: call to deleted constructor of 'v8::internal::TurboAssemblerBase'
            : TurboAssemblerBase(std::forward<Args>(args)...) {}
              ^                  ~~~~~~~~~~~~~~~~~~~~~~~~
      ../../v8\src/x64/macro-assembler-x64.h(536,25):  note: in instantiation of function template specialization 'v8::internal::TurboAssembler::TurboAssembler<v8::internal::TurboAssembler>' requested here
      class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
                              ^
      ../../v8\src/turbo-assembler.h(127,34):  note: 'TurboAssemblerBase' has been explicitly marked deleted here
        DISALLOW_IMPLICIT_CONSTRUCTORS(TurboAssemblerBase);
                                       ^
      1 error generated.
      
      The original changes were made in https://chromium-review.googlesource.com/c/v8/v8/+/1414913
      
      R=mstarzinger@chromium.org,jgruber@chromium.org,clemensh@chromium.org
      
      Bug: NONE
      Change-Id: I87a5a678b8bae13b3adc6f1c6ac0b9313ed18d85
      Reviewed-on: https://chromium-review.googlesource.com/c/1454676
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59427}
      9e060e47
  19. 03 Feb, 2019 1 commit
  20. 28 Jan, 2019 1 commit
  21. 17 Jan, 2019 1 commit
  22. 20 Dec, 2018 1 commit
  23. 18 Dec, 2018 1 commit
  24. 14 Dec, 2018 1 commit
  25. 26 Oct, 2018 1 commit
    • Peter Marshall's avatar
      [typedarray] Use fast path for Float32Array.from(float_64_array) and similar · c7c0e110
      Peter Marshall authored
      Currently, because the source float_64_array has an iterator, it hits
      the code in the "check_iterator" section of TypedArrayFrom which calls
      IterableToList. This builds a temporary PACKED_ELEMENTS array (and boxes
      all of the numeric values as HeapNumbers), then uses this as the source
      array.
      
      This patch checks if the source array is a TypedArray, and if the iterator
      is the built-in one (where we know the iterator's behaviour). If both are
      true then it bypasses the creation of this temporary array and uses the
      original TypedArray as the source.
      
      This allows it to take advantage of the existing fast code for copying one
      typed array to another.
      
      R=hablich@chromium.org, petermarshall@chromium.org
      
      Bug: chromium:884671
      Change-Id: I19a944c9d6d5d07699c7dc3ad7196fc871200b62
      Reviewed-on: https://chromium-review.googlesource.com/c/1297312Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#57022}
      c7c0e110
  26. 24 Oct, 2018 1 commit
  27. 23 Oct, 2018 2 commits
  28. 10 Oct, 2018 1 commit
  29. 14 Sep, 2018 1 commit
    • PhistucK's avatar
      [Intl] Rename dayperiod to dayPeriod · 53de7345
      PhistucK authored
      Previously, DateTimeFormat.prototype.formatToParts returned an object
      with the property key 'dayperiod' which is incorrect as per the spec.
      This patch updates the property key to say 'dayPeriod', making this spec
      compliant.
      
      R=cira@chromium.org
      
      Bug: chromium:865351
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: I37f50797387bc69d5e29d7c2911bc5cc0fad37ac
      Reviewed-on: https://chromium-review.googlesource.com/1145304Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
      Commit-Queue: PhistucK <phistuck@gmail.com>
      Cr-Commit-Position: refs/heads/master@{#55922}
      53de7345
  30. 05 Sep, 2018 1 commit
  31. 06 Aug, 2018 1 commit
  32. 03 Aug, 2018 1 commit
    • Ben Newman's avatar
      [debug] Fully implement Debug::ArchiveDebug and Debug::RestoreDebug. · a8f68691
      Ben Newman authored
      I have a project that embeds V8 and uses a single `Isolate` from multiple
      threads. The program runs just fine, but sometimes the inspector doesn't
      stop on the correct line after stepping over a statement that switches
      threads behind the scenes, even though the original thread is restored by
      the time the next statement is executed.
      
      After some digging, I discovered that the `Debug::ArchiveDebug` and
      `Debug::RestoreDebug` methods, which should be responsible for
      saving/restoring this `ThreadLocal` information when switching threads,
      currently don't do anything.
      
      This commit implements those methods using MemCopy, in the style of other
      Archive/Restore methods in the V8 codebase.
      
      Related: https://groups.google.com/forum/#!topic/v8-users/_Qf2rwljRk8
      
      Note: I believe my employer, Meteor Development Group, has previously
      signed the CLA using the group email address google-contrib@meteor.com.
      
      R=yangguo@chromium.org,jgruber@chromium.org
      CC=info@bnoordhuis.nl
      
      Bug: v8:7230
      Change-Id: Id517c873eb81cd53f7216c7efd441b956cf7f943
      Reviewed-on: https://chromium-review.googlesource.com/833260
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54902}
      a8f68691
  33. 26 Jul, 2018 1 commit
  34. 18 Jul, 2018 1 commit
    • Yang Guo's avatar
      Reland "[builtins] Add %IsTraceCategoryEnabled and %Trace builtins" · 0dd33901
      Yang Guo authored
      This is a reland of 8d4572a2
      
      Original change's description:
      > [builtins] Add %IsTraceCategoryEnabled and %Trace builtins
      >
      > Adds the builtin Trace and IsTraceCategoryEnabled functions
      > exposed via extra bindings. These are intended to use by
      > embedders to allow basic trace event support from JavaScript.
      >
      > ```js
      > isTraceCategoryEnabled('v8.some-category')
      >
      > trace('e'.charCodeAt(0), 'v8.some-category',
      >       'Foo', 0, { abc: 'xyz'})
      > ```
      >
      > Bug: v8:7851
      > Change-Id: I7bfb9bb059efdf87d92a56a0aae326650730c250
      > Reviewed-on: https://chromium-review.googlesource.com/1103294
      > Commit-Queue: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#54121}
      
      TBR=cbruni@chromium.org
      
      Bug: v8:7851
      Change-Id: Id063754b2834b3b6a2b2654e76e8637bcd6aa5f8
      Reviewed-on: https://chromium-review.googlesource.com/1137071
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54532}
      0dd33901
  35. 16 Jul, 2018 1 commit