platform/upstream/nodejs.git
11 years agostreams2: Handle sync read callbacks nicely
isaacs [Thu, 24 Jan 2013 01:52:45 +0000 (17:52 -0800)]
streams2: Handle sync read callbacks nicely

11 years agostreams: Support objects other than Buffers
Raynos [Sat, 12 Jan 2013 04:59:57 +0000 (20:59 -0800)]
streams: Support objects other than Buffers

We detect for non-string and non-buffer values in onread and
turn the stream into an "objectMode" stream.

If we are in "objectMode" mode then howMuchToRead will
always return 1, state.length will always have 1 appended
to it when there is a new item and fromList always takes
the first value from the list.

This means that for object streams, the n in read(n) is
ignored and read() will always return a single value

Fixed a bug with unpipe where the pipe would break because
the flowing state was not reset to false.

Fixed a bug with sync cb(null, null) in _read which would
forget to end the readable stream

11 years agogitignore: ignore v8.log files
Ben Noordhuis [Thu, 24 Jan 2013 10:35:29 +0000 (11:35 +0100)]
gitignore: ignore v8.log files

11 years agohttp: close connection on 204 and chunked encoding
Ben Noordhuis [Wed, 23 Jan 2013 12:47:29 +0000 (13:47 +0100)]
http: close connection on 204 and chunked encoding

This is similar to commit 2cbf458 but this time for 204 No Content
instead of 304 Not Modified responses.

When the user sends a 204 response with a Transfer-Encoding: chunked
header, suppress sending the zero chunk and force the connection to
close.

11 years agobuild: Add some gyp artifacts to .gitignore
Scott Blomquist [Thu, 17 Jan 2013 06:29:48 +0000 (22:29 -0800)]
build: Add some gyp artifacts to .gitignore

11 years agobuffer: remove float write range checks
Trevor Norris [Tue, 22 Jan 2013 22:35:20 +0000 (14:35 -0800)]
buffer: remove float write range checks

Removed range checks when writing float values, and removed a few
includes and defines. Also updated api docs to reflect that invalid 32
bit float is an unspecified behavior.

11 years agohttp: close connection on 304 and chunked encoding
Ben Noordhuis [Wed, 23 Jan 2013 00:42:16 +0000 (01:42 +0100)]
http: close connection on 304 and chunked encoding

Force the connection to close when the response is a 304 Not Modified
and the user has set a "Transfer-Encoding: chunked" header.

RFC 2616 mandates that 304 responses MUST NOT have a body but node.js
used to send out a zero chunk anyway to accommodate clients that don't
have special handling for 304 responses.

It was pointed out that this might confuse reverse proxies to the point
of creating security liabilities, so suppress the zero chunk and force
the connection to close.

11 years agodeps: upgrade libuv to e4d8cba
Bert Belder [Tue, 22 Jan 2013 23:17:01 +0000 (00:17 +0100)]
deps: upgrade libuv to e4d8cba

11 years agodeps: upgrade libuv to 7841f77
Ben Noordhuis [Tue, 22 Jan 2013 15:21:25 +0000 (16:21 +0100)]
deps: upgrade libuv to 7841f77

11 years agodoc: Fix syntax in cluster example code
Tim [Mon, 7 Jan 2013 19:35:42 +0000 (15:35 -0400)]
doc: Fix syntax in cluster example code

11 years agogyp: fix build with dtrace support on FreeBSD
Fedor Indutny [Sun, 20 Jan 2013 15:23:35 +0000 (19:23 +0400)]
gyp: fix build with dtrace support on FreeBSD

Fix undefined reference to `gelf_getsym`... and other undefined symbols
from libelf, by adding `-lelf` to linker options on FreeBSD.

11 years agodtrace: fix generation of v8 constants on freebsd
Fedor Indutny [Sun, 20 Jan 2013 14:31:30 +0000 (18:31 +0400)]
dtrace: fix generation of v8 constants on freebsd

Every constant is certainly 4 bytes now, but freebsd's objdump utility
prints out odd byte sequences (5-bytes, 6-bytes and even 9-bytes long)
for v8's data section. We can safely ignore all upper bytes, because all
constants that we're using are just `int`s. Since on all supported
platforms `int` is 32bit long (and anyway v8's constants are 32bit too),
we ignore all higher bits if they were read.

11 years agotyped arrays: fix DataView endianness regression
Ben Noordhuis [Sat, 19 Jan 2013 23:24:19 +0000 (00:24 +0100)]
typed arrays: fix DataView endianness regression

Fix an off-by-one error introduced in 9fe3734 that caused a regression
in the default endianness used for writes in DataView::setGeneric().

Fixes #4626.

11 years agochild_process: remove .track option
Fedor Indutny [Sat, 19 Jan 2013 20:26:38 +0000 (00:26 +0400)]
child_process: remove .track option

Since net.Server's `connection` property is deprecated now, we don't
need API to track socket's state to keep `connection`s value up-to-date.

11 years agoconsole: Support formatting options in trace()
isaacs [Fri, 18 Jan 2013 00:02:41 +0000 (16:02 -0800)]
console: Support formatting options in trace()

Fix #4589

11 years agodomain: empty stack on all exceptions
Dave Olszewski [Thu, 27 Dec 2012 20:08:23 +0000 (12:08 -0800)]
domain: empty stack on all exceptions

Due to the nature of asyncronous programming, it's impossible to know
what will run on the next tick.  Because of this, it's not correct to
maintain domain stack state between ticks

Since the _fatalException handler is only invoked after the stack is
unwound, once it exits the tick will end.  The only reasonable thing to
do in that case is to exit *all* domains.

11 years agodoc: Add NODE_DEBUG env to the first example.
Yi EungJun [Fri, 18 Jan 2013 13:51:09 +0000 (22:51 +0900)]
doc: Add NODE_DEBUG env to the first example.

The first example in cluster.markdown requires NODE_DEBUG env to show
debug message.

And also fix the message because it was a little bit different with
the actual message.

11 years agoMerge remote-tracking branch 'ry/v0.8' into master
isaacs [Fri, 18 Jan 2013 20:58:16 +0000 (12:58 -0800)]
Merge remote-tracking branch 'ry/v0.8' into master

Conflicts:
AUTHORS
ChangeLog
src/node_version.h
test/simple/test-buffer.js

11 years agoblog: Post for v0.8.18 release
isaacs [Fri, 18 Jan 2013 20:54:22 +0000 (12:54 -0800)]
blog: Post for v0.8.18 release

11 years agoNow working on 0.8.19
isaacs [Fri, 18 Jan 2013 20:51:34 +0000 (12:51 -0800)]
Now working on 0.8.19

11 years agoMerge branch 'v0.8.18-release' into v0.8
isaacs [Fri, 18 Jan 2013 20:51:14 +0000 (12:51 -0800)]
Merge branch 'v0.8.18-release' into v0.8

11 years ago2013.01.18, Version 0.8.18 (Stable) v0.8.18
isaacs [Fri, 18 Jan 2013 20:15:41 +0000 (12:15 -0800)]
2013.01.18, Version 0.8.18 (Stable)

* npm: Upgrade to v1.2.2

* dns: make error message match errno (Dan Milon)

* tls: follow RFC6125 more stricly (Fedor Indutny)

* buffer: reject negative SlowBuffer offsets (Ben Noordhuis)

* install: add simplejson fallback (Chris Dent)

* http: fix "Cannot call method 'emit' of null" (Ben Noordhuis)

11 years agonpm: Upgrade to v1.2.2
isaacs [Fri, 18 Jan 2013 20:12:07 +0000 (12:12 -0800)]
npm: Upgrade to v1.2.2

11 years agoNow working on 0.9.8
isaacs [Fri, 18 Jan 2013 19:49:35 +0000 (11:49 -0800)]
Now working on 0.9.8

11 years agoMerge branch 'v0.9.7-release'
isaacs [Fri, 18 Jan 2013 19:49:12 +0000 (11:49 -0800)]
Merge branch 'v0.9.7-release'

11 years agoblog: Post for v0.9.7 release
isaacs [Fri, 18 Jan 2013 19:48:21 +0000 (11:48 -0800)]
blog: Post for v0.9.7 release

11 years ago2013.01.18, Version 0.9.7 (Unstable) v0.9.7
isaacs [Fri, 18 Jan 2013 16:42:54 +0000 (08:42 -0800)]
2013.01.18, Version 0.9.7 (Unstable)

* V8: Upgrade to 3.15.11.7

* npm: Upgrade to 1.2.2

* punycode: Upgrade to 1.2.0 (Mathias Bynens)

* repl: make built-in modules available by default (Felix Böhm)

* windows: add support for '_Total' perf counters (Scott Blomquist)

* cluster: make --prof work for workers (Ben Noordhuis)

* child_process: do not keep list of sent sockets (Fedor Indutny)

* tls: Follow RFC6125 more strictly (Fedor Indutny)

* buffer: floating point read/write improvements (Trevor Norris)

* TypedArrays: Improve dataview perf without endian param (Dean McNamee)

* module: assert require() called with a non-empty string (Felix Böhm, James Campos)

* stdio: Set readable/writable flags properly (isaacs)

* stream: Properly handle large reads from push-streams (isaacs)

11 years agodoc: Remove mention of child.send 'track' option
isaacs [Fri, 18 Jan 2013 18:17:26 +0000 (10:17 -0800)]
doc: Remove mention of child.send 'track' option

Will be removed very soon.  No point making it public.

11 years agobuffer: Define INFINITY for MSVC compiler
isaacs [Fri, 18 Jan 2013 18:03:54 +0000 (10:03 -0800)]
buffer: Define INFINITY for MSVC compiler

11 years agonpm: Upgrade to 1.2.2
isaacs [Fri, 18 Jan 2013 16:37:32 +0000 (08:37 -0800)]
npm: Upgrade to 1.2.2

11 years agocluster: make --prof work for workers
Ben Noordhuis [Fri, 18 Jan 2013 11:44:10 +0000 (12:44 +0100)]
cluster: make --prof work for workers

Profiling in clustered environments doesn't work out of the box.

By default, V8 writes the profile data of all processes to a single
v8.log.

Running that log file through a tick processor produces bogus numbers
because many events won't match up with the recorded memory mappings
and you end up with graphs where 80+% of ticks is unaccounted for.

Fixing the tick processor to deal with multi-process output is not very
useful because the processes may be running wildly disparate workloads.

That's why we fix up the command line arguments to include
a "--logfile=v8-%p.log" argument (where %p is expanded to the PID)
unless it already contains a --logfile argument.

Fixes #4617.

11 years agodns: make error message match errno
Dan Milon [Fri, 18 Jan 2013 00:40:48 +0000 (02:40 +0200)]
dns: make error message match errno

11 years agov8: add %p option to --logfile, expands to pid
Ben Noordhuis [Fri, 18 Jan 2013 00:23:34 +0000 (01:23 +0100)]
v8: add %p option to --logfile, expands to pid

Useful when you are profiling multiple instances of V8 concurrently.
Submitted upstream: http://code.google.com/p/v8/issues/detail?id=2503

Refs #4617.

11 years agotls: follow RFC6125 more stricly
Fedor Indutny [Mon, 14 Jan 2013 23:29:46 +0000 (03:29 +0400)]
tls: follow RFC6125 more stricly

* Allow wildcards only in left-most part of hostname identifier.
* Do not match CN if altnames are present

11 years agoRevert "Revert "tls: allow wildcards in common name""
Fedor Indutny [Thu, 17 Jan 2013 23:47:47 +0000 (03:47 +0400)]
Revert "Revert "tls: allow wildcards in common name""

This reverts commit 30e237041d5cd7c39e33a9382c96f109be23337d.

Works properly with b4b750b

11 years agochild_process: do not keep list of sent sockets
Fedor Indutny [Mon, 14 Jan 2013 17:08:20 +0000 (21:08 +0400)]
child_process: do not keep list of sent sockets

Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want to receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.

11 years agoRevert "child_process: do not keep list of sent sockets"
Fedor Indutny [Thu, 17 Jan 2013 23:13:10 +0000 (03:13 +0400)]
Revert "child_process: do not keep list of sent sockets"

This reverts commit db5ee0b3decace9b5d80ee535ce53183aff02909.

11 years agobenchmark: Add resume() in static_http_server
isaacs [Thu, 17 Jan 2013 22:54:59 +0000 (14:54 -0800)]
benchmark: Add resume() in static_http_server

11 years agochild_process: do not keep list of sent sockets
Fedor Indutny [Mon, 14 Jan 2013 17:08:20 +0000 (21:08 +0400)]
child_process: do not keep list of sent sockets

Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want `server.connections` to be a reliable
  number, and receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.

11 years agoRevert "events: Don't crash on events named __proto__"
isaacs [Thu, 17 Jan 2013 21:20:22 +0000 (13:20 -0800)]
Revert "events: Don't crash on events named __proto__"

Unfortunately, it's just too slow to do this in events.js.  Users will
just have to live with not having events named __proto__ or toString.

This reverts commit b48e303af023dc60b6f6590694ba94d9b8108702.

11 years agostdio: Set readable/writable flags properly
isaacs [Thu, 17 Jan 2013 17:52:48 +0000 (09:52 -0800)]
stdio: Set readable/writable flags properly

Set the readable/writable flags properly in net streams that have
a handle passed in (such as TTY streams).

Fix #4606

11 years agoevents: Don't crash on events named __proto__
isaacs [Wed, 16 Jan 2013 19:26:28 +0000 (11:26 -0800)]
events: Don't crash on events named __proto__

This prefixes all event names internally with 'ev'.

11 years agoRevert "tls: allow wildcards in common name"
Ben Noordhuis [Thu, 17 Jan 2013 15:32:00 +0000 (16:32 +0100)]
Revert "tls: allow wildcards in common name"

This reverts commit 45024e7b7551eca7796e16fe453b2cbaee94b916.

It's making test/simple/test-tls-check-server-identity.js fail:

  AssertionError: Test#4 failed: { host: 'b.a.com',
    cert: { subject: { CN: '*.a.com' } },
    result: false }
      at <omitted>/test/simple/test-tls-check-server-identity.js:201:10

11 years agodoc: modify documentation style about 'Stability: 5'
Ryunosuke SATO [Thu, 17 Jan 2013 09:12:03 +0000 (18:12 +0900)]
doc: modify documentation style about 'Stability: 5'

'Stability: 5' is described as 'Locked' not as 'API Locked'
in other documents.

For example:
- `/doc/api/assert.markdown`
- `/doc/api/util.markdown`

This word was injected in 192192a.

11 years agotest: add cluster 'bind twice' test
Ben Noordhuis [Thu, 9 Feb 2012 05:22:50 +0000 (06:22 +0100)]
test: add cluster 'bind twice' test

This test starts two clustered HTTP servers on the same port.
It expects the first cluster to succeed and the second cluster
to fail with EADDRINUSE.

Reapplies commit cacd3ae, accidentally reverted in a2851b6.

11 years agobuffer: reject negative SlowBuffer offsets
Ben Noordhuis [Thu, 17 Jan 2013 00:10:15 +0000 (01:10 +0100)]
buffer: reject negative SlowBuffer offsets

Reject negative offsets in SlowBuffer::MakeFastBuffer(), it allows
the creation of buffers that point to arbitrary addresses.

Reported by Trevor Norris.

11 years agodeps: upgrade libuv to 4ba03dd
Ben Noordhuis [Wed, 16 Jan 2013 22:38:02 +0000 (23:38 +0100)]
deps: upgrade libuv to 4ba03dd

11 years agotest: add module-loading test with empty string
isaacs [Wed, 16 Jan 2013 20:27:53 +0000 (12:27 -0800)]
test: add module-loading test with empty string

11 years agomodule: assert that require() is called with a string
Felix Böhm [Wed, 16 Jan 2013 18:53:16 +0000 (19:53 +0100)]
module: assert that require() is called with a string

as requested in #4577

11 years agolint: Prefer double-quotes over single
isaacs [Wed, 16 Jan 2013 20:07:12 +0000 (12:07 -0800)]
lint: Prefer double-quotes over single

11 years agorepl: fix how to module requiring in code comment
Ryunosuke SATO [Tue, 11 Dec 2012 10:13:22 +0000 (19:13 +0900)]
repl: fix how to module requiring in code comment

This module requiring style is old.
This API has been changed in Node 0.1.16 726865af.

11 years agoTypedArrays: Improve dataview perf without endian param
Dean McNamee [Tue, 15 Jan 2013 18:35:52 +0000 (19:35 +0100)]
TypedArrays: Improve dataview perf without endian param

V8 seems to be particularly slow converting an undefined value to false
in BooleanValue.

Revert this when we upgrade to V8 3.17, or whenever the fix discussed
in http://code.google.com/p/v8/issues/detail?id=2487 lands in V8.

11 years agoassert that require() has a truthy path
James Campos [Wed, 9 Jan 2013 17:01:22 +0000 (09:01 -0800)]
assert that require() has a truthy path

11 years agostream: Properly handle large reads from push-streams
isaacs [Wed, 16 Jan 2013 00:44:29 +0000 (16:44 -0800)]
stream: Properly handle large reads from push-streams

Problem 1: If stream.push() triggers a 'readable' event, and the user
calls `read(n)` with some n > the highWaterMark, then the push() will
return false (indicating that they should not push any more), but no
future 'readable' event is coming (because we're above the
highWaterMark).

Solution: return true from push() when needReadable is set.

Problem 2: A read(n) for n != 0, after the stream had encountered an
EOF, would not trigger the 'end' event if the EOF was pushed in
synchronously by the _read() function.

Solution: Check for ended in stream.read() and schedule an end event if
the length now equals 0.

Fix #4585

11 years agobuffer: improve read/write speed with assert
Trevor Norris [Fri, 11 Jan 2013 00:59:39 +0000 (16:59 -0800)]
buffer: improve read/write speed with assert

Improved assert check order of execution and added additional checks on
parameters to ensure no bad values make it through (e.g. negative offset
values).

11 years agobuffer: floating point read/write improvements
Trevor Norris [Sat, 22 Dec 2012 21:06:50 +0000 (13:06 -0800)]
buffer: floating point read/write improvements

Improvements:
* floating point operations are approx 4x's faster
* Now write quiet NaN's
* all read/write on floating point now done in C, so no more need for
  lib/buffer_ieee754.js
* float values have more accurate min/max value checks
* add additional benchmarks for buffers read/write
* created benchmark/_bench_timer.js which is a simple library that
  can be included into any benchmark and provides an intelligent tracker
  for sync and async tests
* add benchmarks for DataView set methods
* add checks and tests to make sure offset is greater than 0

11 years agohttp: fix duplicate var initialization
Alexandr Emelin [Thu, 10 Jan 2013 07:38:29 +0000 (11:38 +0400)]
http: fix duplicate var initialization

IncomingMessage function contained duplicate initialization
of this._pendings. Line with one of those expressions has been
removed.

11 years agopunycode: update to v1.2.0
Mathias Bynens [Fri, 11 Jan 2013 08:57:24 +0000 (09:57 +0100)]
punycode: update to v1.2.0

This update adds support for RFC 3490 separators for improved
compatibility with web browsers.

11 years agov8: work around String::WriteAscii segfault
Ben Noordhuis [Tue, 15 Jan 2013 22:42:23 +0000 (23:42 +0100)]
v8: work around String::WriteAscii segfault

See http://code.google.com/p/v8/issues/detail?id=2493 for details.
Once the patch lands in upstream V8, this commit can be reverted.

11 years agoinstall: add simplejson fallback
Chris Dent [Mon, 14 Jan 2013 22:24:30 +0000 (22:24 +0000)]
install: add simplejson fallback

Make tools/install.py work with python 2.5

2.5 is still fairly widespread and does not include a json lib as
standard. Most python folk will have simplejson if they are in that
boat.

In general it seems a bit tricky to solve this perfectly...

11 years agotls: follow RFC6125 more stricly
Fedor Indutny [Mon, 14 Jan 2013 23:29:46 +0000 (03:29 +0400)]
tls: follow RFC6125 more stricly

* Allow wildcards only in left-most part of hostname identifier.
* Do not match CN if altnames are present

11 years agostreams2: Do not allow hwm < lwm
isaacs [Tue, 15 Jan 2013 00:03:38 +0000 (16:03 -0800)]
streams2: Do not allow hwm < lwm

There was previously an assert() in there, but this part of the code is
so high-volume that the added cost made a measurable dent in http_simple.

Just checking inline is fine, though, and prevents a lot of potential
hazards.

11 years agostream: Do not call endReadable on a non-empty stream
isaacs [Mon, 14 Jan 2013 19:25:39 +0000 (11:25 -0800)]
stream: Do not call endReadable on a non-empty stream

Say that a stream's current read queue has 101 bytes in it, and the
underlying resource has ended (ie, reached EOF).

If you do something like this:

    stream.read(100); // leave a byte behind
    stream.read(0); // read(0) for some reason

then the read(0) will get 0 from the howMuchToRead function.  Since the
stream was ended, this was incorrectly treating the 0 as a "there is no
more in the buffer", and emitting 'end' before that last byte was read.

Why have the read(0) in the first place?  We do this in some cases to
trigger the last few bytes of a net socket (such as a child process's
stdio pipes).  This was causing issues when piping a `git archive` job
to a file: the resulting tarball was incomplete, because it occasionally
was not getting the last chunk.

11 years agobuffer: zero-length buffers shouldn't be slab-backed
Bert Belder [Sat, 5 Jan 2013 21:14:50 +0000 (22:14 +0100)]
buffer: zero-length buffers shouldn't be slab-backed

11 years agobuffer: zero-length buffers shouldn't be slab-backed
Bert Belder [Sat, 5 Jan 2013 21:14:50 +0000 (22:14 +0100)]
buffer: zero-length buffers shouldn't be slab-backed

11 years agotls: allow wildcards in common name
Fedor Indutny [Mon, 14 Jan 2013 17:09:35 +0000 (21:09 +0400)]
tls: allow wildcards in common name

see #4592

11 years agotls: allow wildcards in common name
Fedor Indutny [Mon, 14 Jan 2013 17:09:35 +0000 (21:09 +0400)]
tls: allow wildcards in common name

see #4592

11 years agohttp: fix "Cannot call method 'emit' of null"
Ben Noordhuis [Mon, 14 Jan 2013 15:35:03 +0000 (16:35 +0100)]
http: fix "Cannot call method 'emit' of null"

Fix the following exception:

  http.js:974
    this._httpMessage.emit('close');
                      ^
  TypeError: Cannot call method 'emit' of null
      at Socket.onServerResponseClose (http.js:974:21)
      at Socket.EventEmitter.emit (events.js:124:20)
      at net.js:421:10
      at process._tickCallback (node.js:386:13)
      at process._makeCallback (node.js:304:15)

Fixes #4586.

11 years agogitignore: ignore perf data files
Ben Noordhuis [Mon, 14 Jan 2013 12:06:29 +0000 (13:06 +0100)]
gitignore: ignore perf data files

11 years agov8: Hardfloat does not imply VFPv3, only VFPv2.
yangguo@chromium.org [Tue, 18 Dec 2012 09:48:51 +0000 (09:48 +0000)]
v8: Hardfloat does not imply VFPv3, only VFPv2.

Raspberry Pi is an example.

BUG=v8:2393

Review URL: https://chromiumcodereview.appspot.com/11570061
Patch from Chi-Thanh Christopher Nguyen <nguyenchithanh@gmail.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@13232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

This is a backport of v8/v8@44419ad089b729a1aab4a5f27c0833e2ce69d28b.

11 years agodeps: upgrade libuv to 8e3e60f
Ben Noordhuis [Sun, 13 Jan 2013 00:29:34 +0000 (01:29 +0100)]
deps: upgrade libuv to 8e3e60f

11 years agorepl: fix lint
Nathan Rajlich [Sat, 12 Jan 2013 20:14:39 +0000 (12:14 -0800)]
repl: fix lint

11 years agorepl: make built-in modules available by default
Felix Böhm [Sat, 12 Jan 2013 20:07:06 +0000 (12:07 -0800)]
repl: make built-in modules available by default

Closes #3564.
Closes #4578.

11 years agowindows: add support for '_Total' perf counters
Scott Blomquist [Fri, 11 Jan 2013 21:24:15 +0000 (22:24 +0100)]
windows: add support for '_Total' perf counters

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 agodeps: update v8 to 3.15.11.7
Fedor Indutny [Fri, 11 Jan 2013 20:10:45 +0000 (00:10 +0400)]
deps: update v8 to 3.15.11.7

11 years agoNow working on 0.9.7
isaacs [Fri, 11 Jan 2013 19:25:54 +0000 (11:25 -0800)]
Now working on 0.9.7

11 years agoMerge branch 'v0.9.6-release'
isaacs [Fri, 11 Jan 2013 19:25:37 +0000 (11:25 -0800)]
Merge branch 'v0.9.6-release'

11 years agoblog: release v0.9.6
isaacs [Fri, 11 Jan 2013 19:24:37 +0000 (11:24 -0800)]
blog: release v0.9.6

11 years ago2013.01.11, Version 0.9.6 (Unstable) v0.9.6
isaacs [Fri, 11 Jan 2013 18:49:21 +0000 (10:49 -0800)]
2013.01.11, Version 0.9.6 (Unstable)

* V8: update to 3.15.11.5

* node: remove ev-emul.h (Ben Noordhuis)

* path: make basename and extname ignore trailing slashes (Bert Belder)

* typed arrays: fix sunos signed/unsigned char issue (Ben Noordhuis)

* child_process: Fix {stdio:'inherit'} regression (Ben Noordhuis)

* child_process: Fix pipe() from child stdio streams  (Maciej Małecki)

* child_process: make fork() execPath configurable (Bradley Meck)

* stream: Add readable.push(chunk) method (isaacs)

* dtrace: x64 ustack helper (Fedor Indutny)

* repl: fix floating point number parsing (Nirk Niggler)

* repl: allow overriding builtins (Ben Noordhuis)

* net: add localAddress and localPort to Socket (James Hight)

* fs: make pool size coincide with ReadStream bufferSize (Shigeki Ohtsu)

* typed arrays: implement load and store swizzling (Dean McNamee)

* windows: fix perfctr crash on XP and 2003 (Scott Blomquist)

* dgram: fix double implicit bind error (Ben Noordhuis)

11 years agoMerge remote-tracking branch 'ry/v0.8' into master
isaacs [Fri, 11 Jan 2013 18:18:07 +0000 (10:18 -0800)]
Merge remote-tracking branch 'ry/v0.8' into master

Conflicts:
AUTHORS
ChangeLog
Makefile
src/node_version.h

11 years agopath: make basename and extname ignore trailing slashes
Bert Belder [Fri, 11 Jan 2013 17:42:46 +0000 (18:42 +0100)]
path: make basename and extname ignore trailing slashes

Fixes #4536

11 years agotyped arrays: fix sunos signed/unsigned char issue
Ben Noordhuis [Fri, 11 Jan 2013 17:31:47 +0000 (18:31 +0100)]
typed arrays: fix sunos signed/unsigned char issue

The int8_t and uint8_t typedefs on sunos/smartos depend on a number of
compiler directives. Avoid ambiguity and specify signed and unsigned
char explicitly.

Fixes the following build error:

  ../src/stream_wrap.cc: In static member function 'static void*
  node::WriteWrap::operator new(size_t)':
  ../src/stream_wrap.cc:70:49: warning: no return statement in function
  returning non-void [-Wreturn-type]
  In file included from ../src/v8_typed_array.cc:26:0:
  ../src/v8_typed_array_bswap.h: In function 'T
  v8_typed_array::SwapBytes(T) [with T = signed char]':
  ../src/v8_typed_array_bswap.h:150:23:   instantiated from 'T
  v8_typed_array::LoadAndSwapBytes(void*) [with T = signed char]'
  ../src/v8_typed_array.cc:694:7:   instantiated from 'static
  v8::Handle<v8::Value> {anonymous}::DataView::getGeneric(const
  v8::Arguments&) [with T = signed char]'
  ../src/v8_typed_array.cc:738:40:   instantiated from here
  ../src/v8_typed_array_bswap.h:125:16: error: size of array is
  negative

11 years agotest: child process { stdio:'inherit' }
isaacs [Fri, 11 Jan 2013 01:15:53 +0000 (17:15 -0800)]
test: child process { stdio:'inherit' }

11 years agoRevert "typed arrays: fix build on sunos"
Fedor Indutny [Fri, 11 Jan 2013 17:01:14 +0000 (21:01 +0400)]
Revert "typed arrays: fix build on sunos"

This reverts commit 35a137cf8dcec75fd4cc11bbd8eb22cc2c1d7ece.

11 years agotyped arrays: fix build on sunos
Fedor Indutny [Fri, 11 Jan 2013 15:52:49 +0000 (19:52 +0400)]
typed arrays: fix build on sunos

11 years agoRevert "path: fix bugs related to paths with trailing slashes"
Bert Belder [Fri, 11 Jan 2013 15:19:21 +0000 (16:19 +0100)]
Revert "path: fix bugs related to paths with trailing slashes"

It only does the right thing on unix, and the implementation
isn't great either.

This reverts commit bb1c03989f8702e06072e6d9228b52661bf00ace.

11 years agodeps: upgrade libuv to 9aab5d4
Ben Noordhuis [Fri, 11 Jan 2013 12:49:45 +0000 (13:49 +0100)]
deps: upgrade libuv to 9aab5d4

11 years agohttp: Set _dumped=false initially
isaacs [Fri, 11 Jan 2013 02:16:43 +0000 (18:16 -0800)]
http: Set _dumped=false initially

The better to keep the IncomingMessage class isomorphic and avoid
creating additional hidden classes.

11 years agopath: fix bugs related to paths with trailing slashes
Andreas Madsen [Tue, 8 Jan 2013 17:22:04 +0000 (18:22 +0100)]
path: fix bugs related to paths with trailing slashes

11 years agoconfigure: define "arm_fpu" and "arm_neon" for ARM
Nathan Rajlich [Fri, 11 Jan 2013 01:13:59 +0000 (17:13 -0800)]
configure: define "arm_fpu" and "arm_neon" for ARM

v8's common.gypi file expects them to be defined now.

Closes #4534.

11 years agomake binary: allow custom config flags
Nathan Rajlich [Fri, 11 Jan 2013 00:59:09 +0000 (16:59 -0800)]
make binary: allow custom config flags

For example, to cross-compile from my OS X laptop for Raspberry Pi, you would
do something like:

  $ make binary BINARYNAME=node-v`python tools/getnodeversion.py`-linux-arm-pi \
      DESTCPU=arm CONFIG_FLAGS="--dest-os=linux"

11 years agov8: Hardfloat does not imply VFPv3, only VFPv2.
yangguo@chromium.org [Tue, 18 Dec 2012 09:48:51 +0000 (09:48 +0000)]
v8: Hardfloat does not imply VFPv3, only VFPv2.

Raspberry Pi is an example.

BUG=v8:2393

Review URL: https://chromiumcodereview.appspot.com/11570061
Patch from Chi-Thanh Christopher Nguyen <nguyenchithanh@gmail.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@13232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

This is a backport of v8/v8@44419ad089b729a1aab4a5f27c0833e2ce69d28b.

11 years agohttp: Don't switch the socket into old-mode
isaacs [Tue, 8 Jan 2013 04:33:56 +0000 (20:33 -0800)]
http: Don't switch the socket into old-mode

11 years agohttp: Use stream.push() instead of touching _readableState
isaacs [Tue, 8 Jan 2013 04:23:07 +0000 (20:23 -0800)]
http: Use stream.push() instead of touching _readableState

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 agoblog, changelog: 0.8.17 was released in 2013, not 2012
isaacs [Thu, 10 Jan 2013 15:47:09 +0000 (07:47 -0800)]
blog, changelog: 0.8.17 was released in 2013, not 2012