Commit Graph

523 Commits (ea29e137b5a9acda27bd9601448639aacfc1cd9e)

Author SHA1 Message Date
Ryan ea29e137b5 Hack for compiling on Snow Leopard.
I don't have access to this OS to fix the issue properly, so for the moment
I'm reverting back to 32bit build on Darwin. We changed to native 64bit in
8ddf930901.

Thanks to Johan Dahlberg and Tim Caswell for reporting and debugging this.
2009-09-05 14:40:12 +02:00
Ryan 485a9c1487 Small change to website index.html 2009-09-05 14:39:24 +02:00
Ryan 9dbd92476e Bugfix: Trap exceptions in URIParser.
A user was able to crash chat.tinyclouds.org by sending it a malformed URL!
Not good.
2009-09-04 17:42:00 +02:00
Ryan 734e86b9e5 bump version 2009-09-04 12:35:30 +02:00
Ryan 733ee426dc Fix slowness in debug run of test-tcp-many-clients
I'm not sure what is actually causing

  node_g test/mjsunit/test-tcp-many-clients.js

to run slowly, but I traced the problem to
afd9e714d3.
Somehow it has to do with promoting the compilation of src/util.js. That
change wasn't actually intended to be included in afd9e7 commit anyway, so
I'm reverting it here.
2009-09-04 12:15:21 +02:00
Ryan 2097b9d2e5 Upgrade evcom - disable EPIPE error output. 2009-09-04 11:46:56 +02:00
Ryan 1bd5277233 Add test-mkdir-rmdir.js 2009-09-04 11:46:31 +02:00
Ryan b6eed30379 Sort files in readdir test. 2009-09-03 21:59:31 +02:00
Ryan 3736bf9f49 Add node.fs.mkdir() 2009-09-03 21:57:15 +02:00
Ryan 9b3e2ae192 Add node.fs.readdir() 2009-09-03 21:32:27 +02:00
Ryan 747d6723aa Clean up eio wrappers. Create EIOPromise. 2009-09-03 21:32:21 +02:00
Ryan c13773a71f Clean up text on website. 2009-09-03 18:12:50 +02:00
Ryan 1645b8f8b0 Asyncly do getaddrinfo() on Apple. 2009-09-03 16:01:45 +02:00
Ryan 1df6d61208 Upgrade libeio, increase xthread stacksize to 64kb.
64kb seems to be the magic number for getaddrinfo() to work on Macintosh.
2009-09-03 15:59:48 +02:00
Ryan 342da69701 Add extension API documentation 2009-09-03 15:00:06 +02:00
Ryan aefbd57514 Add stack to promise.wait().
The problem was that if promise A was waiting and promise B was created and
then also told to wait (from some callback coming off the event loop), and
then promise A finished, promise B's wait would return. Promise A's wait
would not return until promise B was finished. This is incorrect.

To solve this issue properly, one probably needs to allocate separate
execution stacks. I use, instead, Poor Man's Coroutines. We continue to use
the main execution stack and force promises created most recently to return
first.

That is even if Promise A finishes first, neither wait() returns. Not until
Promise B finishes, will its wait() return. After that is complete, Promise
A's wait() will return.

This introduces the problem of growing the "wait stack" infinitely. Thus
I've added a strong warning to the documentation only to use this operation
sparingly. require() and include() seem to be the proper use case for such a
thing: they are called usually at program start up - they don't take too
long to finish and they won't be called so often.

Let's experiment with this stop-gap. If the infinite promise stack becomes a
problem for many, then I will remove promise.wait() entirely or perhaps only
use it for thread pool events.
2009-09-03 10:48:39 +02:00
Ryan 8ddf930901 Build natively on x64.
Had to add some waf hackery to override V8's architecture choice. They
probably have a reason for defaulting still to IA32, but all tests are
passing for me, and it makes it easier on users-and I think chrome is using
x64 builds too. So let's go for it!
2009-09-02 20:19:52 +02:00
Ryan 82d986db24 Add limits.h to src/node.cc for PATH_MAX 2009-09-02 20:18:57 +02:00
Ryan 97ce138621 Upgrade V8 to 1.3.9 2009-09-02 11:13:46 +02:00
Ryan 78bb53b009 Set module.loaded=true for dll modules. 2009-09-01 15:43:56 +02:00
Ryan ed9c3362ee Remove --lib option since there is no more libnode 2009-09-01 15:28:10 +02:00
Ryan 8152f9cff2 Revert static library build.
Not necessary to build dll modules after all.
2009-09-01 14:15:29 +02:00
Michael Carter 8ea6adcae6 Feature: add node.cwd() to access the current working directory. 2009-09-01 11:39:30 +02:00
Ryan fbf65b58f9 Use Error exceptions where possible in net.cc and file.cc 2009-08-31 18:57:01 +02:00
Ryan 3862fdade4 Throw Error exceptions from node.dlopen() 2009-08-31 18:48:47 +02:00
Ryan afd9e714d3 Stack traces for mjsunit errors, better error reporting function.
The error reporting function tries to look at the "stack" element of the
exception.
2009-08-31 18:42:50 +02:00
Ryan 7beea2cd5f Upgrade evcom; Add setTimeout method to node.tcp.Connection
The default timeout is 60 seconds, but it can now be changed.

evcom upgrade includes fixes to force_close.
2009-08-31 18:26:50 +02:00
Ryan 18a1923604 Update test script to use new debug build's name: node_g 2009-08-31 16:12:27 +02:00
Ryan a97dce7523 Build static executable.
- Fix a few errors with node.dlopen()

- Report errors to stderr (this should probably be a separate commit, but
  whatever)
2009-08-31 11:45:44 +02:00
Ryan b73264d9b3 Add command line arguments for accessing build flags.
node --cflags
node --libs

At the expense of some WAF nastiness.
2009-08-27 16:08:47 +02:00
Ryan 4d92199d18 Add pkgconfig files to help with dll builds. 2009-08-27 16:08:47 +02:00
Ryan 2b6d72431b First attempt at node.dlopen
Compiled first working 'hello world' module with this config
2009-08-27 16:08:40 +02:00
Ryan 31db4f1ed8 bump version 2009-08-27 12:31:52 +02:00
Ryan 00a03dfee2 Fix text on index.html 2009-08-27 12:23:53 +02:00
Ryan ad9d683f9f API: rename node.Process to node.ChildProcess
This is to avoid confusion with the global "process" object, especially for
the instances of node.Process.
2009-08-26 22:36:45 +02:00
Ryan 116f4dea05 lint 2009-08-26 22:14:45 +02:00
Ryan 723c7d9f7c Replace onExit() with process.addListener("exit")
- Update documentation.

- Depreciation message for onExit().
2009-08-26 22:14:44 +02:00
Ryan 6025da2153 Introduce 'process' object. Also is the global object. 2009-08-26 22:14:44 +02:00
Ryan 31265be4a6 Depreciate onLoad 2009-08-26 22:14:44 +02:00
Ryan 79f121044c Synchronous module loading.
`include` and `require now` call `promise.wait` on their retrieval functions
making them synchronous.  Introduce `include_async` and `require_async` to
do asynchronous retrievals.

`include_async` and `require_async` need testing and documentation.

Update documentation for include, require().  I am mostly removing
information about onLoad(). onLoad is to be depreciated.
2009-08-26 22:14:01 +02:00
Ryan 7e7deed510 Add node.assert for internal debugging. 2009-08-26 18:02:13 +02:00
Ryan 18d0511777 promise.block() renamed to promise.wait()
promise.wait() now returns the arguments of the "success" event.  If there
was only a single argument, then it is returned.  If there was more than
one, they are returned as an array.  If there was an error, it is thrown.
See documentation.
2009-08-26 17:28:49 +02:00
Ryan 51addf19d8 Improve Promise documentation. 2009-08-26 11:25:53 +02:00
Ryan 8781b969e9 Modify website layout. 2009-08-26 11:25:10 +02:00
Ryan db42ad959d API: All EventEmitters emit "newListener" when listeners are added.
The "newListener" event will also be emitted for listeners to "newListener".
Maybe useful?
2009-08-25 17:28:06 +02:00
Ryan b5a1585470 Restyle website/api.html. Now looks like the front page.
Made a few other little corrections too.
2009-08-25 17:25:39 +02:00
Ryan b5b65ddcd7 Upgrade v8 to 1.3.7 2009-08-25 13:47:18 +02:00
Ryan b0a362a727 Fix coupling problems on OSX 2009-08-25 13:33:19 +02:00
Ryan aa664c8040 Add close() to coupling pump. Wasn't getting EOF. 2009-08-25 12:56:54 +02:00
Ryan 19f182a39f Experimental support for Promise.block() 2009-08-25 04:25:35 +02:00