platform/upstream/nodejs.git
14 years agoUgly fix for clang
Ryan Dahl [Sat, 9 Oct 2010 21:21:26 +0000 (14:21 -0700)]
Ugly fix for clang

14 years agoFix style
Ryan Dahl [Sat, 9 Oct 2010 19:48:22 +0000 (12:48 -0700)]
Fix style

14 years agoAdd flag to disable colors in REPL
Ryan Dahl [Sat, 9 Oct 2010 19:46:06 +0000 (12:46 -0700)]
Add flag to disable colors in REPL

14 years agoUse readline.columns in sys.inspect when possible
Ryan Dahl [Sat, 9 Oct 2010 19:40:15 +0000 (12:40 -0700)]
Use readline.columns in sys.inspect when possible

Though, this should probably be an option to sys.inspect and be set by REPL.

14 years agoCommas last in sys.inspect
Ryan Dahl [Sat, 9 Oct 2010 01:26:53 +0000 (18:26 -0700)]
Commas last in sys.inspect

Ugly? Yes. More readable by first time users? Yes.

14 years agoWarnings for new C++ buffer API
Ryan Dahl [Sat, 9 Oct 2010 19:15:14 +0000 (12:15 -0700)]
Warnings for new C++ buffer API

14 years agoadd $ to variable name character matching patterns in repl completer
Sean Coates [Sat, 9 Oct 2010 16:25:02 +0000 (12:25 -0400)]
add $ to variable name character matching patterns in repl completer

14 years agoAdd missing v8 file...
Ryan Dahl [Sat, 9 Oct 2010 07:56:37 +0000 (00:56 -0700)]
Add missing v8 file...

14 years agoAdd config.h for cygwin for libev and libeio
Ryan Dahl [Sat, 9 Oct 2010 07:55:51 +0000 (00:55 -0700)]
Add config.h for cygwin for libev and libeio

14 years agoexpose parsers freelist
Ryan Dahl [Thu, 7 Oct 2010 23:17:06 +0000 (16:17 -0700)]
expose parsers freelist

14 years agoadd require.cache
Ryan Dahl [Thu, 7 Oct 2010 16:58:08 +0000 (09:58 -0700)]
add require.cache

14 years agosyntax fixes to pass jslint
Joshaven Potter [Thu, 7 Oct 2010 03:05:23 +0000 (23:05 -0400)]
syntax fixes to pass jslint

14 years agoAdded -e, --eval
TJ Holowaychuk [Thu, 7 Oct 2010 02:05:01 +0000 (19:05 -0700)]
Added -e, --eval

14 years ago#define HAVE_FDATASYNC 0 for darwin; 10.5 is missing it
Ryan Dahl [Tue, 5 Oct 2010 06:22:53 +0000 (23:22 -0700)]
#define HAVE_FDATASYNC 0 for darwin; 10.5 is missing it

14 years agoUpgrade V8 to 2.4.8
Ryan Dahl [Tue, 5 Oct 2010 22:25:07 +0000 (15:25 -0700)]
Upgrade V8 to 2.4.8

14 years agoClearWeak on ObjectWraps. I /think/ this is the correct semantics
Ryan Dahl [Mon, 4 Oct 2010 19:52:46 +0000 (12:52 -0700)]
ClearWeak on ObjectWraps. I /think/ this is the correct semantics

14 years agoFix #325. Add test and check for zero-length file contents in fs.readFileSync
isaacs [Mon, 4 Oct 2010 19:22:59 +0000 (12:22 -0700)]
Fix #325. Add test and check for zero-length file contents in fs.readFileSync

14 years agolib/http.js - nested loop stepping on variables of outer loop
Ryan Dahl [Mon, 4 Oct 2010 17:50:35 +0000 (10:50 -0700)]
lib/http.js - nested loop stepping on variables of outer loop

Fixes #318.

14 years agolibev, libeio config.h files don't depend on arch
Ryan Dahl [Sat, 2 Oct 2010 22:07:54 +0000 (15:07 -0700)]
libev, libeio config.h files don't depend on arch

14 years agolibev libeio: added freebsd-x86 config headers
David Siegel [Sat, 25 Sep 2010 09:13:11 +0000 (11:13 +0200)]
libev libeio: added freebsd-x86 config headers

14 years agoSimpler libev and libeio config
Ryan Dahl [Fri, 1 Oct 2010 02:55:28 +0000 (19:55 -0700)]
Simpler libev and libeio config

14 years agoReport "weird" errors a little better.
isaacs [Sat, 2 Oct 2010 06:22:34 +0000 (23:22 -0700)]
Report "weird" errors a little better.

There are a few kinds of errors that are very confusing.
1. Errors raised in nextTick
2. Errors emitted on the "error" event
3. RangeErrors that crash the program (or anything without a stack trace)

Long traces will make make these better, of course.  In the meantime, this
adds a few handy signposts (in the form of better error reporting and
comments on the otherwise inscrutable code printed to the terminal) that can
help new users find the cause, or at least, ask for help more effectively.

14 years agoAdd support for handling Expect: 100-continue
Mark Nottingham [Fri, 10 Sep 2010 01:56:35 +0000 (11:56 +1000)]
Add support for handling Expect: 100-continue

HTTP/1.1 requests, either with an event (check_continue) or automatically, if no event handler is present.

Add client-side expect/continue support, tests.

Expound upon client requirements for expect/continue.

14 years agofix encoding option on ReadStream, updated test
Marco Rogers [Mon, 27 Sep 2010 17:34:16 +0000 (13:34 -0400)]
fix encoding option on ReadStream, updated test

14 years agoUpgrade V8 to 2.4.7
Ryan Dahl [Fri, 1 Oct 2010 21:18:59 +0000 (14:18 -0700)]
Upgrade V8 to 2.4.7

14 years agoFix REPL crash on tabbing 'this.'
Ryan Dahl [Fri, 1 Oct 2010 18:31:02 +0000 (11:31 -0700)]
Fix REPL crash on tabbing 'this.'

Thanks to Tim Becker for pointing this out.

14 years agoDrop reference to timer callback on clearTimeout
Ryan Dahl [Fri, 1 Oct 2010 18:01:43 +0000 (11:01 -0700)]
Drop reference to timer callback on clearTimeout

Reported here:
http://groups.google.com/group/nodejs-dev/browse_thread/thread/9e063d0938f99879

Would be good to test this somehow...

14 years agofs.ReadStream: Passing null for file position on all reads except the first read...
Evan Larkin [Mon, 27 Sep 2010 03:31:09 +0000 (22:31 -0500)]
fs.ReadStream: Passing null for file position on all reads except the first read of a range read.

14 years agoFix zero length buffer bug for http res.end()
Ryan Dahl [Fri, 1 Oct 2010 00:12:56 +0000 (17:12 -0700)]
Fix zero length buffer bug for http res.end()

Reported by Kadir Pekel <kadirpekel@gmail.com>

14 years agoConsume HTTP trailing headers
Mark Nottingham [Wed, 29 Sep 2010 09:38:48 +0000 (19:38 +1000)]
Consume HTTP trailing headers

14 years agoNo longer using the global variable "stat" in unwatchFile
Evan Larkin [Sun, 26 Sep 2010 16:36:40 +0000 (11:36 -0500)]
No longer using the global variable "stat" in unwatchFile

14 years agoRemove unused function
Ryan Dahl [Thu, 30 Sep 2010 19:20:33 +0000 (12:20 -0700)]
Remove unused function

14 years agoSimplify: per-module cache thing
Ryan Dahl [Thu, 30 Sep 2010 19:16:48 +0000 (12:16 -0700)]
Simplify: per-module cache thing

14 years agoAdd test for getting parse error from HTTP client
Ryan Dahl [Thu, 30 Sep 2010 18:45:27 +0000 (11:45 -0700)]
Add test for getting parse error from HTTP client

Made this test in response to this thread:
http://groups.google.com/group/nodejs/browse_thread/thread/f82835007a277de2/
But Node appears to be working correctly.

14 years agoMove the http client's initParser() into prototype
Ryan Dahl [Thu, 30 Sep 2010 18:41:50 +0000 (11:41 -0700)]
Move the http client's initParser() into prototype

14 years agowriteable -> writable
Ryan Dahl [Wed, 29 Sep 2010 23:11:00 +0000 (16:11 -0700)]
writeable -> writable

14 years agoSafe constructor for ObjectWrapped classes
Ben Noordhuis [Fri, 24 Sep 2010 15:02:08 +0000 (17:02 +0200)]
Safe constructor for ObjectWrapped classes

New() methods should be invoked as constructors, not regular functions.
Corner cases like Script::New() may cause a SIGSEGV when the GC is run.

More details: http://groups.google.com/group/nodejs/browse_thread/thread/a7e5db68d4cd6356

14 years agoFix style in node_crypto.cc
Ryan Dahl [Tue, 28 Sep 2010 18:42:47 +0000 (11:42 -0700)]
Fix style in node_crypto.cc

14 years agoRename some SecureStream methods
Ryan Dahl [Tue, 28 Sep 2010 18:38:27 +0000 (11:38 -0700)]
Rename some SecureStream methods

14 years agolazy load crypto binding
Ryan Dahl [Tue, 28 Sep 2010 18:14:24 +0000 (11:14 -0700)]
lazy load crypto binding

14 years agofix style in net.js
Ryan Dahl [Tue, 28 Sep 2010 18:05:10 +0000 (11:05 -0700)]
fix style in net.js

14 years agoPut preprocessor defines into CPPFLAGS not compile flags...
Ryan Dahl [Tue, 28 Sep 2010 10:17:44 +0000 (03:17 -0700)]
Put preprocessor defines into CPPFLAGS not compile flags...

14 years agoDisable a few more libev features
Ryan Dahl [Tue, 28 Sep 2010 10:08:00 +0000 (03:08 -0700)]
Disable a few more libev features

14 years agoRemove require('buffer') in built-in libraries.
Ryan Dahl [Tue, 28 Sep 2010 09:31:31 +0000 (02:31 -0700)]
Remove require('buffer') in built-in libraries.

14 years agoquicker loops
Aaron Heckmann [Thu, 23 Sep 2010 12:14:16 +0000 (08:14 -0400)]
quicker loops

14 years agooutput time of function calls
Ryan Dahl [Tue, 28 Sep 2010 08:14:38 +0000 (01:14 -0700)]
output time of function calls

14 years agoFix timing on I/O benchmark
Ryan Dahl [Fri, 24 Sep 2010 09:21:17 +0000 (11:21 +0200)]
Fix timing on I/O benchmark

14 years agoAdd function_call benchmark
Ryan Dahl [Fri, 24 Sep 2010 02:55:26 +0000 (19:55 -0700)]
Add function_call benchmark

14 years agoFixed 'upgrade' event for httpclient
Fedor Indutny [Wed, 22 Sep 2010 12:51:53 +0000 (19:51 +0700)]
Fixed 'upgrade' event for httpclient

onend and ondata was cleaning on parser end

14 years agoDon't use stat in fs.readFile[Sync]
isaacs [Thu, 23 Sep 2010 00:58:08 +0000 (17:58 -0700)]
Don't use stat in fs.readFile[Sync]

Original patch c/o Evan Larkin <evan.larkin.iit@gmail.com>

14 years agoRevert "Upgrade V8 to 2.4.5"
Ryan Dahl [Wed, 22 Sep 2010 18:14:58 +0000 (11:14 -0700)]
Revert "Upgrade V8 to 2.4.5"

This reverts commit e2274412488ab310decb8494ab41009342b3c2f6.

Build fails on mac

14 years agoFixed fs.ReadStream() start: 0 bug
Tj Holowaychuk [Wed, 22 Sep 2010 17:11:37 +0000 (10:11 -0700)]
Fixed fs.ReadStream() start: 0 bug

14 years agoUpgrade V8 to 2.4.5
Ryan Dahl [Wed, 22 Sep 2010 17:21:15 +0000 (10:21 -0700)]
Upgrade V8 to 2.4.5

14 years agoHTTP: close connection on connection:close header.
Mikeal Rogers [Wed, 22 Sep 2010 17:16:18 +0000 (10:16 -0700)]
HTTP: close connection on connection:close header.

rnewson found a good bug in keep-alive. we were only using the request
headers we send to enable/disable keep-alive but when the server sends
Connection: close we need to close down the connection regardless.

I wrote up a patch the Robert verified makes all his test client code work
now and I also added a new unittest for it.

14 years agoDon't try to run extension loaders unless they're actually functions
isaacs [Tue, 21 Sep 2010 23:51:55 +0000 (16:51 -0700)]
Don't try to run extension loaders unless they're actually functions

14 years agoDon't choose jobs based on processor
Ryan Dahl [Mon, 20 Sep 2010 23:51:47 +0000 (16:51 -0700)]
Don't choose jobs based on processor

Leads to lots of builds with out-of-memory.

14 years agoMore explicit openssl configure warning
Ryan Dahl [Mon, 20 Sep 2010 19:52:07 +0000 (12:52 -0700)]
More explicit openssl configure warning

14 years agoFix test/message/undefined_reference_in_new_context
Ryan Dahl [Mon, 20 Sep 2010 17:03:50 +0000 (10:03 -0700)]
Fix test/message/undefined_reference_in_new_context

14 years agoRemove registerExtension, add .extensions. Tests.
Tim-Smart [Mon, 20 Sep 2010 01:50:26 +0000 (13:50 +1200)]
Remove registerExtension, add .extensions. Tests.

Updated extensions tests

14 years agosys.js: --needless Object.keys() --needless .map() in a single patch
Jorge Chamorro Bieling [Sun, 19 Sep 2010 08:05:01 +0000 (10:05 +0200)]
sys.js: --needless Object.keys() --needless .map() in a single patch

14 years agoTag release versions in 'process.version'
Ryan Dahl [Mon, 20 Sep 2010 00:22:18 +0000 (17:22 -0700)]
Tag release versions in 'process.version'

14 years agoRemove require.async
isaacs [Sun, 19 Sep 2010 23:00:46 +0000 (16:00 -0700)]
Remove require.async

This patch removes require.async from nodejs.

1. It complicated the code unnecessarily.
2. Everyone uses sync require anyway.
3. It's got a lot of weird edge cases when mixed with sync require.
4. It is many months behind the commonjs spec anyhow.

14 years agoFatal error out if OpenSSL was not explicitly disabled, we just couldn't autodetect it.
Paul Querna [Sun, 19 Sep 2010 22:20:35 +0000 (15:20 -0700)]
Fatal error out if OpenSSL was not explicitly disabled, we just couldn't autodetect it.

14 years agoForgot to include node_main.cc
Ryan Dahl [Sun, 19 Sep 2010 21:25:13 +0000 (14:25 -0700)]
Forgot to include node_main.cc

14 years agosys.js: sys.inspect: show function names
Jorge Chamorro Bieling [Sun, 19 Sep 2010 19:54:41 +0000 (21:54 +0200)]
sys.js: sys.inspect: show function names

14 years agoUpdate TODO
Ryan Dahl [Sun, 19 Sep 2010 20:32:46 +0000 (13:32 -0700)]
Update TODO

14 years agoAdd node::Start()
Ryan Dahl [Sun, 19 Sep 2010 20:13:57 +0000 (13:13 -0700)]
Add node::Start()

first step towards building a libnode.a

14 years agoPass correct message in HTTP client upgrade
Ryan Dahl [Sun, 19 Sep 2010 18:53:32 +0000 (11:53 -0700)]
Pass correct message in HTTP client upgrade

Simplify and correct test.

Fix by Fedor Indutny.

14 years agoRevert requireNative changes: 4e6b9b0, d429033, 6abbfa0, bcad540
Ryan Dahl [Sun, 19 Sep 2010 18:20:25 +0000 (11:20 -0700)]
Revert requireNative changes: 4e6b9b0, d429033, 6abbfa0, bcad540

The REPL needs the full require(); add test for that behavior.

14 years agoRemove process._byteLength
Ryan Dahl [Fri, 17 Sep 2010 08:06:44 +0000 (01:06 -0700)]
Remove process._byteLength

14 years agoRemove process.evalcx
Ryan Dahl [Fri, 17 Sep 2010 07:23:17 +0000 (00:23 -0700)]
Remove process.evalcx

14 years agoMove IOWatcher and Timer to process.binding
Ryan Dahl [Fri, 17 Sep 2010 07:15:44 +0000 (00:15 -0700)]
Move IOWatcher and Timer to process.binding

14 years agoFinally remove process.unloop
Ryan Dahl [Fri, 17 Sep 2010 07:03:17 +0000 (00:03 -0700)]
Finally remove process.unloop

14 years agoRemove process.global
Ryan Dahl [Fri, 17 Sep 2010 07:01:07 +0000 (00:01 -0700)]
Remove process.global

14 years agoAdd require('constants')
Ryan Dahl [Fri, 17 Sep 2010 06:22:58 +0000 (23:22 -0700)]
Add require('constants')

14 years agoAdd TODO item
Ryan Dahl [Fri, 17 Sep 2010 06:16:36 +0000 (23:16 -0700)]
Add TODO item

14 years agoMove constants out of process object
Ryan Dahl [Fri, 17 Sep 2010 06:13:03 +0000 (23:13 -0700)]
Move constants out of process object

14 years agoAdd items to TODO
Ryan Dahl [Fri, 17 Sep 2010 05:22:38 +0000 (22:22 -0700)]
Add items to TODO

14 years agoUpgrade V8 to 2.4.4
Ryan Dahl [Fri, 17 Sep 2010 04:33:32 +0000 (21:33 -0700)]
Upgrade V8 to 2.4.4

14 years ago^c to get out of '...' in REPL
Ryan Dahl [Fri, 17 Sep 2010 04:07:22 +0000 (21:07 -0700)]
^c to get out of '...' in REPL

14 years agoSimplify REPL
Ryan Dahl [Fri, 17 Sep 2010 03:50:56 +0000 (20:50 -0700)]
Simplify REPL

14 years agoSafe constructors for fs.ReadStream and fs.WriteStream
Ryan Dahl [Fri, 17 Sep 2010 02:04:09 +0000 (19:04 -0700)]
Safe constructors for fs.ReadStream and fs.WriteStream

14 years agoRemove old versions of fs.read and fs.write from docs
Ryan Dahl [Fri, 17 Sep 2010 01:51:50 +0000 (18:51 -0700)]
Remove old versions of fs.read and fs.write from docs

14 years agoUse the Apple recommended way of detecting OSX Versions
Paul Querna [Thu, 16 Sep 2010 22:27:25 +0000 (15:27 -0700)]
Use the Apple recommended way of detecting OSX Versions

to enable KQueue, rather than deciding based on the compiler version.

14 years agoMove dns.isIP to net.isIP
Paul Querna [Thu, 16 Sep 2010 21:58:04 +0000 (14:58 -0700)]
Move dns.isIP to net.isIP

Add tests and docs.

14 years agoRemove deprecation warnings in net module
Ryan Dahl [Thu, 16 Sep 2010 21:59:55 +0000 (14:59 -0700)]
Remove deprecation warnings in net module

14 years agoRemove deprecation warnings in http module
Ryan Dahl [Thu, 16 Sep 2010 21:49:12 +0000 (14:49 -0700)]
Remove deprecation warnings in http module

14 years agoHandle writeStream errors in sys.pump
Ryan Dahl [Thu, 16 Sep 2010 21:40:41 +0000 (14:40 -0700)]
Handle writeStream errors in sys.pump

14 years agoCommon subexpression in emit.
Herbert Vojčík [Thu, 16 Sep 2010 11:08:09 +0000 (13:08 +0200)]
Common subexpression in emit.

14 years agoNo need to do if (internalModuleCache...), it's in requireNative.
Herbert Vojčík [Thu, 16 Sep 2010 12:30:08 +0000 (14:30 +0200)]
No need to do if (internalModuleCache...), it's in requireNative.

14 years agoModule system moved to the bottom, where only is it needed.
Herbert Vojčík [Thu, 16 Sep 2010 12:04:37 +0000 (14:04 +0200)]
Module system moved to the bottom, where only is it needed.

(this also splits the file into upper "setup" and lower "startup" sections)

14 years agom.id unneccessary, id is enough.
Herbert Vojčík [Thu, 16 Sep 2010 11:53:45 +0000 (13:53 +0200)]
m.id unneccessary, id is enough.

14 years agoNatives having their own self-contained minimalistic module system.
Herbert Vojčík [Wed, 15 Sep 2010 22:16:57 +0000 (00:16 +0200)]
Natives having their own self-contained minimalistic module system.

The main system is built upon this, and is optional, if only natives
are used in application (eg. node-core).

Natives not loaded into own context if NODE_MODULE_CONTEXTS=1.
This have its inner logic, if natives are seen just as lazy-loaded
parts of the core.

14 years agoRemove a few old deprecation warnings
Ryan Dahl [Wed, 15 Sep 2010 23:17:11 +0000 (16:17 -0700)]
Remove a few old deprecation warnings

14 years agoSend multiple header lines in ServerResponse#writeHead when header values are arrays
Sam Stephenson [Wed, 15 Sep 2010 14:52:23 +0000 (09:52 -0500)]
Send multiple header lines in ServerResponse#writeHead when header values are arrays

14 years agoshorten some lines in events.js
Ryan Dahl [Wed, 15 Sep 2010 22:47:28 +0000 (15:47 -0700)]
shorten some lines in events.js

14 years agoOptimize emit for two arguments
Ryan Dahl [Wed, 15 Sep 2010 22:20:04 +0000 (15:20 -0700)]
Optimize emit for two arguments

14 years agoMake a list of known globals
Ryan Dahl [Wed, 15 Sep 2010 06:02:48 +0000 (23:02 -0700)]
Make a list of known globals

And fix missing var!

It would be good to get this script running at the end of every test, so we
know that modules aren't leaking either - but it will require a lot
modification of the tests so that they themselves aren't leaking globals.

14 years agoDefault value for second arg of Buffer#slice
Ryan Dahl [Tue, 14 Sep 2010 22:39:27 +0000 (15:39 -0700)]
Default value for second arg of Buffer#slice

14 years agoSupport for outgoing HTTP trailing headers
Mark Nottingham [Thu, 9 Sep 2010 06:29:35 +0000 (16:29 +1000)]
Support for outgoing HTTP trailing headers