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

14364 Commits

Author SHA1 Message Date
Anna Henningsen
cd4dbf3348
doc: add added: information for timers
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/7493
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-05 21:49:21 +02:00
cjihrig
a2ee21db84 util: add an option for configuring break length
This commit adds a breakLength option to util.inspect(). This
option allows users to control the length at which object keys
are split across multiple lines. For backwards compatibility,
this option defaults to 60.

Fixes: https://github.com/nodejs/node/issues/7305
PR-URL: https://github.com/nodejs/node/pull/7499
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-07-05 10:17:28 -04:00
Ben Noordhuis
b4d4fd939c build: export openssl symbols on windows
Export symbols from the bundled openssl for add-ons to link against.

Fixes: https://github.com/nodejs/node-v0.x-archive/issues/4051
PR-URL: https://github.com/nodejs/node/pull/6274
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-05 16:09:58 +02:00
Gireesh Punathil
d80432db76 build: enable big toc for release builds in AIX
AIX linker has a table of contents with default size 64K
The recent code inclusions in V8 brings in lot of new
symbols which necessitates to increase this default.

Please note that the debug build already has this flag

Fixes: https://github.com/nodejs/node/issues/7500
PR-URL: https://github.com/nodejs/node/pull/7508
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-05 09:53:13 -04:00
Tarun Garg
475dc439e2
doc: fix documentation of process.argv
The current documentation states that if run something like
`node app.js` then in our process.argv array first elements is `node`,
but actually it's `process.execPath` not `node`
as documentation currently suggests.

Fixes: https://github.com/nodejs/node/issues/7434
PR-URL: https://github.com/nodejs/node/pull/7449
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-04 16:49:01 +02:00
Ben Noordhuis
f47c394d75 test: listen on and connect to 127.0.0.1
Avoid transient DNS issues in test sequential/test-net-GH-5504 by using
the IP address instead of the 'localhost' host name.

Fixes: https://github.com/nodejs/node/issues/6611
PR-URL: https://github.com/nodejs/node/pull/7524
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-07-04 15:32:55 +02:00
Kat Marchán
b3ec2432a1 deps: upgrade npm to 3.10.3
Contains the following npm release:
- https://github.com/npm/npm/releases/tag/v3.10.3

PR-URL: https://github.com/nodejs/node/pull/7515
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-07-04 09:55:33 +02:00
Rich Trott
fb4c022fbe test: handle SmartOS bug in test-tls-session-cache
Sometimes, a SmartOS bug results in ECONNREFUSED when trying to connect
to the TLS server that the test starts. Retry in that situation.

Fixes: https://github.com/nodejs/node/issues/5111
Refs: https://smartos.org/bugview/OS-2767
PR-URL: https://github.com/nodejs/node/pull/7505
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-07-03 22:29:29 -07:00
João Reis
7cbbec516d build: split CI rules in Makefile
Some CI jobs compile Node and run the tests on different machines.
This change enables collaborators to have finer control over what runs
on these jobs, such as the exact suites to run. The test-ci rule was
split into js and native, to allow for addons to be compiled only on
the machines that are going to run them.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/nodejs/node/pull/7317
2016-07-02 16:57:06 +01:00
Ryan Lewis
1299c2764e doc: add guide for Node.js Timers
Refs: https://github.com/nodejs/docs/issues/76
PR-URL: https://github.com/nodejs/node/pull/6825
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-07-01 18:57:27 +02:00
Rich Trott
abce60cec0 test: remove common.PORT from http tests
PR-URL: https://github.com/nodejs/node/pull/7467
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-30 22:45:36 -07:00
Rich Trott
42de4bb819 doc: improve usage of zero/0
PR-URL: https://github.com/nodejs/node/pull/7466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-30 21:56:41 -07:00
Chuck Langford
99cfd53097 test: test execFile/fork arg validation
Fixes: https://github.com/nodejs/node/issues/2681
Refs: https://github.com/nodejs/node/pull/4508
PR-URL: https://github.com/nodejs/node/pull/7399
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-30 16:14:55 -07:00
Rich Trott
0548e5d12a child_process: add fork/execFile arg validation
Validate fork/execFile arguments.

Fixes: https://github.com/nodejs/node/issues/2681
Refs: https://github.com/nodejs/node/pull/4508
PR-URL: https://github.com/nodejs/node/pull/7399
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-30 16:14:27 -07:00
Rich Trott
0268fd0a9f child_process: preserve argument type
A previous fix for a `maxBuffer` bug resulted in a change to the
argument type for the `data` event on `child.stdin` and `child.stdout`
when using `child_process.exec()`.

This fixes the `maxBuffer` bug in a way that does not have that side
effect.

PR-URL: https://github.com/nodejs/node/pull/7391
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
Fixes: https://github.com/nodejs/node/issues/7342
Refs: https://github.com/nodejs/node/issues/1901
2016-06-30 16:04:54 -07:00
Rich Trott
8da541bf5f Revert "child_process: measure buffer length in bytes"
This reverts commit c9a5990a76.

PR-URL: https://github.com/nodejs/node/pull/7391
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
2016-06-30 16:03:53 -07:00
Lance Ball
15157c3c3d repl: Default useGlobal to false in CLI REPL.
Documentation for REPL states that the default value of `useGlobal` is
`false`. It makes no distinction between a REPL that is created
programmatically, and the one a user is dropped into on the command line
by executing `node` with no arguments. This change ensures that the CLI
REPL uses a default value of `false`.

Fixes: https://github.com/nodejs/node/issues/5659
Ref: https://github.com/nodejs/node/issues/6802
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: https://github.com/nodejs/node/pull/5703
2016-06-30 12:45:45 -04:00
Michaël Zasso
dc17432208
deps: fix V8 5.1 tests
Restore whitespaces in *.golden files. They were lost when I landed the
V8 5.1 update and are needed for the tests to pass.

Fixes: https://github.com/nodejs/node/issues/7477
PR-URL: https://github.com/nodejs/node/pull/7488
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-30 17:28:57 +02:00
Jeremiah Senkpiel
5e5ec2cd1e os: deprecate tmpDir() in favour of tmpdir()
`tmpdir()` was introduced as replacement 3 years ago in
3fe6aba558

PR-URL: https://github.com/nodejs/node/pull/6739
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-30 14:52:13 +02:00
Ben Noordhuis
c5c28c3d50 debugger: make listen address configurable
`--debug=1.2.3.4:5678` and `--debug=example.com:5678` are now accepted,
likewise the `--debug-brk` and `--debug-port` switch.  The latter is
now something of a misnomer but it's undocumented and for internal use
only so it shouldn't matter too much.

`--inspect=1.2.3.4:5678` and `--inspect=example.com:5678` are also
accepted but don't use the host name yet; they still bind to the
default address.

Fixes: https://github.com/nodejs/node/issues/3306
PR-URL: https://github.com/nodejs/node/pull/3316
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-30 13:41:51 +02:00
Ben Noordhuis
7dcc4af827 build: drop unconditional openssl dep from cctest
Don't link in openssl when building `./configure --without-inspector`,
it's only used by the inspector cctests.  Ditto libuv and http_parser.

Fixes unnecessarily building openssl when `--shared-openssl` is also
passed to configure.

Fixes: https://github.com/nodejs/node/issues/7478
PR-URL: https://github.com/nodejs/node/pull/7486
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-30 13:30:46 +02:00
Anna Henningsen
3cac616791
vm: don't print out arrow message for custom error
In `AppendExceptionLine()`, which is used both by the `vm`
module and the uncaught exception handler, don’t print anything
to stderr when called from the `vm` module, even if the
thrown object is not a native error instance.

Fixes: https://github.com/nodejs/node/issues/7397
PR-URL: https://github.com/nodejs/node/pull/7398
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-30 13:02:19 +02:00
Daniel Bevenius
02afb057b5
doc: fixing minor typo in AtExit hooks section
PR-URL: https://github.com/nodejs/node/pull/7485
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-06-30 07:34:56 +02:00
James M Snell
7de59ef925 net: use icu's punycode implementation
ICU has a punycode implementation built in. Use it instead of the
javascript implementation because it's much faster.

PR-URL: https://github.com/nodejs/node/pull/7355
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-06-29 17:10:53 -07:00
James M Snell
3d6a01ed3e deps: update icu-small to include punycode datafiles
PR-URL: https://github.com/nodejs/node/pull/7355
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-06-29 17:10:47 -07:00
Eugene Ostroukhov
08aff14cc8 inspector: Do cleanups before notifying callback
Inspector socket implementation was notifying handshake callback before
performing the cleanups, which meant that callback could not reclaim
resources allocated by the client. New implementation will free all
resource not allocated by the client before calling the callback,
allowing the client to complete the cleanup.

Fixes: https://github.com/nodejs/node/pull/7418
PR-URL: https://github.com/nodejs/node/pull/7450
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-06-29 16:02:31 -07:00
Myles Borins
cae428a05a tools: explicit path for V8 test tap output
Currently we do not specific an absolute path for the tap output of the
V8 test suite. This is proving to be unreliable across release lines.

By prepending `$(PWD)` to each path we can guarantee it will always be
in the root folder.

PR-URL: https://github.com/nodejs/node/pull/7460
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-06-29 14:32:52 -07:00
Ben Noordhuis
dac16d8fb6 test: check types for http request and response
Add a basic regression test that checks if the map for IncomingMessage
and OutgoingMessage objects is stable over time.

The test is not exhaustive in that it doesn't try to establish whether
the transition path is the same on every request, it just checks that
objects in their final states have the same map.

To be investigated why the first (and only the first) ServerRequest
object ends up with a deprecated map, regardless of the number of
iterations.

PR-URL: https://github.com/nodejs/node/pull/7003
Refs: https://github.com/nodejs/node/issues/6294
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-29 18:13:35 +02:00
Ben Noordhuis
92dab4a2b2 src: print backtrace on failed CHECK/ASSERT
Print a C backtrace on fatal errors to make it easier to debug issues.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:50:36 +02:00
Ben Noordhuis
be767cf885 src: move ABORT() logic into node::Abort()
Don't inline calls to node::DumpBacktrace() and fflush(), it makes the
generated code bigger.  A secondary benefit of moving it to a function
is that it gives you something to put a breakpoint on.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:50:35 +02:00
cjihrig
64edd064b8 test: add abort test for backtrace validation
This commit adds a test that validates backtraces which are
printed on fatal errors.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-06-29 13:50:22 +02:00
Ben Noordhuis
e574f5b700 src: print backtrace on abort/unreachable code
Print a C backtrace on fatal errors to make it easier to debug issues.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:49:39 +02:00
Ben Noordhuis
787eddf794 src: print backtrace on fatal error
Print a C backtrace on fatal errors to make it easier to debug issues
like https://github.com/nodejs/node/issues/6727.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:49:37 +02:00
Ben Noordhuis
3c85f4e237 test: don't use internal headers in add-on tests
There is no real need and it causes endless grief on Windows with some
of the upcoming changes.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:49:35 +02:00
Ben Noordhuis
0672fca921 test: fix abort/test-abort-uncaught-exception
The --abort-on-uncaught-exception can terminate the process with either
a SIGABRT or a SIGILL signal but the test only expected SIGABRT.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:49:31 +02:00
Ben Noordhuis
5251fe52c3 test: add testcfg.py to test/abort/
`python tools/test.py abort` won't work without one.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:48:33 +02:00
Ben Noordhuis
ed3d8b13ee src: fix bad logic in uid/gid checks
Pointed out by Coverity.  Introduced in commits 3546383c ("process_wrap:
avoid leaking memory when throwing due to invalid arguments") and
fa4eb47c ("bindings: add spawn_sync bindings").

The return statements inside the if blocks were dead code because their
guard conditions always evaluated to false.  Remove them.

PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:21:13 +02:00
Ben Noordhuis
c50e192204 src: fix memory leak in WriteBuffers() error path
Pointed out by Coverity.  Introduced in commit 05d30d53 from July 2015
("fs: implemented WriteStream#writev").

WriteBuffers() leaked memory in the synchronous uv_fs_write() error path
when trying to write > 1024 buffers.

PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:21:11 +02:00
Ben Noordhuis
da4c1c314d src: fix use-after-return in zlib bindings
Pointed out by Coverity.  Introduced in commit 5b8e1dab from September
2011 ("Initial pass at zlib bindings".)

The asynchronous version of Write() used a pointer to a stack-allocated
buffer on flush.  A mitigating factor is that zlib does not dereference
the pointer for zero-sized writes but it's still technically UB.

PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:21:09 +02:00
Ben Noordhuis
26a918f4f5 src: remove deprecated HMAC_Init, use HMAC_Init_ex
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:21:07 +02:00
Ben Noordhuis
d404566687 src: remove duplicate HMAC_Init calls
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:21:05 +02:00
Ben Noordhuis
0e8206933e src: remove unused md_ data members
The code assigned the result of EVP_get_digestbyname() to data members
called md_ that were not used outside the initialization functions.

PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:21:03 +02:00
Ben Noordhuis
664ba510fd src: remove unused data member write_queue_size_
Remove TLSWrap::write_queue_size_, it's not used anywhere.

PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:21:01 +02:00
Ben Noordhuis
57387fa29f src: guard against starting fs watcher twice
This commit adds a CHECK that verifies that the file event watcher is
not started twice, which would be indicative of a bug in lib/fs.js.

PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:20:59 +02:00
Ben Noordhuis
88a8748212 src: initialize encoding_ data member
Pointed out by Coverity.  Not really a bug because it's assigned before
use but explicit assignment in the constructor is more obviously
correct.

PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:20:57 +02:00
Ben Noordhuis
5e60ded244 src: check uv_async_init() return value
Pointed out by Coverity.

PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-29 12:19:48 +02:00
Andras
fba271b379 benchmark: add setImmediate() benchmarks
Timings for sequential and concurren setImmediate() with and without
arguments, and set + clearImmediate().

PR-URL: https://github.com/nodejs/node/pull/6436
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-06-29 11:02:26 +02:00
Andras
6f75b6672c timers: optimize setImmediate()
Save the setImmediate() callback arguments into an array instead of a
closure, and invoke the callback on the arguments from an optimizable
function.

  60% faster setImmediate with 0 args (15% if self-recursive)
  4x faster setImmediate with 1-3 args, 2x with > 3
  seems to be faster with less memory pressure when memory is tight

Changes:
- use L.create() to build faster lists
- use runCallback() from within tryOnImmediate()
- save the arguments and do not build closures for the callbacks

PR-URL: https://github.com/nodejs/node/pull/6436
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-06-29 11:02:25 +02:00
Andras
6b0f86a8d5 timers: optimize linkedlist
Now uses a new L.create() factory to create access-optimized linkedlist
objects.

PR-URL: https://github.com/nodejs/node/pull/6436
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-06-29 11:02:25 +02:00
Ben Noordhuis
f8d3f6fbf4 src: remove obsolete NOLINT comments
Obsoleted by the recent cpplint upgrade.

PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-28 21:21:21 +02:00