Commit Graph
33270 Commits
Author SHA1 Message Date
naortedgi 6201f23e12 doc: adding example to Buffer.isBuffer method
PR-URL: https://github.com/nodejs/node/pull/36233
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2021-05-01 09:44:33 +02:00
Luigi Pinca 1d78d50127 doc: fix typo in events.md
PR-URL: https://github.com/nodejs/node/pull/36231
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-01 09:44:32 +02:00
Juan José Arboleda 94a877b0a4 test: improve test coverage SourceMap API
PR-URL: https://github.com/nodejs/node/pull/36089
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-01 09:44:32 +02:00
cjihrig 9b32c9c575 doc: fix --experimental-wasm-modules text location
The text for --experimental-wasm-modules had drifted to under the
--force-context-aware text. This commit moves it back to the
proper location.

PR-URL: https://github.com/nodejs/node/pull/36220
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-01 09:44:32 +02:00
Ruy Adorno 28149cff23 doc: add missing version to update cmd
Add to the example of running `./tools/update-npm.sh` the missing
reference to the version number that is required by the command.

PR-URL: https://github.com/nodejs/node/pull/36204
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-01 09:44:32 +02:00
devsnek d8cb34158b src: update node.rc file description
PR-URL: https://github.com/nodejs/node/pull/36197
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2021-05-01 09:44:32 +02:00
Antoine du Hamel be537fe877 lib: remove primordials.SafePromise
PR-URL: https://github.com/nodejs/node/pull/36149
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-01 09:44:31 +02:00
Anna Henningsen 4807499d21 domain: improve deprecation warning text for DEP0097
Because the following gives basically no actionable information
on its own, neither in the error message nor in the stack trace:

    (node:3187) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
        at emitMakeCallbackDeprecation (domain.js:123:13)
        at process.topLevelDomainCallback (domain.js:135:5)
        at process.callbackTrampoline (internal/async_hooks.js:124:14)

PR-URL: https://github.com/nodejs/node/pull/36136
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-01 09:44:31 +02:00
Rich Trott 2d6494775b doc: fix invalid link in worker_threads.md
Inadvertent double hash in link makes it invalid and no longer pointing
to the documentation section it intends to point to.

PR-URL: https://github.com/nodejs/node/pull/36109
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-05-01 09:39:10 +02:00
Momtchil Momtchev 395b9a69a1 perf_hooks: make nodeTiming a first-class object
Render all properties of nodeTiming enumerable
so JSON.stringify and Object.keys can access them

Fixes: https://github.com/nodejs/node/issues/35936

PR-URL: https://github.com/nodejs/node/pull/35977
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-01 09:39:10 +02:00
Szymon Marczak 8715462f47 dns: add a cancel() method to the promise Resolver
PR-URL: https://github.com/nodejs/node/pull/33099
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-01 09:39:10 +02:00
Rich Trott 6c62e15c36 test: move test-worker-eventlooputil to sequential
The test is not nearly as unreliable as it used to be but we're still
seeing failures around the timing checks that will definitely be
affected by other tests running in other processes. So move it to
sequential.

Refs: https://github.com/nodejs/node/pull/35961#issuecomment-722222696

PR-URL: https://github.com/nodejs/node/pull/35996
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-05-01 09:39:10 +02:00
Dmitry Semigradsky ec140d7160 doc: fix events.getEventListeners example
PR-URL: https://github.com/nodejs/node/pull/36085
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-01 09:39:09 +02:00
Rich Trott 16f6f1a0c2 test: add missing test coverage for setLocalAddress()
Add missing coverage for setLocalAddress() method of dns.Resolver class.
The case where a valid IPv4 argument was supplied along with an invalid
IPv6 argument was not being checked.

Refs: https://coverage.nodejs.org/coverage-85b42af4398073f8/lib/internal/dns/utils.js.html#L124

PR-URL: https://github.com/nodejs/node/pull/36039
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-05-01 09:39:09 +02:00
Mattias Runge-BrobergandColin Ihrig ffaa1149e1 readline: add getPrompt to get the current prompt
Since there is a setPrompt() there should be a getPrompt().
There are use-cases where it is needed to know what the
current prompt is. Adding a getPrompt() negates the need
to store the set prompt externally or read the internal
_prompt which would be bad practice.

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/33675
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2021-05-01 09:39:09 +02:00
Gerhard Stoebich 23835012e0 test: fix races in test-performance-eventlooputil
Fix two races in test-performance-eventlooputil resulting in a flaky
test.

elu1 was capture after start time t from spin look. If OS descides to
reschedule the process after capturing t but before getting elu for
>=50ms the spin loop is actually a nop. elu1 doesn't show this and as
a result elut3 = eventLoopUtilization(elu1) results in
elu3.active === 0.
Moving capturing of t after capturing t, just before the spin look
avoids this.

Similar if OS decides to shedule a different process between getting
the total elu from start and the diff elu showing the spin loop the
check to verify that total active time is long then the spin loop
fails.
Exchanging these statements avoids this race.

PR-URL: https://github.com/nodejs/node/pull/36028
Fixes: https://github.com/nodejs/node/issues/35309
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-01 09:39:09 +02:00
Robert Nagy 4793f165dc stream: fix pipe deadlock when starting with needDrain
Fixes: https://github.com/nodejs/node/issues/36544

PR-URL: https://github.com/nodejs/node/pull/36563
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-01 09:39:09 +02:00
Robert Nagy 617f2dc0cf stream: writableNeedDrain
Don't write to a stream which already has a full buffer.

Fixes: https://github.com/nodejs/node/issues/35341

PR-URL: https://github.com/nodejs/node/pull/35348
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-05-01 09:39:08 +02:00
Rich Trott 0f126d0e05 dns: fix trace_events name for resolveCaa()
A test was added for this in 6f34498 but because it was a test in the
`internet` directory, it was not run on CI and it was not noticed that
the test was failing. This fixes the error that was causing the test to
fail.

PR-URL: https://github.com/nodejs/node/pull/35979
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-05-01 09:39:08 +02:00
Antoine du Hamel 26e9c39cea stream: remove isPromise utility function
The function was not checking if the parameter was actually a Promise
instance, but if it has a `then` method. Removing the utility function
in favor of a clearer `typeof` check, handling the case when the
thenable throws if then method is accessed more than once.

PR-URL: https://github.com/nodejs/node/pull/35925
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-05-01 09:39:08 +02:00
Bryan Field 34d8a64c56 doc: fix incorrect heading level
PR-URL: https://github.com/nodejs/node/pull/35965
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-05-01 09:39:08 +02:00
Stephen Belanger 623099db4b http: report request start and end with diagnostics_channel
PR-URL: https://github.com/nodejs/node/pull/34895
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-05-01 09:39:08 +02:00
Stephen Belanger 60ef53cc14 lib: create diagnostics_channel module
PR-URL: https://github.com/nodejs/node/pull/34895
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-05-01 09:39:07 +02:00
Vincent Boivin 2e259220cb http2: add updateSettings to both http2 servers
Allow the user to update the server settings
after using http2.createSecureServer() or
after using http2.createServer().

Fixes: https://github.com/nodejs/node/issues/35353

PR-URL: https://github.com/nodejs/node/pull/35383
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2021-05-01 09:39:07 +02:00
Rich Trott d63747de5a test: fix error in test/internet/test-dns.js
Refs: https://github.com/nodejs/node/pull/35466#issuecomment-721936009

PR-URL: https://github.com/nodejs/node/pull/35969
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-01 09:39:07 +02:00
Danny Sonnenschein fd08c37d98 net: add support for resolving DNS CAA records
This adds support for DNS Certification Authority Authorization
(RFC 8659) to Node.js.

PR-URL: https://github.com/nodejs/node/pull/35466
Fixes: https://github.com/nodejs/node/issues/19239
Refs: https://github.com/nodejs/node/issues/14713
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-05-01 09:39:07 +02:00
Anna Henningsen bacd432f34 src: move all base64.h inline methods into -inl.h header file
Refs: https://github.com/nodejs/node/pull/34944#discussion_r480321239

PR-URL: https://github.com/nodejs/node/pull/35432
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-01 09:39:07 +02:00
himself65 9b8596a67f fs: fix when path is buffer on fs.symlinkSync
PR-URL: https://github.com/nodejs/node/pull/34540
Fixes: https://github.com/nodejs/node/issues/34514
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com>
2021-05-01 09:39:06 +02:00
Rich Trott 00b9d955e9 test: run test-benchmark-napi on arm
Necessary Makefile changes have happened. This now passes in CI.

PR-URL: https://github.com/nodejs/node/pull/34502
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2021-05-01 09:39:06 +02:00
Anna Henningsen b1d5160828 src: guard against nullptr deref in TimerWrapHandle::Stop
Refs: https://github.com/nodejs/node/pull/34454

PR-URL: https://github.com/nodejs/node/pull/34460
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2021-05-01 09:39:06 +02:00
Anna Henningsen cf2475ca09 src: refactor TimerWrap lifetime management
Split `Stop(true)` and `Stop(false)` into separate methods since the
actions performed by these are fully distinct.

PR-URL: https://github.com/nodejs/node/pull/34252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2021-05-01 09:39:06 +02:00
Anna Henningsen b8bccc3132 src: remove user_data from TimerWrap
There’s no point in having an opaque user data pointer when we’re
already using `std::function`.

PR-URL: https://github.com/nodejs/node/pull/34252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2021-05-01 09:39:02 +02:00
James M Snell 8e1e3b563f src: replace InspectorTimer with TimerWrap utility
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-04-30 14:41:44 +02:00
James M Snell a3a4d2c283 src: add TimerWrap utility
Consolidate uv_timer_t boilerplate code into a shared utility.
There are several places throughout the code where we use uv_timer_t
internally (inspector, perf, quic), with some code duplication.
This eliminates the duplicated code, ensures that cleanup occurs
correctly, and simplifies use of the timers.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/34186
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-04-30 14:41:36 +02:00
Anna Henningsen ae9bd89329 src: perform bounds checking on error source line
Fixes: https://github.com/nodejs/node/issues/33578

PR-URL: https://github.com/nodejs/node/pull/33645
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-04-30 14:38:42 +02:00
cjihrig d9d7ebd0b4 doc: make globals Extends usage consistent
The docs use `* Extends: {type}` to define inheritance. This
commit updates the globals documentation to be consistent.

PR-URL: https://github.com/nodejs/node/pull/33777
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-04-30 14:38:31 +02:00
cjihrig 2f7afd11a4 doc: make perf_hooks Extends usage consistent
The docs use `* Extends: {type}` to define inheritance. This
commit updates the perf_hooks documentation to be consistent.

PR-URL: https://github.com/nodejs/node/pull/33777
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-04-30 14:38:26 +02:00
cjihrig 810b1d0cbb doc: make events Extends usage consistent
The docs use `* Extends: {type}` to define inheritance. This
commit updates the events documentation to be consistent.

PR-URL: https://github.com/nodejs/node/pull/33777
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-04-30 14:38:19 +02:00
Michaël Zasso d8f8719415 build: do not pass mode option to test-v8 command
It was removed upstream and is now inferred from the build config.

PR-URL: https://github.com/nodejs/node/pull/35705
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:23 +02:00
Michaël Zasso 329ee8bbc3 deps: V8: cherry-pick bbc59d124ef3
Original commit message:

    M86-LTS: [compiler] Fix bug in RepresentationChanger::GetWord32RepresentationFor

    We have to respect the TypeCheckKind.

    (cherry picked from commit fd29e246f65a7cee130e72cd10f618f3b82af232)

    No-Try: true
    No-Presubmit: true
    No-Tree-Checks: true
    Bug: chromium:1195777
    Change-Id: If1eed719fef79b7c61d99c29ba869ddd7985c413
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2817791
    Commit-Queue: Georg Neis <neis@chromium.org>
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Cr-Original-Commit-Position: refs/heads/master@{#73909}
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2838235
    Owners-Override: Achuith Bhandarkar <achuith@chromium.org>
    Reviewed-by: Artem Sumaneev <asumaneev@google.com>
    Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
    Cr-Commit-Position: refs/branch-heads/8.6@{#79}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: https://github.com/v8/v8/commit/bbc59d124ef39ba28061b0f60006f89b21d9d8df

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:22 +02:00
Michaël Zasso bda15149f8 deps: V8: cherry-pick be91c6c50818
Original commit message:

    [compiler][cleanup] Move Make(String|Name) helper methods to cctest.h

    Several tests were using them and we can dedup code.

    Change-Id: I4ef5ae5772856d1f36e965b6b62ff5895b4e04fb
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215173
    Reviewed-by: Maya Lekova <mslekova@chromium.org>
    Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#67974}

Refs: https://github.com/v8/v8/commit/be91c6c508183d8de6d74a71a3eee73d193390c6

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:21 +02:00
Michaël Zasso 16a005cfa0 deps: V8: cherry-pick 4e24c353d812
Original commit message:

    [compiler] Test linear searches in a DescriptorArray in the background

    This CL adds a linear search test in a DescriptorArray in a known flat
    object in the background thread, while the main thread exercises the
    same DescriptorArray.

    Also sets the foundation for the follow-ups tests in background threads.

    Bug: v8:7790
    Change-Id: I0e99508204808baaf605161d2eeb717eabe712fb
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207147
    Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
    Reviewed-by: Georg Neis <neis@chromium.org>
    Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: Michael Stanton <mvstanton@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68299}

Refs: https://github.com/v8/v8/commit/4e24c353d81254f2f5d386eaddc6a550dea1b2e6

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:20 +02:00
Michaël Zasso 42140a12f2 deps: V8: cherry-pick eddb82330975
Original commit message:

    Merged: [wasm][liftoff] Fix register usage for i64_addi

    The arm implementation made the assumption that the {lhs} and {dst}
    registers are either the same, or there is no overlap. This assumption
    does not hold.
    ia32 on the other hand has a lot of complicated logic (and unnecessary
    code generation) for different cases of overlap.

    This CL fixes the arm issue *and* simplifies the ia32 logic by making
    the arm assumption hold, and using it to eliminate special handling on
    ia32.

    R=​thibaudm@chromium.org

    (cherry picked from commit 89ca48c907e25ef94a135255092c4e150654c4fc)

    Bug: chromium:1146861
    Change-Id: I96c4985fb8ff710b98e009e457444fc8804bce58
    No-Try: true
    No-Presubmit: true
    No-Tree-Checks: true
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584242
    Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/branch-heads/8.6@{#50}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: https://github.com/v8/v8/commit/eddb823309751c0a07db5792c04ff908e6ae1e5b

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:18 +02:00
Michaël Zasso 4d0bc3839a deps: V8: cherry-pick 6771d3e31883
Original commit message:

    [wasm][liftoff][cleanup] Remove default parameter of GetUnusedRegister

    This CL removes the default parameter of GetUnusedRegister to avoid bugs
    where the default parameter is used accidentially. With "{}" the default
    value of the parameter is easy to write, and also not much more difficult to read.

    R=clemensb@chromium.org

    Bug: v8:10506
    Change-Id: I3debe5eb91578c82abdac81dc6c252435fdf30d6
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2202991
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#67822}

Refs: https://github.com/v8/v8/commit/6771d3e31883b01c948e44a15a8bed1a373f59c8

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:17 +02:00
Michaël Zasso 982937893e deps: V8: cherry-pick f44fcbf803ac
Original commit message:

    Merged: [wasm][liftoff][ia32] Fix register allocation of CompareExchange

    The register that holds the {new_value} for the AtomicCompareExchange8U
    has to be a byte register on ia32. There was code to guarantee that, but
    after that code there was code that frees the {eax} register, and that
    code moved the {new_value} to a different register again. With this CL
    we first free {eax}, and then find a byte register for the {new_value}.

    R=​clemensb@chromium.org
    NOTRY=true
    NOPRESUBMIT=true
    NOTREECHECKS=true

    (cherry picked from commit 70a389ac8778064e470a95412d40e17f97898142)

    Bug: chromium:1140549
    Change-Id: I1679f3f9ab26c5416ea251c7925366ff43336d85
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2491031
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Original-Commit-Position: refs/heads/master@{#70721}
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2504512
    Cr-Commit-Position: refs/branch-heads/8.6@{#38}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: https://github.com/v8/v8/commit/f44fcbf803aca41a4d51ba9614017ea14d03df47

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:16 +02:00
Michaël Zasso fa45d6a358 deps: V8: cherry-pick 93b2105fbe44
Original commit message:

    [wasm][ia32][liftoff] Implement AtomicCompareExchange

    As there are not enough registers on ia32 to execute the platform-
    independent code, the CL also adds ia32-specific code to
    liftoff-compiler.cc. For this we first retrieve the memory index from
    the stack, do a bounds check, and calculate the final address. Only
    afterwards we pop all other values from the stack and pass them to the
    platform-dependent code.

    R=clemensb@chromium.org

    Bug: v8:10108
    Change-Id: I741266a9523c8b5c46acc0b29817fd143a75752e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2316305
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69047}

Refs: https://github.com/v8/v8/commit/93b2105fbe44c7d1260bbc8b466042624002e9c6

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:15 +02:00
Michaël Zasso c5fe3a226a deps: V8: cherry-pick 1a7d55a9a427
Original commit message:

    Merged: [runtime] Fix sorted order of DescriptorArray entries

    Revision: 518d67ad652fc24b7eb03e48bb342f952d4ccf74

    This is a reland of the previous merge which addresses the cctest link
    failure in component build mode.

    BUG=chromium:1133527
    NOTRY=true
    NOPRESUBMIT=true
    NOTREECHECKS=true
    R=verwaest@chromium.org

    Change-Id: Icbbc69fd5403fd0c2ab6d07d4340292b2b8c72b9
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2504264
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/branch-heads/8.6@{#40}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: https://github.com/v8/v8/commit/1a7d55a9a4274897e1e2e744b99800c3a491af7f

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:14 +02:00
Michaël Zasso 7dd68ac5b6 deps: V8: cherry-pick 8ebd894186ed
Original commit message:

    [LTS-M86][builtins] Fix Array.prototype.concat with @@species

    (cherry picked from commit 7989e04979c3195e60a6814e8263063eb91f7b47)

    No-Try: true
    No-Presubmit: true
    No-Tree-Checks: true
    Bug: chromium:1195977
    Change-Id: I16843bce2e9f776abca0f2b943b898ab5e597e42
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2810787
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Cr-Original-Commit-Position: refs/heads/master@{#73842}
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2823829
    Commit-Queue: Jana Grill <janagrill@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Victor-Gabriel Savu <vsavu@google.com>
    Cr-Commit-Position: refs/branch-heads/8.6@{#77}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: https://github.com/v8/v8/commit/8ebd894186ed74afb7236ee6981e63e545b26db0

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:13 +02:00
Michaël Zasso a4a9246ea1 deps: V8: cherry-pick 1e35f6472510
Original commit message:

    [LTS-M86][builtins] Harden Array.prototype.concat.

    Defence in depth patch to prevent JavaScript from executing
    from within IterateElements.

    R=​ishell@chromium.org
    R=​cbruni@chromium.org

    (cherry picked from commit 8284359ed0607e452a4dda2ce89811fb019b4aaa)

    No-Try: true
    No-Presubmit: true
    No-Tree-Checks: true
    Bug: chromium:1195977
    Change-Id: Ie59d468b73b94818cea986a3ded0804f6dddd10b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2819941
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Cr-Original-Commit-Position: refs/heads/master@{#73898}
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2821961
    Commit-Queue: Jana Grill <janagrill@chromium.org>
    Reviewed-by: Victor-Gabriel Savu <vsavu@google.com>
    Cr-Commit-Position: refs/branch-heads/8.6@{#76}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: https://github.com/v8/v8/commit/1e35f647251009019485ddb2b371281b182d04b0

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:12 +02:00
Michaël Zasso 9bfb0f33e9 deps: V8: cherry-pick 3066b7b2fcb3
Original commit message:

    [LTS-M86][compiler][x64] Fix bug in InstructionSelector::ChangeInt32ToInt64

    (cherry picked from commit 02f84c745fc0cae5927a66dc4a3e81334e8f60a6)

    No-Try: true
    No-Presubmit: true
    No-Tree-Checks: true
    Bug: chromium:1196683
    Change-Id: Ib4ea738b47b64edc81450583be4c80a41698c3d1
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2820971
    Commit-Queue: Georg Neis <neis@chromium.org>
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Cr-Original-Commit-Position: refs/heads/master@{#73903}
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2821959
    Commit-Queue: Jana Grill <janagrill@chromium.org>
    Reviewed-by: Georg Neis <neis@chromium.org>
    Reviewed-by: Victor-Gabriel Savu <vsavu@google.com>
    Cr-Commit-Position: refs/branch-heads/8.6@{#75}
    Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1}
    Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472}

Refs: https://github.com/v8/v8/commit/3066b7b2fcb3aa66541a4818e1165e34acc52639

PR-URL: https://github.com/nodejs/node/pull/38275
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
2021-04-30 12:54:11 +02:00