platform/upstream/nodejs.git
11 years agonet: Use readable.push() instead of private methods
isaacs [Tue, 8 Jan 2013 02:07:37 +0000 (18:07 -0800)]
net: Use readable.push() instead of private methods

11 years agostream: Use push() for Transform._output()
isaacs [Thu, 10 Jan 2013 21:49:19 +0000 (13:49 -0800)]
stream: Use push() for Transform._output()

This also slightly changes the semantics, in that a 'readable'
event may be triggered by the first write() call, even if a
user has not yet called read().

This happens because the Transform _write() handler is calling
read(0) to start the flow of data.  Technically, the new behavior
is more 'correct', since it is more in line with the semantics
of the 'readable' event in other streams.

11 years agostream: Use push() for readable.wrap()
isaacs [Tue, 8 Jan 2013 03:40:08 +0000 (19:40 -0800)]
stream: Use push() for readable.wrap()

11 years agostream: Add readable.push(chunk) method
isaacs [Tue, 8 Jan 2013 02:07:17 +0000 (18:07 -0800)]
stream: Add readable.push(chunk) method

11 years agotest: run tests in alphabetical order
Ben Noordhuis [Thu, 10 Jan 2013 00:58:30 +0000 (01:58 +0100)]
test: run tests in alphabetical order

11 years agotyped arrays: implement load and store swizzling
Dean McNamee [Sun, 6 Jan 2013 17:59:12 +0000 (18:59 +0100)]
typed arrays: implement load and store swizzling

Implement load and store swizzling operations. This reduces an unneeded
back and forth between types and additionally keeps the value in the
swappable type until it is swapped. This is important for correctness
when dealing with floating point, to avoid the possibility of loading
the bits of a signaling NaN (because it isn't yet swapped) into the FPU.

This additionally produces better code (comments are mine):

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

setValue<double>:
  movd  %xmm0, %rax         ; fp reg -> gen reg
  bswapq  %rax              ; 64-bit byte swap
  movq  %rax, (%r15,%r12)   ; store

11 years agotyped arrays: swizzle with compiler intrinsics
Dean McNamee [Sat, 5 Jan 2013 21:06:35 +0000 (22:06 +0100)]
typed arrays: swizzle with compiler intrinsics

Implement swizzling with compiler intrinsics and be aware of the native
endianness to correctly swap on big endian machines.

This introduces a template function to swap the bytes of a value,
and macros for the low level swap (taking advantage of gcc and msvc
intrinsics). This produces code like the following (comments are mine):

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

setValue<double>:
  movd  %xmm0, %rax         ; fp reg -> gen reg
  bswapq  %rax              ; 64-bit byte swap
  movd  %rax, %xmm0         ; gen reg -> fp reg
  movq  %xmm0, (%r15,%r12)  ; store

11 years agotyped arrays: undo local changes
Ben Noordhuis [Tue, 8 Jan 2013 16:08:58 +0000 (17:08 +0100)]
typed arrays: undo local changes

Partially revert 5664dd2, 6573fc3 and 7788a6b to ease landing changes
from upstream.

11 years agostream: fix typo
Shigeki Ohtsu [Wed, 9 Jan 2013 02:17:06 +0000 (11:17 +0900)]
stream: fix typo

Also: Revert "stream: Override addListener as well as on"

This reverts commit 18c985919d93df97561157ab8e7de70f4e22dd44.

11 years agostream: Override addListener as well as on
isaacs [Tue, 8 Jan 2013 22:27:01 +0000 (14:27 -0800)]
stream: Override addListener as well as on

For the compatibility switch.

11 years agostreams: set listener first, emit 'data' later
Fedor Indutny [Tue, 8 Jan 2013 17:56:55 +0000 (21:56 +0400)]
streams: set listener first, emit 'data' later

When switching into compatibility mode by setting `data` event listener,
`_read()` method will be called immediately. If method implementation
invokes callback in the same tick - all emitted `data` events will be
discarded, because `data` listener wasn't set yet.

11 years agodoc: os.cpus() returns times in milliseconds
Tim Bradshaw [Mon, 31 Dec 2012 18:44:51 +0000 (18:44 +0000)]
doc: os.cpus() returns times in milliseconds

11 years agotyped arrays: don't declare as module
Dean McNamee [Sun, 23 Dec 2012 22:43:51 +0000 (23:43 +0100)]
typed arrays: don't declare as module

TypedArrays is not a module, it is attached to the global object.
Don't register it with Node's module system.

11 years agotyped arrays: replace switch with templates
Dean McNamee [Tue, 18 Dec 2012 19:03:41 +0000 (20:03 +0100)]
typed arrays: replace switch with templates

Convert TypedArray's TypeName implementation to template specialization
instead of a switch() statement.

11 years agonet: fix bufferSize include writableStream length
Shigeki Ohtsu [Mon, 7 Jan 2013 01:37:35 +0000 (10:37 +0900)]
net: fix bufferSize include writableStream length

socket.bufferSize missed to include the length of internal buffers in
writableStream.

11 years agobuild: fail w/err msg when missing binutils
Mike Harsch [Mon, 7 Jan 2013 05:29:38 +0000 (22:29 -0700)]
build: fail w/err msg when missing binutils

Building --with-dtrace requires objdump from GNU binutils.
This change inserts a helpful error message if there is a
problem executing objdump.

11 years agodtrace: More style
isaacs [Mon, 7 Jan 2013 20:31:44 +0000 (12:31 -0800)]
dtrace: More style

Continuation lines should be indented with 4 spaces, not a tab.

11 years agodtrace: Make D style more D-ish
isaacs [Mon, 7 Jan 2013 20:20:21 +0000 (12:20 -0800)]
dtrace: Make D style more D-ish

11 years agodtrace: x64 ustack helper
Fedor Indutny [Thu, 27 Dec 2012 03:16:23 +0000 (07:16 +0400)]
dtrace: x64 ustack helper

11 years agodtrace: fix style in ustack helper
Fedor Indutny [Mon, 7 Jan 2013 18:53:50 +0000 (22:53 +0400)]
dtrace: fix style in ustack helper

11 years agodtrace: SeqAsciiString was renamed to SeqOneByteString in v8
isaacs [Mon, 7 Jan 2013 18:30:15 +0000 (10:30 -0800)]
dtrace: SeqAsciiString was renamed to SeqOneByteString in v8

11 years agosrc: pass node_isolate to Undefined()
Ben Noordhuis [Sun, 6 Jan 2013 23:15:59 +0000 (00:15 +0100)]
src: pass node_isolate to Undefined()

11 years agosrc: pass node_isolate to Null()
Ben Noordhuis [Sun, 6 Jan 2013 22:55:56 +0000 (23:55 +0100)]
src: pass node_isolate to Null()

11 years agosrc: pass node_isolate to True() and False()
Ben Noordhuis [Sun, 6 Jan 2013 23:09:31 +0000 (00:09 +0100)]
src: pass node_isolate to True() and False()

11 years agosrc: pass node_isolate to Local<>::New
Ben Noordhuis [Sun, 6 Jan 2013 22:52:35 +0000 (23:52 +0100)]
src: pass node_isolate to Local<>::New

11 years agosrc: pass node_isolate to Integer::New
Ben Noordhuis [Sun, 6 Jan 2013 22:33:09 +0000 (23:33 +0100)]
src: pass node_isolate to Integer::New

11 years agosrc: pass node_isolate to String::Empty
Ben Noordhuis [Sun, 6 Jan 2013 22:09:39 +0000 (23:09 +0100)]
src: pass node_isolate to String::Empty

11 years agosrc: make node_isolate global
Ben Noordhuis [Sun, 6 Jan 2013 22:06:48 +0000 (23:06 +0100)]
src: make node_isolate global

V8 3.15 has new API functions that let you specify the Isolate. V8 and
node.js generally spend 0.5-3.5% of the time in pthread_getspecific(),
looking up the current Isolate. Avoid that overhead by making "our"
isolate global so we can pass it around. The change to the new API is
introduced in follow-up commits.

11 years agochild_process: Pull through untouched stdio streams
isaacs [Mon, 7 Jan 2013 14:29:00 +0000 (06:29 -0800)]
child_process: Pull through untouched stdio streams

Otherwise child procs will never emit a 'close' event if you don't
ever consume their streams, because they will never hit the EOF.

11 years agostream: Clean up more effectively in pipe()
isaacs [Mon, 7 Jan 2013 14:10:35 +0000 (06:10 -0800)]
stream: Clean up more effectively in pipe()

11 years agochild_process: don't `resume()` created socket
Maciej Małecki [Fri, 4 Jan 2013 04:53:55 +0000 (05:53 +0100)]
child_process: don't `resume()` created socket

Calling `resume()` on a stream switches it to the old mode which causes
piping stdio from a child process to fail.

Fixes joyent/node#4510.

11 years agonode: move symbol caching to Load()
Dean McNamee [Fri, 21 Dec 2012 15:12:45 +0000 (16:12 +0100)]
node: move symbol caching to Load()

11 years agotest: fix simple/test-http-client-timeout-with-data
Ben Noordhuis [Mon, 7 Jan 2013 15:00:10 +0000 (16:00 +0100)]
test: fix simple/test-http-client-timeout-with-data

The test was failing in debug mode because the timeouts were set too
low. Fix that by increasing the timeouts. Admittedly not a great fix.
If this test keeps playing up, it's probably best to remove it.

Fixes #4528.

11 years agotest: put tty in blocking mode after test
Ben Noordhuis [Mon, 7 Jan 2013 02:59:08 +0000 (03:59 +0100)]
test: put tty in blocking mode after test

Tests can leave the tty in non-blocking mode. If the test runner tries
to print to stdout/stderr after that and the tty buffer is full, it'll
die with a EAGAIN OSError. Ergo, put the tty back in blocking mode
before proceeding.

11 years agotest: disable simple/test-debug-brk-file
Ben Noordhuis [Mon, 7 Jan 2013 02:36:47 +0000 (03:36 +0100)]
test: disable simple/test-debug-brk-file

This test is timing sensitive and hence quite unreliable with debug
builds. What's worse is that it leaves a stray child process behind
that listens on the default test port and that makes all the tests
that come after it fail with EADDRINUSE errors.

11 years agochild_process: make fork() execPath configurable
Bradley Meck [Fri, 4 Jan 2013 19:58:35 +0000 (13:58 -0600)]
child_process: make fork() execPath configurable

Allows for arbitrary path to executable spawned using `fork`. This
fixes some issues around running multiple versions of node with workers
and allows arbitrary IPC with compatible executables.

Fixes #3248.

11 years agonet: add localAddress and localPort to Socket
James Hight [Tue, 1 Jan 2013 02:01:42 +0000 (21:01 -0500)]
net: add localAddress and localPort to Socket

11 years agosrc: use static_cast where appropriate
Ben Noordhuis [Fri, 4 Jan 2013 23:11:37 +0000 (00:11 +0100)]
src: use static_cast where appropriate

Use static_cast instead of reinterpret_cast when casting from void*
to another type.

This is mostly an aesthetic change but may help catch bugs when the
affected code is modified.

11 years agofs: remove unused default option in WriteStream
Shigeki Ohtsu [Fri, 4 Jan 2013 16:46:59 +0000 (01:46 +0900)]
fs: remove unused default option in WriteStream

No bufferSize option is used in stream.Writable and fs.WriteStream.

11 years agofs: pool size coincide with ReadStream bufferSize
Shigeki Ohtsu [Fri, 4 Jan 2013 16:05:27 +0000 (01:05 +0900)]
fs: pool size coincide with ReadStream bufferSize

pool size of file reading in ReadableStream can be adjustable
with a bufferSize option.

11 years agov8: remove optimization switches
Ben Noordhuis [Thu, 3 Jan 2013 01:33:40 +0000 (02:33 +0100)]
v8: remove optimization switches

Remove compiler switches from $(TOPLEVEL)/deps/v8/build/common.gypi,
we set them globally in $(TOPLEVEL)/common.gypi.

Commit 7b4d95a introduced the switches again, resulting in V8 getting
built without any optimizations.

This commit is essentially a rehash of commit 4b8629d.

11 years agoobject_wrap: add missing HandleScope
Fedor Indutny [Fri, 4 Jan 2013 12:37:38 +0000 (16:37 +0400)]
object_wrap: add missing HandleScope

by Sven Panne's suggestion, see [0] for details.

[0]: https://code.google.com/p/v8/issues/detail?id=2468

11 years agov8: update to 3.15.11.5
Fedor Indutny [Fri, 4 Jan 2013 11:44:47 +0000 (15:44 +0400)]
v8: update to 3.15.11.5

11 years agoREPL: fix floating point number parsing
Nirk Niggler [Thu, 3 Jan 2013 14:27:55 +0000 (09:27 -0500)]
REPL: fix floating point number parsing

In JS, the expression ".1" is a floating point number.  Issue 4268 concerns the
REPL interpreting floating point numbers that lead with a "." as keywords.  The
original bugfix worked for this specific case but not for the general case:

    var x = [
        .1,
        .2,
        .3
    ];

The attached change and test (`.1+.1` should be `.2`) fix the bug.

Closes #4513.

11 years agowindows: improve Visual Studio Express build support
Scott Blomquist [Thu, 3 Jan 2013 22:36:04 +0000 (23:36 +0100)]
windows: improve Visual Studio Express build support

* Moved generated files to a clearer directory.
* Improved detection logic for ctrpp.exe tool.

Closes #4482

11 years agowindows: fix perfctr crash on XP and 2003
Scott Blomquist [Thu, 3 Jan 2013 02:06:41 +0000 (18:06 -0800)]
windows: fix perfctr crash on XP and 2003

Some performance counter related functions are not available on Windows
XP and Windows Server 2003, which caused node to call a NULL pointer.

Closes #4462
Closes #4511

11 years agoMerge remote-tracking branch 'origin/v0.8'
Ben Noordhuis [Thu, 3 Jan 2013 19:02:31 +0000 (20:02 +0100)]
Merge remote-tracking branch 'origin/v0.8'

Conflicts:
configure
deps/uv/src/unix/core.c
deps/uv/test/test-fs-event.c
src/node_version.h

11 years agorepl: allow overriding builtins
Ben Noordhuis [Thu, 3 Jan 2013 17:21:52 +0000 (18:21 +0100)]
repl: allow overriding builtins

Don't give names of built-in libraries special treatment.
Changes the REPL's behavior from this:

  > var path = 42
  > path
  A different "path" already exists globally

To this:

  > var path = 42
  > path
  42

Fixes #4512.

11 years agonode: remove ev-emul.h
Ben Noordhuis [Thu, 3 Jan 2013 16:58:58 +0000 (17:58 +0100)]
node: remove ev-emul.h

libev has been deprecated since v0.6. Add-on authors have had two major
release cycles to upgrade. Out it goes.

11 years agov8: remove optimization switches
Ben Noordhuis [Thu, 3 Jan 2013 01:33:40 +0000 (02:33 +0100)]
v8: remove optimization switches

Remove compiler switches from $(TOPLEVEL)/deps/v8/build/common.gypi,
we set them globally in $(TOPLEVEL)/common.gypi.

Commit 7b4d95a introduced the switches again, resulting in V8 getting
built without any optimizations.

This commit is essentially a rehash of commit 4b8629d.

11 years agotest: make tests work with newer v8
Fedor Indutny [Tue, 1 Jan 2013 12:06:28 +0000 (16:06 +0400)]
test: make tests work with newer v8

11 years agobindings: update to new v8 apis
Fedor Indutny [Tue, 1 Jan 2013 12:05:53 +0000 (16:05 +0400)]
bindings: update to new v8 apis

GetPointerFromInternalField() is deprecated now, we should use
GetAlignedPointerFromInternalField().

11 years agodeps: update v8 to 3.15.11
Fedor Indutny [Tue, 1 Jan 2013 08:28:07 +0000 (12:28 +0400)]
deps: update v8 to 3.15.11

11 years agoos: change CPU time from Integer to Number
Tim Bradshaw [Thu, 20 Dec 2012 22:29:45 +0000 (22:29 +0000)]
os: change CPU time from Integer to Number

CPU time values must be Numbers, not Integers, as they can be too large
for Integers on 32 bit platforms.

11 years agodgram: fix double implicit bind error
Ben Noordhuis [Mon, 31 Dec 2012 16:42:54 +0000 (17:42 +0100)]
dgram: fix double implicit bind error

Calling send() on an unbound socket forces an implicit bind to
a random port.

332fea5 made the 'listening' event asynchronous. Unfortunately,
it also introduced a bug where the implicit bind was tried more
than once if send() was called again before the first bind operation
completed.

Address that by keeping track of the bind status and making sure that
bind() is called only once.

Fixes #4499.

11 years agodoc: add CONTRIBUTING.md
Ben Noordhuis [Sun, 30 Dec 2012 23:36:47 +0000 (00:36 +0100)]
doc: add CONTRIBUTING.md

11 years agoblog: Post for v0.9.5
isaacs [Sun, 30 Dec 2012 01:26:32 +0000 (17:26 -0800)]
blog: Post for v0.9.5

11 years agoNow working on 0.9.6
isaacs [Sun, 30 Dec 2012 01:25:40 +0000 (17:25 -0800)]
Now working on 0.9.6

11 years agoMerge branch 'v0.9.5-release'
isaacs [Sun, 30 Dec 2012 01:25:25 +0000 (17:25 -0800)]
Merge branch 'v0.9.5-release'

11 years ago2012.12.30, Version 0.9.5 (Unstable) v0.9.5
isaacs [Sun, 30 Dec 2012 00:31:43 +0000 (16:31 -0800)]
2012.12.30, Version 0.9.5 (Unstable)

* assert: improve support for new execution contexts (lukebayes)

* domain: use camelCase instead of snake_case (isaacs)

* domain: Do not use uncaughtException handler (isaacs)

* fs: make 'end' work with ReadStream without 'start' (Ben Noordhuis)

* https: optimize createConnection() (Ryunosuke SATO)

* buffer: speed up base64 encoding by 20% (Ben Noordhuis)

* doc: Colorize API stabilitity index headers in docs (Luke Arduini)

* net: socket.readyState corrections (bentaber)

* http: Performance enhancements for http under streams2 (isaacs)

* stream: fix to emit end event on http.ClientResponse (Shigeki Ohtsu)

* stream: fix event handler leak in readstream pipe and unpipe (Andreas Madsen)

* build: Support ./configure --tag switch (Maciej Małecki)

* repl: don't touch `require.cache` (Nathan Rajlich)

* node: Emit 'exit' event when exiting for an uncaught exception (isaacs)

11 years agonode: emit 'exit' when exiting with error
isaacs [Sun, 30 Dec 2012 00:49:18 +0000 (16:49 -0800)]
node: emit 'exit' when exiting with error

Fix #3555

11 years agobenchmark: Make flamegraphs a bit more useful
isaacs [Thu, 27 Dec 2012 23:02:57 +0000 (15:02 -0800)]
benchmark: Make flamegraphs a bit more useful

11 years agobenchmark: Set port range properly on Linux
isaacs [Fri, 28 Dec 2012 05:12:43 +0000 (21:12 -0800)]
benchmark: Set port range properly on Linux

11 years agonet: Don't go through Stream API when ondata is used
isaacs [Thu, 27 Dec 2012 21:03:59 +0000 (13:03 -0800)]
net: Don't go through Stream API when ondata is used

This speeds up http_simple by around 6%.

11 years agohttp: Separate out the storeHeader closure
isaacs [Thu, 27 Dec 2012 19:41:29 +0000 (11:41 -0800)]
http: Separate out the storeHeader closure

11 years agotimers: Move list.ontimeout to separate function
isaacs [Thu, 27 Dec 2012 19:40:42 +0000 (11:40 -0800)]
timers: Move list.ontimeout to separate function

11 years agonet: Move createWriteReq to separate function
isaacs [Thu, 27 Dec 2012 19:39:57 +0000 (11:39 -0800)]
net: Move createWriteReq to separate function

11 years agohttp: Replace "in" usage with "=== undefined"
isaacs [Thu, 27 Dec 2012 17:13:58 +0000 (09:13 -0800)]
http: Replace "in" usage with "=== undefined"

Speeds up http benchmarks.

11 years agoassert: improve support for new execution contexts
lukebayes [Sun, 20 Feb 2011 23:09:23 +0000 (15:09 -0800)]
assert: improve support for new execution contexts

More detailed information in GH-693

11 years agotest-message: Add setTimeout and nextTick message tests
isaacs [Thu, 27 Dec 2012 02:13:59 +0000 (18:13 -0800)]
test-message: Add setTimeout and nextTick message tests

11 years agodomain: use camelCase instead of snake_case
isaacs [Wed, 26 Dec 2012 20:31:27 +0000 (12:31 -0800)]
domain: use camelCase instead of snake_case

While it's true that error objects have a history of getting snake_case
properties attached by the host system, it's a point of confusion to
Node users that comes up a lot.  It's still 'experimental', so best to
change this sooner rather than later.

11 years agodomain: Do not use uncaughtException handler
isaacs [Wed, 26 Dec 2012 20:28:33 +0000 (12:28 -0800)]
domain: Do not use uncaughtException handler

This adds a process._fatalException method which is called into from
C++ in order to either emit the 'uncaughtException' method, or emit
'error' on the active domain.

The 'uncaughtException' event is an implementation detail that it would
be nice to deprecate one day, so exposing it as part of the domain
machinery is not ideal.

Fix #4375

11 years agodeps: upgrade libuv to 4997738
Ben Noordhuis [Sat, 29 Dec 2012 16:34:41 +0000 (17:34 +0100)]
deps: upgrade libuv to 4997738

11 years agofs: make 'end' work with ReadStream without 'start'
Ben Noordhuis [Fri, 28 Dec 2012 17:31:47 +0000 (18:31 +0100)]
fs: make 'end' work with ReadStream without 'start'

Make `fs.createReadStream({ end: 42 })` work.

Before this commit, it worked only when used like this:
`fs.createReadStream({ start: 0, end: 42 })` - only when `start` was specified
by the caller.

Fixes #4423.

11 years agofs: remove fs.sendfile()
Ben Noordhuis [Fri, 28 Dec 2012 17:23:08 +0000 (18:23 +0100)]
fs: remove fs.sendfile()

Said function has been broken (and useless) since v0.6.0. Remove it altogether.

Fixes #3854.

11 years agohttps: optimize https.createConnection()
Ryunosuke SATO [Fri, 28 Dec 2012 03:40:06 +0000 (12:40 +0900)]
https: optimize https.createConnection()

Stop using `arguments` for performance and readability.

11 years agobuffer: speed up base64 encoding by 20%
Ben Noordhuis [Mon, 24 Dec 2012 00:29:40 +0000 (01:29 +0100)]
buffer: speed up base64 encoding by 20%

Remove a lot of branches from the inner loop. Speeds up buf.toString('base64')
by about 20%.

Before:

  $ time out/Release/node benchmark/buffer-base64-encode.js
  real    0m6.607s
  user    0m5.508s
  sys     0m1.088s

After:

  $ time out/Release/node benchmark/buffer-base64-encode.js
  real    0m5.520s
  user    0m4.520s
  sys     0m0.992s

11 years agoColorize API stabilitity index headers in docs
Luke Arduini [Fri, 28 Dec 2012 01:32:53 +0000 (20:32 -0500)]
Colorize API stabilitity index headers in docs

Noted in @shtylman's #3898, API stability notes are easy to overlook
in the html documentation. This can be especially troublesome if the API
is deprecated. This commit gives visual feedback by adding in a class
to the html docs when they're generated. The API headers with
corresponding colors are also listed in the 'About this Documentation'
page for easy reference.

11 years agonet: socket.readyState corrections
bentaber [Thu, 27 Dec 2012 14:57:19 +0000 (07:57 -0700)]
net: socket.readyState corrections

socket.readyState, .readable, and .writable behavior changed as
a result of the new streaming interfaces. Updated to be backwards
compatible with current API and adds regression test.

closes #4461

11 years agostream: speed up instantiation of readable stream
Ryunosuke SATO [Thu, 27 Dec 2012 16:30:50 +0000 (01:30 +0900)]
stream: speed up instantiation of readable stream

- Stream.apply -> Stream.call

11 years agodomain: speed up domain.create
Ryunosuke SATO [Thu, 27 Dec 2012 15:51:31 +0000 (00:51 +0900)]
domain: speed up domain.create

Use `EventEmitter.call` instead of `EventEmitter.apply` because of performance.

11 years agohttp: remove unused variable
Ryunosuke SATO [Thu, 27 Dec 2012 16:14:16 +0000 (01:14 +0900)]
http: remove unused variable

The module variable `END_OF_FILE` was no longer needed from 1d369317.

11 years agobuild: Add hyphen to custom build tags
isaacs [Thu, 27 Dec 2012 04:35:00 +0000 (20:35 -0800)]
build: Add hyphen to custom build tags

so that ./configure --tag=foo makes a version number like v0.9.5-foo
instead of v0.9.5foo

11 years agobuild: allow to specify custom tags
Maciej Małecki [Fri, 21 Dec 2012 01:56:47 +0000 (02:56 +0100)]
build: allow to specify custom tags

When building custom `node` versions (e.g., floating features/fixes from
different versions) it's often useful to specify a custom tag which
easily identifies build when invoking `node -v`.

Introduce a way to specify this tag in `node_version.h` file or by
running `./configure --tag="<tag>"`. Insert it right after the patch
version (and before `-pre`, if build is not a release).

11 years agohttp: Handle end only when stream is not dumped
isaacs [Wed, 26 Dec 2012 23:57:49 +0000 (15:57 -0800)]
http: Handle end only when stream is not dumped

This fixes regression introduced in some cases by 8bf0c15

11 years agolint
isaacs [Wed, 26 Dec 2012 23:26:53 +0000 (15:26 -0800)]
lint

11 years agorepl: remove 'repl' from automatic loading libs
Ryunosuke SATO [Tue, 11 Dec 2012 10:14:49 +0000 (19:14 +0900)]
repl: remove 'repl' from automatic loading libs

In repl, calling `repl` twice shows the following message:
```
> repl
A different "repl" already exists globally
```

11 years agorepl: add 'domain' to automatic loading libs
Ryunosuke SATO [Tue, 11 Dec 2012 10:04:34 +0000 (19:04 +0900)]
repl: add 'domain' to automatic loading libs

`domain` should be a member of automatic loading libs in `repl`.

Conflicts:

lib/repl.js

11 years agostream2: fix to emit end event on http.ClientResponse
Shigeki Ohtsu [Tue, 18 Dec 2012 01:59:07 +0000 (10:59 +0900)]
stream2: fix to emit end event on http.ClientResponse

11 years agodoc: document the finish event
Andreas Madsen [Sat, 22 Dec 2012 17:27:08 +0000 (18:27 +0100)]
doc: document the finish event

Since the stream implementer is not expected to overwrite
.end() the finish event is necessary in order to know when
no more data can be written

11 years agostream: do only fake drain when unpiped stream is the source
Andreas Madsen [Sat, 22 Dec 2012 17:07:08 +0000 (18:07 +0100)]
stream: do only fake drain when unpiped stream is the source

If the destination had multiply read streams piped to it,
they would all decrease the awaitDrain state and thereby
start the flow

11 years agostream: fix event handler leak in readstream pipe and unpipe
Andreas Madsen [Sat, 22 Dec 2012 15:14:42 +0000 (16:14 +0100)]
stream: fix event handler leak in readstream pipe and unpipe

After a stream was unpiped there would stil be residual event handlers

11 years agoutil: fix deprecation message in `util.pump`
Ryunosuke SATO [Sun, 23 Dec 2012 19:14:40 +0000 (04:14 +0900)]
util: fix deprecation message in `util.pump`

11 years agotest: add regression test for #4463
Ben Noordhuis [Tue, 25 Dec 2012 21:05:06 +0000 (22:05 +0100)]
test: add regression test for #4463

11 years agonet: allow socket end before connect
Ben Taber [Tue, 25 Dec 2012 01:35:52 +0000 (18:35 -0700)]
net: allow socket end before connect

Fix a bug where calling .end() on a socket without calling .connect() first
throws a TypeError:

  TypeError: Cannot read property 'shutdown' of undefined
      at Socket.onSocketFinish (net.js:194:20)
      at Socket.EventEmitter.emit (events.js:91:17)
      at Socket.Writable.end (_stream_writable.js:281:10)
      at Socket.end (net.js:352:31)

Fixes #4463.

11 years agoopenssl: clean up openssl.gyp
Ben Noordhuis [Mon, 24 Dec 2012 15:00:24 +0000 (16:00 +0100)]
openssl: clean up openssl.gyp

Remove obsolete build configuration that escaped the purge in 7eaea7f.

11 years agobuild: allow to specify custom tags
Maciej Małecki [Fri, 21 Dec 2012 01:56:47 +0000 (02:56 +0100)]
build: allow to specify custom tags

When building custom `node` versions (e.g., floating features/fixes from
different versions) it's often useful to specify a custom tag which
easily identifies build when invoking `node -v`.

Introduce a way to specify this tag in `node_version.h` file or by
running `./configure --tag="<tag>"`. Insert it right after the patch
version (and before `-pre`, if build is not a release).

Closes #4452.

11 years agoblog: Post about v0.9.4
isaacs [Fri, 21 Dec 2012 20:37:39 +0000 (12:37 -0800)]
blog: Post about v0.9.4

11 years agoNow working on 0.9.5
isaacs [Fri, 21 Dec 2012 20:36:34 +0000 (12:36 -0800)]
Now working on 0.9.5

11 years agoMerge branch 'v0.9.4-release'
isaacs [Fri, 21 Dec 2012 20:36:04 +0000 (12:36 -0800)]
Merge branch 'v0.9.4-release'