- Jun 08, 2018
-
-
Kenny Yuan authored
Added a new struct CallbackBundle to eliminate all GetInternalField() calls. The principle is to store all required data inside a C++ struct, and then store the pointer in the JavaScript object. Before this change, the required data are stored in the JavaScript object in 3 or 4 seperate pointers. For every napi fun call, 3 of them have to be fetched out, which are 3 GetInternalField() calls; after this change, the C++ struct will be directly fetched out by using v8::External::Value(), which is faster. Profiling data show that GetInternalField() is slow. On an i7-4770K (3.50GHz) box, a C++ V8-binding fun call is 8 ns, before this change, napi fun call is 36 ns; after this change, napi fun call is 20 ns. The above data are measured using a modified benchmark in 'benchmark/misc/function_call'. The modification adds an indicator of the average time of a "chatty" napi fun call (max 50M runs). This change will speed up chatty case 1.8x (overall), and will cut down the delay of napi mechanism to approx. 0.5x. Background: a simple C++ binding function (e.g. receiving little from JS, doing little and returning little to JS) is called 'chatty' case for JS<-->C++ fun call routine. This improvement also applies to getter/setter fun calls. PR-URL: https://github.com/nodejs/node/pull/21072 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Gabriel Schulhof <gabriel.schulhof@intel.com>
-
Rich Trott authored
test-util-format checks the message of an error that is generated by the JavaScript engine. Error messages that change in the underlying JavaScript engine should not be breaking changes in Node.js and therefore should not cause tests to fail. Remove the message check and replace it with a check of the type of the Error object along with the absence of a `code` property. (If a `code` property were present, it would indicate that the error was coming from Node.js rather than the JavaScript engine.) This also makes this test usable without modification in the ChakraCore fork of Node.js. PR-URL: https://github.com/nodejs/node/pull/21141 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Evandro Oliveira authored
Some GNU assembler versions got localized outputs like... ``` Gnu assembler versão 2.30 (x86_64-linux-gnu) usando versão BFD (GNU Binutils for Ubuntu) 2.30 ``` failing regex checker and the whole configure process. PR-URL: https://github.com/nodejs/node/pull/20394 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
Right now when not adding a callback to the pipeline it could cause an uncaught exception if there is an error. Instead, just make the callback mandatory as mostly done in all other Node.js callback APIs so users explicitly have to decide what to do in such situations. PR-URL: https://github.com/nodejs/node/pull/21054 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
We use the `Isolate*` pointer as the sole identifier for a V8 Isolate. In some environments (e.g. multi-threaded), Isolates may be destroyed and new ones created; then, it may happen that the memory that was previously used for one `Isolate` can be re-used for another `Isolate` after the first one has been disposed of. This check is a little guard against accidentally re-using the same per-Isolate platform data structure in such cases, i.e. making sure (to the degree to which that is possible) that the old `Isolate*` has been properly unregistered before one at the same memory address is added. (It’s not 100 % foolproof because the `uv_loop_t*` pointer value could theoretically be the same as well.) PR-URL: https://github.com/nodejs/node/pull/21156 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Anna Henningsen authored
Refs: https://github.com/ayojs/ayo/pull/14 Refs: https://github.com/ayojs/ayo/pull/75 Co-authored-by:
Jeremiah Senkpiel <fishrock123@rocketmail.com> PR-URL: https://github.com/nodejs/node/pull/21059 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Jon Moss <me@jonathanmoss.me> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com> Reviewed-By:
Matheus Marchini <matheus@sthima.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Tommaso Allevi authored
PR-URL: https://github.com/nodejs/node/pull/21067 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Ben Noordhuis authored
Remove compile-time and run-time conditionals for features that OpenSSL 1.0.0 and 1.0.1 didn't support: ALPN, OCSP and/or SNI. They are no longer necessary since our baseline is OpenSSL 1.0.2. PR-URL: https://github.com/nodejs/node/pull/21094 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Tobias Nießen <tniessen@tnie.de> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
James M Snell authored
Continue moving bits of code out of node.cc ... add node_encoding.cc as a home for `ParseEncoding` and related functions. PR-URL: https://github.com/nodejs/node/pull/21112 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
James M Snell authored
PR-URL: https://github.com/nodejs/node/pull/21113 Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Yang Guo authored
Original commit message: [api] do not require source string for producing code cache. The embedder should not need to keep track of the source string. R=jgruber@chromium.org Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: Ie27df755a22fbcae7b6e87a435419d2d8f545558 Reviewed-on: https://chromium-review.googlesource.com/1013482 Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#52614} PR-URL: https://github.com/nodejs/node/pull/21022 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com>
-
Rich Trott authored
test-url-parse-invalid-input checks the message of an error that is generated by the JavaScript engine. Error messages that change in the underlying JavaScript engine should not be breaking changes in Node.js and therefore should not cause tests to fail. Remove the message check and replace it with a check of the type of the Error object along with the absence of a `code` property. (If a `code` property were present, it would indicate that the error was coming from Node.js rather than the JavaScript engine.) This also makes this test usable without modification in the ChakraCore fork of Node.js. PR-URL: https://github.com/nodejs/node/pull/21132 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
- Jun 07, 2018
-
-
Michaël Zasso authored
Refs: https://github.com/v8/v8/compare/6.7.288.43...6.7.288.44 PR-URL: https://github.com/nodejs/node/pull/21146 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Joyee Cheung authored
PR-URL: https://github.com/nodejs/node/pull/20220 Fixes: https://github.com/nodejs/node/issues/12115 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Joyee Cheung authored
Add the `bigint: true` option to all the `fs.*stat` methods and `fs.watchFile`. PR-URL: https://github.com/nodejs/node/pull/20220 Fixes: https://github.com/nodejs/node/issues/12115 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Anatoli Papirovski authored
Much like with NODE_HANDLE_ACK, the internal protocol for communication about the sent socket should not expose its errors to the users when those async calls are not initiated by them. PR-URL: https://github.com/nodejs/node/pull/21108 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com>
-
Anatoli Papirovski authored
The bug referenced in this TODO was fixed and this test no longer requires this code to pass. PR-URL: https://github.com/nodejs/node/pull/21145 Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
cjihrig authored
PR-URL: https://github.com/nodejs/node/pull/21148 Fixes: https://github.com/nodejs/node/issues/21121 Refs: https://github.com/nodejs/node/pull/21003 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Ujjwal Sharma <usharma1998@gmail.com>
-
Bartosz Sosnowski authored
Adds `doc` option to vcbuild.bat which will install node-doc-generator dependencies and build the documentation in the %config%\doc folder. Adds `lint-md-build` option which will download markdown linter. Adds `lint-md` option, included by default in `lint` and `test` options which will run linter on the markdown files in the doc folder. PR-URL: https://github.com/nodejs/node/pull/19663 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Refael Ackermann <refack@gmail.com>
-
Rich Trott authored
Remove spaces around slash characters in documentation. This change sometimes rewords the content where the slash construction may not be what is called for. PR-URL: https://github.com/nodejs/node/pull/21140 Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Rich Trott authored
Alphabetize the lists of options for tls.createServer() and tls.createSecureContext(). PR-URL: https://github.com/nodejs/node/pull/21139 Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com>
-
Rich Trott authored
PR-URL: https://github.com/nodejs/node/pull/21138 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com>
-
Rich Trott authored
Change instances of `foo has been deprecated` to `foo is deprecated` and similar. PR-URL: https://github.com/nodejs/node/pull/21136 Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Vse Mozhet Byt <vsemozhetbyt@gmail.com>
-
Rich Trott authored
Refactor the test and the source for the `lowercase-name-for-primitive` custom ESLint rule for readability. PR-URL: https://github.com/nodejs/node/pull/21134 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Rich Trott authored
In the spread-assign.js benchmark file, all ESLint rules are disabled for a line where only no-unused-vars needs to be disabled. This change makes it so that the remaining rules are still applied to the line. PR-URL: https://github.com/nodejs/node/pull/21133 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Rich Trott authored
Add tests for `fs.promises.appendFile()` to the last test case in `test-fs-access`. (The previous test cases already have promises API versions.) PR-URL: https://github.com/nodejs/node/pull/21131 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Rich Trott authored
Add tests for `fs.promises.appendFile()` to the fourth (of five) test case in `test-fs-access`. (The previous test cases already have promises API versions.) PR-URL: https://github.com/nodejs/node/pull/21131 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Rich Trott authored
Add tests for `fs.promises.appendFile()` to the third (of five) test case in `test-fs-access`. (First and second test cases already have promises API versions.) PR-URL: https://github.com/nodejs/node/pull/21131 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Daniel Bevenius authored
This commit adds a rule to cpplint to check that pointers in the code base lean to the left and not right, and also fixes the violations reported. PR-URL: https://github.com/nodejs/node/pull/21010 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Rich Trott authored
test-trace-events-fs-sync is swallowing useful information when it fails. This change results in more information being displayed. PR-URL: https://github.com/nodejs/node/pull/21120 Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Lance Ball <lball@redhat.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
-
Matheus Marchini authored
This commit adds a test to validate if Linux perf is working correctly on Node.js. The test is marked as flaky because its intention is to let us know when changes on V8 potentially broke Linux perf, so we can fix it before a new version of V8 lands on Node.js master. PR-URL: https://github.com/nodejs/node/pull/20783 Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Matheus Marchini authored
`v8-updates` holds all tests related to V8 updates, for example, testing for postmortem metadata chages. PR-URL: https://github.com/nodejs/node/pull/20783 Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Anna Henningsen authored
PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
John-David Dalton <john.david.dalton@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Anna Henningsen authored
PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
John-David Dalton <john.david.dalton@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Anna Henningsen authored
Enable running tests inside workers by passing `--worker` to `tools/test.py`. A number of tests are marked as skipped, or have been slightly altered to fit the different environment. PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
John-David Dalton <john.david.dalton@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Anna Henningsen authored
Rather than passing errors using some sort of string representation, do a best effort for faithful serialization/deserialization of uncaught exception objects. PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
John-David Dalton <john.david.dalton@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Timothy Gu authored
$ ./node benchmark/cluster/echo.js cluster/echo.js n=100000 sendsPerBroadcast=1 payload="string" workers=1: 33,647.30473442063 cluster/echo.js n=100000 sendsPerBroadcast=10 payload="string" workers=1: 12,927.907405288383 cluster/echo.js n=100000 sendsPerBroadcast=1 payload="object" workers=1: 28,496.37373941151 cluster/echo.js n=100000 sendsPerBroadcast=10 payload="object" workers=1: 8,975.53747186485 $ ./node --experimental-worker benchmark/worker/echo.js worker/echo.js n=100000 sendsPerBroadcast=1 payload="string" workers=1: 88,044.32902365089 worker/echo.js n=100000 sendsPerBroadcast=10 payload="string" workers=1: 39,873.33697018837 worker/echo.js n=100000 sendsPerBroadcast=1 payload="object" workers=1: 64,451.29132425621 worker/echo.js n=100000 sendsPerBroadcast=10 payload="object" workers=1: 22,325.635443739284 Refs: https://github.com/ayojs/ayo/pull/115 Reviewed-By:Anna Henningsen <anna@addaleax.net> PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
John-David Dalton <john.david.dalton@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Anna Henningsen authored
Provide `stdin`, `stdout` and `stderr` options for the `Worker` constructor, and make these available to the worker thread under their usual names. The default for `stdin` is an empty stream, the default for `stdout` and `stderr` is redirecting to the parent thread’s corresponding stdio streams. PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
John-David Dalton <john.david.dalton@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Timothy Gu authored
Only allow `.js` and `.mjs` extensions to provide future-proofing for file type detection. Refs: https://github.com/ayojs/ayo/pull/117 Reviewed-By:
Stephen Belanger <admin@stephenbelanger.com> Reviewed-By:
Olivia Hugger <olivia@fastmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
John-David Dalton <john.david.dalton@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-
Timothy Gu authored
Refs: https://github.com/ayojs/ayo/pull/113 Reviewed-By:
Anna Henningsen <anna@addaleax.net> PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Shingo Inoue <leko.noor@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
John-David Dalton <john.david.dalton@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host>
-