0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

671 Commits

Author SHA1 Message Date
Myles Borins
0a66b223e1
deps: update V8 to 6.0.286.52
PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-01 15:23:15 -05:00
Yang Guo
8dce05fa71
deps: backport rehash strings after deserialization
Original commit messages:
a2ab1353f6
  [snapshot] Rehash strings after deserialization.

  See https://goo.gl/6aN8xA

  Bug: v8:6593
  Change-Id: Ic8b0b57195d01d41591397d5d45de3f0f3ebc3d9
  Reviewed-on: https://chromium-review.googlesource.com/574527
  Reviewed-by: Camillo Bruni <cbruni@chromium.org>
  Reviewed-by: Jakob Gruber <jgruber@chromium.org>
  Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
  Commit-Queue: Yang Guo <yangguo@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#46732}

182caaf4a9
  Do not track transitions for built-in objects.

  Objects created during bootstrapping do not need
  a transition tree except for elements kind transitions.

  Bug: v8:6596
  Change-Id: I237b8b2792f201336e1c9731c815095dd06bc182
  Reviewed-on: https://chromium-review.googlesource.com/571750
  Reviewed-by: Igor Sheludko <ishell@chromium.org>
  Commit-Queue: Yang Guo <yangguo@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#46693}

Fixes: https://github.com/nodejs/node/issues/14171
PR-URL: https://github.com/nodejs/node/pull/14345
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2017-07-28 17:50:45 +02:00
Igor Sheludko
785a9e5a57
deps: cherry-pick 6cb999b97b from V8 upstream
Original commit message:

    Properly handle loads from global interceptor via prototype chain.

    ... when receiver is in dictionary mode.

    Bug: v8:6490
    Change-Id: Ic5a8d214adcc4efd4cb163cbc6b351c4e6b596af
    Reviewed-on: https://chromium-review.googlesource.com/559548
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46428}

Ref: 6cb999b97b
Fixes: https://github.com/nodejs/node/issues/13804
PR-URL: https://github.com/nodejs/node/pull/14188
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-15 12:15:00 +08:00
ochang
31349e2245 deps: cherry-pick 3f4536894ac from V8 upstream
Original commit message:

    d8: Make in process stack dumping optional

    Adds a flag (--disable-in-process-stack-traces) to not install
    signal handlers so that e.g. ASan signal handlers will work.

    This flag mirrors chromium's one.

    R=jochen@chromium.org
    BUG=chromium:716235

    Review-Url: https://codereview.chromium.org/2854173002
    Cr-Commit-Position: refs/heads/master@{#45142}

PR-URL: https://github.com/nodejs/node/pull/13985
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-02 15:42:22 -07:00
Michaël Zasso
0ba74dbcc6 deps: backport c0f1ff2 from upstream V8
Original commit message:

    Fix GCC 7 build errors

    BUG=chromium:691681
    R=franzih@chromium.org

    Change-Id: Id7e5698487f16dc217a804f6d3f24da7213c72b9
    Reviewed-on: https://chromium-review.googlesource.com/530227
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46045}

PR-URL: https://github.com/nodejs/node/pull/13517
Fixes: https://github.com/nodejs/node/issues/10388
Refs: https://github.com/nodejs/node/pull/12392
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-06-23 10:13:36 +02:00
Michaël Zasso
7cdcca7623 deps: cherry-pick 866ee63 from upstream V8
Original commit message:

    [string] Re-enable result caching for String.p.split

    Runtime::kStringSplit's result caching is only enabled when limit equals
    kMaxUInt32.

    BUG=v8:6463

    Review-Url: https://codereview.chromium.org/2923183002
    Cr-Commit-Position: refs/heads/master@{#45724}

PR-URL: https://github.com/nodejs/node/pull/13630
Fixes: https://github.com/nodejs/node/issues/13445
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-06-20 15:24:57 +02:00
Michaël Zasso
8f907b6baf deps: update V8 to 5.9.211.37
PR-URL: https://github.com/nodejs/node/pull/13631
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-06-20 10:50:52 +02:00
Michaël Zasso
2db2857c72 deps: cherry-pick 6d38f89 from upstream V8
Original commit message:

    [turbofan] Boost performance of Array.prototype.shift by 4x.

    For small arrays, it's way faster to just move the elements instead of
    doing the fairly complex and heavy-weight left-trimming. Crankshaft has
    had this optimization for small arrays already; this CL more or less
    ports this functionality to TurboFan, which yields a 4x speed-up when
    using shift on small arrays (with up to 16 elements).

    This should recover some of the regressions reported in the Node.js issues

      https://github.com/nodejs/node/issues/12657

    and discovered for the syncthrough module using

      https://github.com/mcollina/syncthrough/blob/master/benchmarks/basic.js

    as benchmark.

    R=jarin@chromium.org
    BUG=v8:6376

    Review-Url: https://codereview.chromium.org/2874453002
    Cr-Commit-Position: refs/heads/master@{#45216}

PR-URL: https://github.com/nodejs/node/pull/13263
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2017-06-07 10:34:42 +02:00
daniel.bevenius
554fa24916 deps: cherry-pick f5fad6d from upstream v8
Original commit message:

    This commit adds a getter for the private is_verbose_ member.
    The use case for this comes from Node.js where the ability to avoid
    calling FatalException if the TryCatch is verbose would be nice
    to have.

    BUG=

    Review-Url: https://codereview.chromium.org/2840803002
    Cr-Commit-Position: refs/heads/master@{#45018}

PR-URL: https://github.com/nodejs/node/pull/12826
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-06-07 10:34:37 +02:00
Ben Noordhuis
36ba9e6e0c deps: cherry-pick bfae9db from upstream v8
Original commit message:

    Update postmortem metadata generator.

    Add PropertyDetails::AttributesField +
    PropertyDetails::LocationField.

    Review-Url: https://codereview.chromium.org/2842843004
    Cr-Commit-Position: refs/heads/master@{#44889}

PR-URL: https://github.com/nodejs/node/pull/12722
Refs: https://github.com/nodejs/llnode/issues/81
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-06-07 10:34:32 +02:00
Ben Noordhuis
44f5523260 v8: fix stack overflow in recursive method
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock()
used to self-recurse before this commit, causing stack overflows on
systems with small stack sizes.  Make it non-recursive by storing
intermediate results in a heap-allocated list.

Fixes: https://github.com/nodejs/node/issues/11991
PR-URL: https://github.com/nodejs/node/pull/12460
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2017-06-07 10:34:24 +02:00
Bartosz Sosnowski
bfb4694408 deps: fix addons compilation with VS2013
VS2013 does not support defaulting move constructor and assignment
operator. This adds explicit definitions of those methods for two
classes.
This fix is required because we still support building addons with
VS2013 and the incompatibility is in v8.h.

Fixes: https://github.com/nodejs/node-v8/issues/4

PR-URL: https://github.com/nodejs/node/pull/13263
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2017-06-07 10:34:17 +02:00
Michaël Zasso
bc8e4878c0 deps: add missing include to V8 i18n.cc
This is required for ICU 59.1.

PR-URL: https://github.com/nodejs/node/pull/13263
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2017-06-07 10:34:11 +02:00
Michaël Zasso
9b4a891ca2 deps: run memory hungry V8 test in exclusive mode
es6/typedarray-construct-offset-not-smi allocates a 2G block of memory
and if there  are multiple variants running at the same time this can
lead to crashes, OOM kills or the OS failing to allocate memory.
This patch limits us to running a single variant of the test.

Refs: https://github.com/nodejs/node/pull/6678

PR-URL: https://github.com/nodejs/node/pull/13263
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2017-06-07 10:34:00 +02:00
Michael Dawson
bbe5cb2749 deps: limit regress/regress-crbug-514081 v8 test
regress/regress-crbug-514081 allocates a 2G block of memory
and if there  are multiple variants running at the
same time this can lead to crashes, OOM kills or
the OS failing to allocate memory.  This patch
limits us to running a single variant of the test

Fixes: https://github.com/nodejs/node/issues/6340
PR-URL: https://github.com/nodejs/node/pull/6678
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2017-06-07 10:33:55 +02:00
Michaël Zasso
3dc8c3bed4 deps: update V8 to 5.9.211.32
PR-URL: https://github.com/nodejs/node/pull/13263
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2017-06-07 10:33:31 +02:00
Matt Loring
e6395cc07a
deps: cherry-pick 6803eef from V8 upstream
Original commit message:
  Allow embedder to set promise internal field count

  Asynchronous context tracking mechanisms in Node.js need to store some
  state on all promise objects. This change will allow embedders to
  configure the number of internal fields on promises as is already done
  for ArrayBuffers.

  BUG=v8:6435

  Review-Url: https://codereview.chromium.org/2889863002
  Cr-Commit-Position: refs/heads/master@{#45496}

PR-URL: https://github.com/nodejs/node/pull/13175
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-26 10:32:54 +02:00
Ali Ijaz Sheikh
e51a201609
deps: backport 6d38f89d from upstream V8
Original commit message:
  [turbofan] Boost performance of Array.prototype.shift by 4x.

  For small arrays, it's way faster to just move the elements instead of
  doing the fairly complex and heavy-weight left-trimming. Crankshaft has
  had this optimization for small arrays already; this CL more or less
  ports this functionality to TurboFan, which yields a 4x speed-up when
  using shift on small arrays (with up to 16 elements).

  This should recover some of the regressions reported in the Node.js issues

    https://github.com/nodejs/node/issues/12657

  and discovered for the syncthrough module using

    https://github.com/mcollina/syncthrough/blob/master/benchmarks/basic.js

  as benchmark.

  R=jarin@chromium.org
  BUG=v8:6376

  Review-Url: https://codereview.chromium.org/2874453002
  Cr-Commit-Position: refs/heads/master@{#45216}

PR-URL: https://github.com/nodejs/node/pull/13162
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-05-25 18:00:54 +02:00
daniel.bevenius
986e1d2c6f deps: cherry-pick f5fad6d from upstream v8
Original commit message:

    This commit adds a getter for the private is_verbose_ member.
    The use case for this comes from Node.js where the ability to avoid
    calling FatalException if the TryCatch is verbose would be nice
    to have.

    BUG=

    Review-Url: https://codereview.chromium.org/2840803002
    Cr-Commit-Position: refs/heads/master@{#45018}

PR-URL: https://github.com/nodejs/node/pull/12826
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-05-16 09:43:50 +02:00
Ben Noordhuis
d74a545535 deps: cherry-pick bfae9db from upstream v8
Original commit message:

    Update postmortem metadata generator.

    Add PropertyDetails::AttributesField +
    PropertyDetails::LocationField.

    Review-Url: https://codereview.chromium.org/2842843004
    Cr-Commit-Position: refs/heads/master@{#44889}

PR-URL: https://github.com/nodejs/node/pull/12722
Refs: https://github.com/nodejs/llnode/issues/81
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-05-06 20:02:35 +02:00
Daniel Bevenius
fe15fe73c8 deps: backport ec1ffe3 from upstream V8
This commit adds lldbinit files from upstream V8 and also adds these so
that they get installed when `make install` is run.

Original commit message:

[tools] add lldbinit

    The goal of this commit is to add the equivalent to gdbinit but
    for lldb. I've tried to replicate the commands as close as possible
    but I'm unsure about the jss command and hoping to get some feedback
    on it in addition to the bta command which I'm not sure how/when
    this could be used. This is probably just inexperience on my part.

    The lldbinit file can be placed into a directory prefixed with dot
    (.lldbinit) and the python script is currently expected to be in the
    same directory. The path to the script can be changed manually if
    needed as well.

    NOTRY=true

    Review-Url: https://codereview.chromium.org/2758373002
    Cr-Commit-Position: refs/heads/master@{#44136}

PR-URL: https://github.com/nodejs/node/pull/12061
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-05-06 20:02:35 +02:00
Anna Henningsen
6690415696 deps: cherry-pick a927f81c7 from V8 upstream
Original commit message:

  [ValueSerializer] Allow wire format versions beginning with 13 to be deserialized in non-legacy mode.

  As of version 13, delegates do not need to worry about colliding tags with the
  tags reserved by v8, since v8 inserts a "host object" prefix beforehand. Thus
  the format is now suitable for more general use, without opting into the "legacy"
  mode that had this caveat.

  Review-Url: https://codereview.chromium.org/2722213002
  Cr-Commit-Position: refs/heads/master@{#43521}

PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-05-06 20:02:35 +02:00
Zuzana Svetlikova
0f3e69db41 v8: fix gcc 7 build errors
Porting https://github.com/nodejs/node/pull/12392 to master

Ref: https://github.com/nodejs/node/pull/12392
Fixes: https://github.com/nodejs/node/issues/10388
PR-URL: https://github.com/nodejs/node/pull/12676
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-05-06 20:02:35 +02:00
Ben Noordhuis
14dc300085 v8: fix stack overflow in recursive method
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock()
used to self-recurse before this commit, causing stack overflows on
systems with small stack sizes.  Make it non-recursive by storing
intermediate results in a heap-allocated list.

Fixes: https://github.com/nodejs/node/issues/11991
PR-URL: https://github.com/nodejs/node/pull/12460
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2017-05-06 20:02:35 +02:00
Michael Dawson
7becb1969c deps: limit regress/regress-crbug-514081 v8 test
regress/regress-crbug-514081 allocates a 2G block of memory
and if there  are multiple variants running at the
same time this can lead to crashes, OOM kills or
the OS failing to allocate memory.  This patch
limits us to running a single variant of the test

Fixes: https://github.com/nodejs/node/issues/6340
PR-URL: https://github.com/nodejs/node/pull/6678
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2017-05-06 20:02:35 +02:00
Michaël Zasso
60d1aac8d2 deps: update V8 to 5.8.283.38
PR-URL: https://github.com/nodejs/node/pull/12784
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-05-06 20:02:35 +02:00
Ben Noordhuis
6ed791c665 deps: cherry-pick bfae9db from upstream v8
Original commit message:

    Update postmortem metadata generator.

    Add PropertyDetails::AttributesField +
    PropertyDetails::LocationField.

    Review-Url: https://codereview.chromium.org/2842843004
    Cr-Commit-Position: refs/heads/master@{#44889}

PR-URL: https://github.com/nodejs/node/pull/12722
Refs: https://github.com/nodejs/llnode/issues/81
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-05-01 13:01:56 +02:00
Zuzana Svetlikova
b07e1a828c
v8: fix gcc 7 build errors
Porting https://github.com/nodejs/node/pull/12392 to master

Ref: https://github.com/nodejs/node/pull/12392
Fixes: https://github.com/nodejs/node/issues/10388
PR-URL: https://github.com/nodejs/node/pull/12676
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-29 22:09:29 +02:00
Ben Noordhuis
30989d30db v8: fix stack overflow in recursive method
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock()
used to self-recurse before this commit, causing stack overflows on
systems with small stack sizes.  Make it non-recursive by storing
intermediate results in a heap-allocated list.

Fixes: https://github.com/nodejs/node/issues/11991
PR-URL: https://github.com/nodejs/node/pull/12460
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2017-04-21 10:39:58 +02:00
João Reis
c1670b6225 deps,win: increase msvs_shard in gyp for V8
Increase the number of shards to divide v8_base into. This increases
the number of calls to cl.exe but decreases the number of files
compiled each time.

Fixes: https://github.com/nodejs/v8/issues/4
PR-URL: https://github.com/nodejs/node/pull/12184
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-11 11:24:40 +01:00
Daniel Bevenius
23498f259d deps: backport ec1ffe3 from upstream V8
This commit adds lldbinit files from upstream V8 and also adds these so
that they get installed when `make install` is run.

Original commit message:

[tools] add lldbinit

    The goal of this commit is to add the equivalent to gdbinit but
    for lldb. I've tried to replicate the commands as close as possible
    but I'm unsure about the jss command and hoping to get some feedback
    on it in addition to the bta command which I'm not sure how/when
    this could be used. This is probably just inexperience on my part.

    The lldbinit file can be placed into a directory prefixed with dot
    (.lldbinit) and the python script is currently expected to be in the
    same directory. The path to the script can be changed manually if
    needed as well.

    NOTRY=true

    Review-Url: https://codereview.chromium.org/2758373002
    Cr-Commit-Position: refs/heads/master@{#44136}

PR-URL: https://github.com/nodejs/node/pull/12061
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-06 07:42:33 +02:00
Daniel Bevenius
678480e328 deps: backport 8dde6ac from upstream V8
Commit 9c9e2d7f4a changed the name of TypeFeedbackVector to
FeedbackVector but that commit did not update gdbinit. This applies the
changed to gdbinit from upstream V8.

Original commit message:

[gdbinit] Rename TypeFeedback* to Feedback*.

    BUG=

    Change-Id: I1e32fdcf9edda57f5de329c8b694620a5da4558b
    Reviewed-on: https://chromium-review.googlesource.com/442444
    Reviewed-by: Michael Stanton <mvstanton@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#43185}

PR-URL: https://github.com/nodejs/node/pull/12060
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-29 07:47:31 +02:00
Michaël Zasso
9c9e2d7f4a deps: backport 3297130 from upstream V8
This fixes a build failure on Windows.

Original commit message:

    Rename TypeFeedbackVector to FeedbackVector.

    ... and TypeFeedbackMetadata to FeedbackMetadata.

    BUG=

    Change-Id: I2556d1c2a8f37b8cf3d532cc98d973b6dc7e9e6c
    Reviewed-on: https://chromium-review.googlesource.com/439244
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: Michael Stanton <mvstanton@chromium.org>
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Hannes Payer <hpayer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#42999}

Refs: https://github.com/nodejs/v8/issues/4
PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:12 +01:00
Michaël Zasso
07088e6fc1 deps: backport 39642fa from upstream V8
This is an almost clean cherry-pick of the original commit. The only
conflict was related to a rename of an internal class.

Original commit message:

    [async-await] (simpler) fix for Return in try/finally in async functions

    Alternative approach to https://codereview.chromium.org/2667983004/, which
    does not depend on implicit control flow changes from
    https://codereview.chromium.org/2664083002

    - Remove handling for `async function` from Parser::RewriteReturn(). This functionality
    is moved to BytecodeGenerator::BuildAsyncReturn(). This ensures that promise resolution
    is deferred until all finally blocks are evaluated fully.

    - Add a new deferred command (CMD_ASYNC_RETURN), which instructs ControlScope to
    generate return code using BuildAsyncReturn rather than BuildReturn.

    - Parser has a new `NewReturnStatement()` helper which determines what type of return
    statement to generate based on the type of function.

    BUG=v8:5896, v8:4483
    R=littledan@chromium.org, neis@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, gsathya@chromium.org

    Review-Url: https://codereview.chromium.org/2685683002
    Cr-Commit-Position: refs/heads/master@{#43104}

Fixes: https://github.com/nodejs/node/issues/11960
PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:11 +01:00
Michaël Zasso
8394b05e20 deps: cherry-pick c5c570f from upstream V8
Original commit message:

    [build] Fix gyp files for building inspector

    This patch fixes compilation of V8 with inspector on Windows as well as
    cross-compilation of the V8 inspector.

    BUG=

    Refs: https://github.com/nodejs/node/pull/10992
    Review-Url: https://codereview.chromium.org/2705423003
    Cr-Commit-Position: refs/heads/master@{#43533}

PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:11 +01:00
Franziska Hinkelmann
3471d6312d deps: cherry-pick 0ba513f05 from V8 upstream
Original commit message:
  [api] Fix DescriptorInterceptor with access check.

  The DescriptorInterceptor should intercept all
  Object.getOwnPropertyDescriptor calls. This CL fixes
  the interceptor's behavior if the iterator state is
  ACCESS_CHECK.

  BUG=

  Review-Url: https://codereview.chromium.org/2707263002
  Cr-Commit-Position: refs/heads/master@{#43417}

PR-URL: https://github.com/nodejs/node/pull/11712
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-25 09:44:11 +01:00
Anna Henningsen
fcc58bf0da deps: cherry-pick a927f81c7 from V8 upstream
Original commit message:

  [ValueSerializer] Allow wire format versions beginning with 13 to be deserialized in non-legacy mode.

  As of version 13, delegates do not need to worry about colliding tags with the
  tags reserved by v8, since v8 inserts a "host object" prefix beforehand. Thus
  the format is now suitable for more general use, without opting into the "legacy"
  mode that had this caveat.

  Review-Url: https://codereview.chromium.org/2722213002
  Cr-Commit-Position: refs/heads/master@{#43521}

PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:11 +01:00
Anna Henningsen
83bf2975ec deps: cherry-pick V8 ValueSerializer changes
Refs: https://github.com/nodejs/node/pull/11048

Below is the list of commits:

deps: cherry-pick 78c0be52d from V8 upstream

Original commit message:

  ValueSerializer: Promote scheduled exceptions from wasm::ErrorThrower.

  wasm::ErrorThrower doesn't actually throw exceptions, it just schedules them.
  As a result, this exception isn't handled properly by code which expects
  ValueDeserializer to actually throw. For instance, the unit tests use a
  TryCatch to catch and handle expected exceptions in unit tests.

  Before this patch, I see local unit test failures because a wasm decode test
  schedules one, but it isn't caught (and instead causes Context::New to fail
  at the beginning of the next test).

  BUG=685713

  Review-Url: https://codereview.chromium.org/2659483004
  Cr-Commit-Position: refs/heads/master@{#42718}

deps: cherry-pick 966355585 from V8 upstream

Original commit message:

  [d8] Use ValueSerializer for postMessage (instead of ad-hoc serializer)

  Review-Url: https://codereview.chromium.org/2643723010
  Cr-Commit-Position: refs/heads/master@{#42749}

deps: cherry-pick bf511b426 from V8 upstream

Original commit message:

  ValueSerializer: Support efficiently reading and writing one-byte strings.

  memcpy is faster than UTF-8 encoding/decoding. This yields 10-20% wins on
  serializing and deserializing long ASCII strings, according to
  blink_perf.bindings -- and these are already in a fast path where the entire
  string is known to be ASCII (but this has to be checked). The win may be
  larger for strings in Latin-1 but not ASCII (though I suspect this is an
  uncommon case).

  A change is also made to make ValueSerializerTest.EncodeTwoByteStringUsesPadding
  survive wire format version number changes.

  This is the first of a series of wire format changes from the previous Blink
  format. The deserializer continues to be able to read the old format, but
  Chromium M56 will no longer be able to read the messages written by this, in M58.

  BUG=chromium:686159

  Review-Url: https://codereview.chromium.org/2658793004
  Cr-Commit-Position: refs/heads/master@{#42753}

deps: cherry-pick 6f1639ed1 from V8 upstream

Original commit message:

  ValueSerializer: Distinguish between 'undefined' and an absent property.

  Dealing with this case requires a wire format change. It is possible that an
  element can be absent even in an array where the dense format was chosen
  (because the array initially had no holes), if the elements are modified while
  they are being serialized. In this case, a new tag for the "hole" is emitted.

  The logic to treat undefined in dense arrays as an absent property is restricted
  to versions of the wire format that this tag did not exist.

  BUG=chromium:686159,chromium:665820

  Review-Url: https://codereview.chromium.org/2660093002
  Cr-Original-Commit-Position: refs/heads/master@{#42784}
  Committed: dc85f4c833
  Review-Url: https://codereview.chromium.org/2660093002
  Cr-Commit-Position: refs/heads/master@{#42800}

deps: cherry-pick c3856de37 from V8 upstream

Original commit message:

  ValueSerializer: Check for zero length before casting to FixedDoubleArray.

  Even though the elements kind is FAST_DOUBLE_ELEMENTS, if length is zero
  the isolate's empty_fixed_array is used. It's illegal to cast this to
  FixedDoubleArray, so we avoid the cast.

  BUG=chromium:686479

  Review-Url: https://codereview.chromium.org/2665313003
  Cr-Commit-Position: refs/heads/master@{#42867}

deps: cherry-pick 591cc0b4c from V8 upstream

Original commit message:

  ValueSerializer: Share string encoding code with String and RegExp objects.

  This avoids the need to pull in the UTF-8 encoding code from the public API,
  and allows it to take advantage of any supported way that i::String can be
  encoded (one- or two-byte).

  Backward compatibility is maintained, but this is the behavior beginning
  with this version.

  BUG=chromium:686159

  Review-Url: https://codereview.chromium.org/2665653004
  Cr-Commit-Position: refs/heads/master@{#42872}

deps: cherry-pick 79837f5f6 from V8 upstream

Original commit message:

  Improve ValueSerializer perf regression after 96635558

  BUG=687196
  R=jbroman@chromium.org

  Review-Url: https://codereview.chromium.org/2674613002
  Cr-Commit-Position: refs/heads/master@{#42938}

deps: cherry-pick 8990399dc from V8 upstream

Original commit message:

  ValueDeserializer: Only allow valid keys when deserializing object properties.

  The serializer won't ever write a more complex object. Not validating this
  allows other things to be used as keys, and converted to string when the
  property set actually occurs. It turns out this gives an opportunity to trigger
  OOM by giving an object a key which is a very large sparse array (whose string
  representation is very large).

  This case is now rejected by the deserializer.

  BUG=chromium:686511

  Review-Url: https://codereview.chromium.org/2697023002
  Cr-Commit-Position: refs/heads/master@{#43249}

deps: cherry-pick 68960eeb7 from V8 upstream

Original commit message:

  ValueDeserializer: Make sure that an exception is the legacy path.

  The entry points to the deserializer are responsible for ensuring that an
  exception is pending by the time they return. Some failures throw exceptions
  themselves, while others (like errors in the format) are exceptions caused by
  the deserializer, not coming from the runtime.

  Like the non-legacy path, a default deserialization exception should be thrown
  in such cases.

  BUG=chromium:693411

  Review-Url: https://codereview.chromium.org/2712713002
  Cr-Commit-Position: refs/heads/master@{#43390}

deps: cherry-pick 3b15d950e from V8 upstream

Original commit message:
  ValueSerializer: Add SetTreatArrayBufferViewsAsHostObjects() flag

  Add `ValueSerializer::SetTreatArrayBufferViewsAsHostObjects()` which
  instructs the `ValueSerializer` to treat ArrayBufferView objects as
  host objects.

  BUG=v8:5926

  Review-Url: https://codereview.chromium.org/2696133007
  Cr-Commit-Position: refs/heads/master@{#43281}

deps: cherry-pick 654351997 from V8 upstream

Original commit message:

  ValueSerializer: Add an explicit tag for host objects.

  This makes it no longer necessary to ensure that V8 and Blink have non-colliding
  tags, which makes it easier for them to evolve independently, and also makes
  the wire format more suitable for other V8 embedders, who would not
  necessarily be surveyed before V8 introduced a new tag that might collide
  with theirs.

  BUG=chromium:686159

  Review-Url: https://codereview.chromium.org/2709023003
  Cr-Commit-Position: refs/heads/master@{#43466}

PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:10 +01:00
Michael Dawson
3f9c8fb87f deps: limit regress/regress-crbug-514081 v8 test
regress/regress-crbug-514081 allocates a 2G block of memory
and if there  are multiple variants running at the
same time this can lead to crashes, OOM kills or
the OS failing to allocate memory.  This patch
limits us to running a single variant of the test

Fixes: https://github.com/nodejs/node/issues/6340
PR-URL: https://github.com/nodejs/node/pull/6678
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2017-03-25 09:44:10 +01:00
Michaël Zasso
c459d8ea5d deps: update V8 to 5.7.492.69
PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:10 +01:00
Franziska Hinkelmann
dd8982dc74 deps: cherry-pick 09de996 from V8 upstream
Original commit message:
  [debugger] fix switch block source positions.

  The switch statement itself is part of the switch block.
  However, the source position of the statement is outside of
  the block. This leads to confusion for the debugger, if the
  switch block pushes a block context: the current context is
  a block context, but the scope analysis based on the current
  source position tells the debugger that we should be outside
  the scope, so we should have the function context.

  R=marja@chromium.org
  BUG=v8:6085
  Review-Url: https://codereview.chromium.org/2744213003
  Cr-Commit-Position: refs/heads/master@{#43744}
  Committed: 09de9969cc

Fixes: https://github.com/nodejs/node/issues/11746
PR-URL: https://github.com/nodejs/node/pull/11905
Fixes: https://github.com/nodejs/node/issues/11746
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2017-03-19 21:41:47 +01:00
Franziska Hinkelmann
a44aff4770 deps: cherry-pick 0ba513f05 from V8 upstream
Original commit message:
  [api] Fix DescriptorInterceptor with access check.

  The DescriptorInterceptor should intercept all
  Object.getOwnPropertyDescriptor calls. This CL fixes
  the interceptor's behavior if the iterator state is
  ACCESS_CHECK.

  BUG=

  Review-Url: https://codereview.chromium.org/2707263002
  Cr-Commit-Position: refs/heads/master@{#43417}

PR-URL: https://github.com/nodejs/node/pull/11712
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-09 09:15:02 +01:00
Michaël Zasso
7c0c7baff3 deps: fix gyp configuration for v8-inspector
Cross-compiled builds need different toolsets.

PR-URL: https://github.com/nodejs/node/pull/10992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-02-22 15:57:33 +01:00
Michaël Zasso
00a2aa0af5 deps: fix gyp build configuration for Windows
PR-URL: https://github.com/nodejs/node/pull/10992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-02-22 15:57:25 +01:00
Michael Dawson
3c53ad0df9 deps: limit regress/regress-crbug-514081 v8 test
regress/regress-crbug-514081 allocates a 2G block of memory
and if there  are multiple variants running at the
same time this can lead to crashes, OOM kills or
the OS failing to allocate memory.  This patch
limits us to running a single variant of the test

Fixes: https://github.com/nodejs/node/issues/6340
PR-URL: https://github.com/nodejs/node/pull/6678
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2017-02-22 15:56:46 +01:00
Michaël Zasso
7a77daf243 deps: update V8 to 5.6.326.55
PR-URL: https://github.com/nodejs/node/pull/10992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-02-22 15:55:42 +01:00
Ben Noordhuis
039a813ff0 deps: back-port b049d1a from V8 upstream
Original commit message:

    Ensure we align zone memory at 8 byte boundaries on all platforms

    BUG=v8:5668
    R=verwaest@chromium.org

    Review-Url: https://codereview.chromium.org/2672203002
    Cr-Commit-Position: refs/heads/master@{#42959}

PR-URL: https://github.com/nodejs/node/pull/11204
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-09 14:49:42 +01:00
Michael Dawson
b37f55a1ba deps: limit regress/regress-crbug-514081 v8 test
regress/regress-crbug-514081 allocates a 2G block of memory
and if there  are multiple variants running at the
same time this can lead to crashes, OOM kills or
the OS failing to allocate memory.  This patch
limits us to running a single variant of the test

Fixes: https://github.com/nodejs/node/issues/6340
PR-URL: https://github.com/nodejs/node/pull/6678
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2017-01-26 22:46:18 +01:00
Michaël Zasso
2739185b79 deps: update V8 to 5.5.372.40
PR-URL: https://github.com/nodejs/node/pull/9618
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-01-26 22:46:17 +01:00
Steven R. Loomis
f2d3afbd88 deps: cherry-pick 2f5da9a from V8 upstream
Original commit message:
  Fix the uppercasing of U+00E7(ç) and U+00F7(÷)
  Due to a typo in runtime-i18n.js, 'ç'(U+00E7) was not uppercased
  while '÷'(U+00F7) was incorrectly uppercased to '×'(U+00D7).

  Add a comprehensive test for Latin-1 supplemental block
  (U+00A0 ~ U+00FF). (they're special-cased for speed-up and
  needs to have a test for the range.).

  TEST=intl/general/case-mapping
  BUG=v8:5681

  Review-Url: https://codereview.chromium.org/2533033003
  Cr-Commit-Position: refs/heads/master@{#41331}

PR-URL: https://github.com/nodejs/node/pull/9828
Fixes: https://github.com/nodejs/node/issues/9785
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2017-01-06 15:38:29 -05:00