Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream updates. #1

Merged
merged 18 commits into from
Jan 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ https://iojs.org/api/console.html

https://iojs.org/api/cluster.html

(**DETAILS TO BE ADDED HERE**)

- Updated `cluster` to use round-robin load balancing by default on non-Windows platforms. The scheduling policy is configurable however.
- `--debug` has been made cluster-aware.
- Many bug fixes.

### crypto

Expand Down
4 changes: 2 additions & 2 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ experience with the management of the io.js project. Membership is
expected to evolve over time according to the needs of the project.

For the current list of TC members, see the project
[README.md](./#current-project-team-members).
[README.md](./README.md#current-project-team-members).

## Collaborators

Expand Down Expand Up @@ -56,7 +56,7 @@ request or issue. The TC should serve as the final arbiter where
required.

For the current list of Collaborators, see the project
[README.md](./#current-project-team-members).
[README.md](./README.md#current-project-team-members).

A guide for Collaborators is maintained in
[COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md).
Expand Down
14 changes: 7 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
io.js is licensed for use as follows:

====

"""
Copyright io.js contributors. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -21,12 +20,12 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

===
"""

This license applies to parts of io.js originating from the
https://github.com/joyent/node repository:

"""
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
Expand All @@ -45,11 +44,12 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""

====
The io.js license applies to all parts of io.js that are not externally
maintained libraries.

This license applies to all parts of io.js that are not externally
maintained libraries. The externally maintained libraries used by io.js are:
The externally maintained libraries used by io.js are:

- V8, located at deps/v8. V8's license follows:
"""
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,7 @@ apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets

apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))

website_files = \
out/doc/sh_main.js \
out/doc/sh_javascript.min.js

doc: $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/ $(NODE_EXE)
doc: $(apidoc_dirs) $(apiassets) $(apidocs) tools/doc/ $(NODE_EXE)

$(apidoc_dirs):
mkdir -p $@
Expand Down
8 changes: 4 additions & 4 deletions benchmark/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Node.js core benchmark tests
# io.js core benchmark tests

This folder contains benchmark tests to measure the performance for certain
Node.js APIs.
io.js APIs.

## How to run tests

Expand All @@ -10,7 +10,7 @@ There are two ways to run benchmark tests:
1. Run all tests of a given type, for example, buffers

```sh
node benchmark/common.js buffers
iojs benchmark/common.js buffers
```

The above command will find all scripts under `buffers` directory and require
Expand Down Expand Up @@ -70,7 +70,7 @@ buffers/buffer-read.js noAssert=false buffer=fast type=UInt16BE millions=1: 244.
2. Run an individual test, for example, buffer-slice.js

```sh
node benchmark/buffers/buffer-read.js
iojs benchmark/buffers/buffer-read.js
```
The output:
```
Expand Down
2 changes: 1 addition & 1 deletion benchmark/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports.PORT = process.env.PORT || 12346;
if (module === require.main) {
var type = process.argv[2];
if (!type) {
console.error('usage:\n ./node benchmark/common.js <type>');
console.error('usage:\n ./iojs benchmark/common.js <type>');
process.exit(1);
}

Expand Down
6 changes: 3 additions & 3 deletions benchmark/http-flamegraph.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
cd "$(dirname "$(dirname $0)")"

node=${NODE:-./node}
node=${NODE:-./iojs}

name=${NAME:-stacks}

Expand All @@ -22,7 +22,7 @@ fi
ulimit -n 100000
$node benchmark/http_simple.js &
nodepid=$!
echo "node pid = $nodepid"
echo "iojs pid = $nodepid"
sleep 1

# has to stay alive until dtrace exits
Expand Down Expand Up @@ -62,7 +62,7 @@ echo 'Turn the stacks into a svg'
stackvis dtrace flamegraph-svg < "$name".src > "$name".raw.svg

echo 'Prune tiny stacks out of the graph'
node -e '
iojs -e '
var infile = process.argv[1];
var outfile = process.argv[2];
var output = "";
Expand Down
2 changes: 1 addition & 1 deletion benchmark/http.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [ "$k" = "no" ]; then
else
k="-k"
fi
node=${NODE:-./node}
node=${NODE:-./iojs}

$node benchmark/http_simple.js &
npid=$!
Expand Down
2 changes: 1 addition & 1 deletion benchmark/http_simple_bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [ ! -d benchmark/ ]; then
fi

if [ $SERVER == "127.0.0.1" ]; then
./node benchmark/http_simple.js &
./iojs benchmark/http_simple.js &
node_pid=$!
sleep 1
fi
Expand Down
2 changes: 1 addition & 1 deletion benchmark/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ab.load <- function (filename, name) {


filename <- args[0:1]
data <- ab.load(filename, "node")
data <- ab.load(filename, "iojs")


# histogram
Expand Down
1 change: 1 addition & 0 deletions deps/http_parser/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tags
test
test_g
test_fast
bench
url_parser
parsertrace
parsertrace_g
Expand Down
1 change: 1 addition & 0 deletions deps/http_parser/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Salman Haq <salman.haq@asti-usa.com>
Simon Zimmermann <simonz05@gmail.com>
Thomas LE ROUX <thomas@november-eleven.fr> LE ROUX Thomas <thomas@procheo.fr>
Thomas LE ROUX <thomas@november-eleven.fr> Thomas LE ROUX <thomas@procheo.fr>
Fedor Indutny <fedor@indutny.com>
2 changes: 1 addition & 1 deletion deps/http_parser/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ script:
notifications:
email: false
irc:
- "irc.freenode.net#libuv"
- "irc.freenode.net#node-ci"
15 changes: 14 additions & 1 deletion deps/http_parser/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,25 @@ BogDan Vatra <bogdan@kde.org>
Peter Faiman <peter@thepicard.org>
Corey Richardson <corey@octayn.net>
Tóth Tamás <tomika_nospam@freemail.hu>
Patrik Stutz <patrik.stutz@gmail.com>
Cam Swords <cam.swords@gmail.com>
Chris Dickinson <christopher.s.dickinson@gmail.com>
Uli Köhler <ukoehler@btronik.de>
Charlie Somerville <charlie@charliesomerville.com>
Patrik Stutz <patrik.stutz@gmail.com>
Fedor Indutny <fedor.indutny@gmail.com>
runner <runner.mei@gmail.com>
Alexis Campailla <alexis@janeasystems.com>
David Wragg <david@wragg.org>
Vinnie Falco <vinnie.falco@gmail.com>
Alex Butum <alexbutum@linux.com>
Rex Feng <rexfeng@gmail.com>
Alex Kocharin <alex@kocharin.ru>
Mark Koopman <markmontymark@yahoo.com>
Helge Heß <me@helgehess.eu>
Alexis La Goutte <alexis.lagoutte@gmail.com>
George Miroshnykov <george.miroshnykov@gmail.com>
Maciej Małecki <me@mmalecki.com>
Marc O'Morain <github.com@marcomorain.com>
Jeff Pinner <jpinner@twitter.com>
Timothy J Fontaine <tjfontaine@gmail.com>
Akagi201 <akagi201@gmail.com>
4 changes: 0 additions & 4 deletions deps/http_parser/CONTRIBUTIONS

This file was deleted.

13 changes: 12 additions & 1 deletion deps/http_parser/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,25 @@
# IN THE SOFTWARE.

PLATFORM ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"')
SONAME ?= libhttp_parser.so.2.3
SONAME ?= libhttp_parser.so.2.4.1

CC?=gcc
AR?=ar

CPPFLAGS ?=
LDFLAGS ?=

CPPFLAGS += -I.
CPPFLAGS_DEBUG = $(CPPFLAGS) -DHTTP_PARSER_STRICT=1
CPPFLAGS_DEBUG += $(CPPFLAGS_DEBUG_EXTRA)
CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSER_STRICT=0
CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA)
CPPFLAGS_BENCH = $(CPPFLAGS_FAST)

CFLAGS += -Wall -Wextra -Werror
CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA)
CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA)
CFLAGS_BENCH = $(CFLAGS_FAST) -Wno-unused-parameter
CFLAGS_LIB = $(CFLAGS_FAST) -fPIC

LDFLAGS_LIB = $(LDFLAGS) -shared
Expand Down Expand Up @@ -61,6 +66,12 @@ test_fast: http_parser.o test.o http_parser.h
test.o: test.c http_parser.h Makefile
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c test.c -o $@

bench: http_parser.o bench.o
$(CC) $(CFLAGS_BENCH) $(LDFLAGS) http_parser.o bench.o -o $@

bench.o: bench.c http_parser.h Makefile
$(CC) $(CPPFLAGS_BENCH) $(CFLAGS_BENCH) -c bench.c -o $@

http_parser.o: http_parser.c http_parser.h Makefile
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_FAST) -c http_parser.c

Expand Down
10 changes: 5 additions & 5 deletions deps/http_parser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if (recved < 0) {
}

/* Start up / continue the parser.
* Note we pass recved==0 to signal that EOF has been recieved.
* Note we pass recved==0 to signal that EOF has been received.
*/
nparsed = http_parser_execute(parser, &settings, buf, recved);

Expand All @@ -75,7 +75,7 @@ if (parser->upgrade) {
HTTP needs to know where the end of the stream is. For example, sometimes
servers send responses without Content-Length and expect the client to
consume input (for the body) until EOF. To tell http_parser about EOF, give
`0` as the forth parameter to `http_parser_execute()`. Callbacks and errors
`0` as the fourth parameter to `http_parser_execute()`. Callbacks and errors
can still be encountered during an EOF, so one must still be prepared
to receive them.

Expand Down Expand Up @@ -110,7 +110,7 @@ followed by non-HTTP data.
information the Web Socket protocol.)

To support this, the parser will treat this as a normal HTTP message without a
body. Issuing both on_headers_complete and on_message_complete callbacks. However
body, issuing both on_headers_complete and on_message_complete callbacks. However
http_parser_execute() will stop parsing at the end of the headers and return.

The user is expected to check if `parser->upgrade` has been set to 1 after
Expand All @@ -131,7 +131,7 @@ There are two types of callbacks:
* notification `typedef int (*http_cb) (http_parser*);`
Callbacks: on_message_begin, on_headers_complete, on_message_complete.
* data `typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);`
Callbacks: (requests only) on_uri,
Callbacks: (requests only) on_url,
(common) on_header_field, on_header_value, on_body;

Callbacks must return 0 on success. Returning a non-zero value indicates
Expand All @@ -145,7 +145,7 @@ buffer to avoid copying memory around if this fits your application.

Reading headers may be a tricky task if you read/parse headers partially.
Basically, you need to remember whether last header callback was field or value
and apply following logic:
and apply the following logic:

(on_header_field and on_header_value shortened to on_h_*)
------------------------ ------------ --------------------------------------------
Expand Down
Loading