Commit Graph

7653 Commits (47f3fc9a2671bca3f70726f9bbbb8f2b56ac1dc3)

Author SHA1 Message Date
isaacs 1388171d96 blog: Post about v0.8.17 2013-01-09 17:08:24 -08:00
isaacs daf4666963 Now working on 0.8.18 2013-01-09 17:07:33 -08:00
isaacs c4b080f82d Merge branch 'v0.8.17-release' into v0.8 2013-01-09 17:07:21 -08:00
Ben Noordhuis a6756a2c06 test: run tests in alphabetical order 2013-01-10 01:58:30 +01:00
isaacs c50c33e939 2012.01.09, Version 0.8.17 (Stable)
* npm: Upgrade to v1.2.0
  - peerDependencies (Domenic Denicola)
  - node-gyp v0.8.2 (Nathan Rajlich)
  - Faster installs from github user/project shorthands (Nathan Zadoks)

* typed arrays: fix 32 bit size/index overflow (Ben Noordhuis)

* http: Improve performance of single-packet responses (Ben Noordhuis)

* install: fix openbsd man page location (Ben Noordhuis)

* http: bubble up parser errors to ClientRequest (Brian White)
2013-01-09 16:55:12 -08:00
Ben Noordhuis ed825f4888 typed arrays: fix 32 bit size/index overflow
Fix an out-of-bound read/write bug due to integer wrapping. Reported by
Dean McNamee.
2013-01-10 00:55:27 +01:00
isaacs aa742ddf80 npm: Upgrade to v1.2.0 2013-01-09 15:21:30 -08:00
Dean McNamee c207d400f1 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
2013-01-09 17:44:25 +01:00
Dean McNamee 46a489be73 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
2013-01-09 17:44:25 +01:00
Ben Noordhuis 7d66a9d060 typed arrays: undo local changes
Partially revert 5664dd2, 6573fc3 and 7788a6b to ease landing changes
from upstream.
2013-01-09 17:43:19 +01:00
Fedor Indutny 7a2ae4c930 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
2013-01-09 12:16:04 +04:00
Shigeki Ohtsu 1211946a8c stream: fix typo
Also: Revert "stream: Override addListener as well as on"

This reverts commit 18c985919d.
2013-01-08 23:13:02 -08:00
isaacs 18c985919d stream: Override addListener as well as on
For the compatibility switch.
2013-01-08 14:27:01 -08:00
Fedor Indutny 45941811dc 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.
2013-01-08 22:13:09 +04:00
Tim Bradshaw e6acfed9cc doc: os.cpus() returns times in milliseconds 2013-01-08 05:38:36 +01:00
Dean McNamee 3f75454426 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.
2013-01-08 05:08:00 +01:00
Dean McNamee b50d51ef5b typed arrays: replace switch with templates
Convert TypedArray's TypeName implementation to template specialization
instead of a switch() statement.
2013-01-08 05:08:00 +01:00
Shigeki Ohtsu 9b363b022f net: fix bufferSize include writableStream length
socket.bufferSize missed to include the length of internal buffers in
writableStream.
2013-01-08 04:59:50 +01:00
Ben Noordhuis ad6769fc92 dgram: don't assert on send('string')
Raise a TypeError when the argument to send() or sendto() is anything
but a Buffer.

Fixes the following assertion:

  $ node -e 'require("dgram").createSocket("udp4").send("BAM")'
  node: ../../src/udp_wrap.cc:220: static v8::Handle<v8::Value>
  node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion
  `Buffer::HasInstance(args[0])' failed.
  Aborted (core dumped)

Fixes #4496.
2013-01-08 04:32:40 +01:00
Mike Harsch aeb030bead 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.
2013-01-08 03:41:26 +01:00
isaacs 321b8eec08 dtrace: More style
Continuation lines should be indented with 4 spaces, not a tab.
2013-01-07 12:31:44 -08:00
isaacs 38df9d51a2 dtrace: Make D style more D-ish 2013-01-07 12:23:41 -08:00
Fedor Indutny f9afb3f010 dtrace: x64 ustack helper 2013-01-07 23:04:11 +04:00
Fedor Indutny 13296e4b13 dtrace: fix style in ustack helper 2013-01-07 23:01:54 +04:00
isaacs 3b715edda9 dtrace: SeqAsciiString was renamed to SeqOneByteString in v8 2013-01-07 10:30:15 -08:00
Ben Noordhuis 7788a6bf85 src: pass node_isolate to Undefined() 2013-01-07 17:39:58 +01:00
Ben Noordhuis c7d7ae1fe2 src: pass node_isolate to Null() 2013-01-07 17:39:57 +01:00
Ben Noordhuis 109f73b2c0 src: pass node_isolate to True() and False() 2013-01-07 17:39:57 +01:00
Ben Noordhuis 01c3d0aa88 src: pass node_isolate to Local<>::New 2013-01-07 17:39:57 +01:00
Ben Noordhuis 6573fc3502 src: pass node_isolate to Integer::New 2013-01-07 17:39:57 +01:00
Ben Noordhuis 412b3cee05 src: pass node_isolate to String::Empty 2013-01-07 17:39:57 +01:00
Ben Noordhuis 5d0816bf3e 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.
2013-01-07 17:39:57 +01:00
isaacs df3563aa65 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.
2013-01-07 08:36:49 -08:00
isaacs 3e6f737eaf stream: Clean up more effectively in pipe() 2013-01-07 08:36:49 -08:00
Maciej Małecki a5d4e74891 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.
2013-01-07 08:36:49 -08:00
Dean McNamee 8adebb92bc node: move symbol caching to Load() 2013-01-07 17:19:09 +01:00
Ben Noordhuis 879efb3338 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.
2013-01-07 16:04:33 +01:00
Ben Noordhuis fa3bfc3a66 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.
2013-01-07 03:59:10 +01:00
Ben Noordhuis 4e1a2f9a89 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.
2013-01-07 03:40:12 +01:00
Bradley Meck 70ad9bbcbd 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.
2013-01-06 22:55:30 +01:00
James Hight 3f76419a04 net: add localAddress and localPort to Socket 2013-01-05 17:05:13 +01:00
Ben Noordhuis 5664dd2fc1 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.
2013-01-05 00:16:23 +01:00
Johannes Ewald 872cb0d7fa doc: improve example of process.hrtime()
The example clarifies now that diff[0] * 1000000000 + diff[1] equals
the result in nanoseconds.
2013-01-04 23:06:40 +01:00
Shigeki Ohtsu 2b6c561040 fs: remove unused default option in WriteStream
No bufferSize option is used in stream.Writable and fs.WriteStream.
2013-01-04 19:02:05 +01:00
Shigeki Ohtsu 829f96bada fs: pool size coincide with ReadStream bufferSize
pool size of file reading in ReadableStream can be adjustable
with a bufferSize option.
2013-01-04 19:00:16 +01:00
Ben Noordhuis 93591a2a88 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.
2013-01-04 20:06:03 +04:00
Fedor Indutny 97056c064f 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
2013-01-04 16:39:24 +04:00
Fedor Indutny 0054264d88 v8: update to 3.15.11.5 2013-01-04 15:44:47 +04:00
Nirk Niggler 0459a23063 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.
2013-01-03 17:11:54 -08:00
Scott Blomquist a616774281 windows: improve Visual Studio Express build support
* Moved generated files to a clearer directory.
* Improved detection logic for ctrpp.exe tool.

Closes #4482
2013-01-03 23:38:25 +01:00