doc: buffer: clarify typed array construction

It's possible to construct a typed array from a buffer but the buffer
is treated as an array, not a byte array as one might expect.

Fixes #7786.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
buffer: improve {read,write}{U}Int* methods

Increase the performance and simplify the logic of Buffer#write{U}Int*
and Buffer#read{U}Int* methods by placing the byte manipulation code
directly inline.

Also improve the speed of buffer-write benchmarks by creating a new
call directly to each method by using Function() instead of calling by
buff[fn].

Signed-off-by: Trevor Norris <trev.norris@gmail.com>

Conflicts:
	lib/buffer.js
child_process: use full path for cmd.exe on Win32

Currently child_process.exec() assumes that cmd.exe is on the PATH,
and fails with a spawn ENOENT error if it is not.

The Windows 'comspec' environment variable contains the full filepath
to the default command interpreter, eg "C:\Windows\System32\cmd.exe".
Should it not be set, we fall-back to using 'cmd.exe' from PATH, as
before.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
child_process: don't throw on EAGAIN

Signed-off-by: Fedor Indutny <fedor@indutny.com>
tls: using %StringSplit to split `cert.subjectaltname`

Signed-off-by: Fedor Indutny <fedor@indutny.com>
doc: process: Document process.mainModule

Instrumentation code might need to find out the entry point of the
process in a global context.
Documenting the existing process.mainModule to officially support this.

Fixes #7808

Signed-off-by: Fedor Indutny <fedor@indutny.com>
doc: typos in child_process

Signed-off-by: Fedor Indutny <fedor@indutny.com>
module: document important methods

Signed-off-by: Fedor Indutny <fedor@indutny.com>
dns: send lookup c-ares errors to callback

Calling dns.lookup with arguments that generate an error from c-ares
previously sent those errors back to the callback. This commit restores
the ca9eb71 behavior.

Fixes #7731.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Fedor Indutny <fedor@indutny.com>
test: fix tls-client-default-ciphers

The test execution should not depend on the servers running locally.

fix #7832
doc: document `tls.createSecureContext`
crypto: add `honorCipherOrder` argument

Add `honorCipherOrder` argument to `crypto.createCredentials`.

fix #7249
deps: build v8 with disassembler support

Signed-off-by: Fedor Indutny <fedor@indutny.com>
dns: introduce lookupService function

Uses getnameinfo to resolve an address an port into a hostname and
service.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
deps: update libuv to v0.11.26
buffer: construct new buffer from buffer toJSON() output

Creating a new buffer from the toJSON() output of another
buffer does not currently work. This commit adds that
support. Closes #7849.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
util.h: interface compatibility

Signed-off-by: Fedor Indutny <fedor@indutny.com>
node: fix #7841 by overlooking the spare sourceline

Signed-off-by: Fedor Indutny <fedor@indutny.com>
http: remove unused code block

fix #7769

Signed-off-by: Fedor Indutny <fedor@indutny.com>
zlib: do not crash on write after close

fix #7767

Signed-off-by: Fedor Indutny <fedor@indutny.com>