Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Sync to nodejs/master (2016-05-05) #69

Merged
merged 85 commits into from
May 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
89164a0
benchmark: Fix crash in net benchmarks
Apr 27, 2016
be54989
build: exclude tap files from tarballs
mscdex Apr 22, 2016
153b796
doc: update build instructions for OS X
Trott Apr 20, 2016
296bfd2
crypto: fix error in deprecation message
Trott Apr 22, 2016
8f56958
test,tools: adjust function argument alignment
Trott Apr 26, 2016
ded3aea
tools: lint for function argument alignment
Trott Apr 19, 2016
2e845f8
tools: add tests for the doctool
iankronquist Apr 3, 2016
6c49714
test,tools: limit lint tolerance of gc global
Trott Apr 21, 2016
a5012a0
build: unbreak -prof, disable PIE on OS X
bnoordhuis Apr 28, 2016
c8e137b
tools: remove default parameters from lint rule
Trott Apr 27, 2016
44a4032
src: unify implementations of Utf8Value etc.
addaleax Apr 23, 2016
739f228
doc: better example & synopsis
Fishrock123 Apr 12, 2016
f11eee7
doc: no Node.js(1)
Fishrock123 Apr 12, 2016
0a34726
doc: subdivide TOC, add auxiliary links
Fishrock123 Apr 12, 2016
1264cec
tools: fix exit code when linting from CI
mscdex Apr 27, 2016
b8f035b
doc: fix v6 changelog
jasnell Apr 28, 2016
706778a
events: pass the original listener added by once
DavidCai1111 Apr 29, 2016
52cb410
process: add process.cpuUsage() - implementation, doc, tests
Apr 5, 2016
c2bbfe2
doc: expand documentation for process.exit()
jasnell Apr 27, 2016
d3aafd0
assert: allow circular references
Trott Apr 27, 2016
541965f
doc: added note warning about change to console.endTime()
ben-page Apr 28, 2016
8190359
doc: Remove extra space in REPL example
Apr 28, 2016
4b0dda0
doc: fix incorrect syntax in examples
evanlucas Apr 29, 2016
c1f2df9
doc: fix EventEmitter#eventNames() example
ChALkeR Apr 27, 2016
62c31fe
build: use shorthand lint target from test
jbergstroem Apr 27, 2016
bcce05d
doc: make `writable.setDefaultEncoding()` return `this`
estliberitas Apr 30, 2016
7fdffb6
doc: remove all scrollbar styling
claudiorodriguez Apr 29, 2016
f1cd33c
doc: use `Node.js` in synopsis document
Trott Apr 29, 2016
a45ab97
doc: clarifies http.serverResponse implementation
AllenSH12 Apr 6, 2016
563c9f8
doc: extra clarification of historySize option
vsemozhetbyt Apr 26, 2016
cebd525
doc: fix fs.realpath man pg links
phette23 Apr 28, 2016
81aef8c
doc: fix a typo in __dirname section
toyota790 Apr 29, 2016
d09c972
doc: remove obsolete comment in isError() example
cjihrig Apr 30, 2016
9f8d0ea
doc: fix sentence fragment in fs doc
Trott Apr 30, 2016
fa542eb
test: add failing url parse tests as known_issue
jasnell Mar 24, 2016
628ae25
test: make addon testing part of `make test`
bnoordhuis Apr 15, 2016
8a87b29
readline: remove deprecated methods
cjihrig Apr 27, 2016
d2eb935
debugger: display array contents in repl
cjihrig Apr 28, 2016
1ab5b4e
test: refactor large event emitter tests
cjihrig Apr 28, 2016
8ebec08
doc: ensure consistent grammar in node.1 file
justshiv Apr 27, 2016
db3db07
tools: add -F flag for fixing lint issues
Trott Apr 29, 2016
4e905fa
cluster: remove use of bind() in destroy()
yorkie May 1, 2016
eb12f93
doc: add missing underscore for markdown italics
May 2, 2016
ba6196f
util: fix inspecting of proxy objects
jasnell Apr 29, 2016
8637c27
doc: fix the lint of an example in cluster.md
yorkie May 2, 2016
51e7bc8
doc: linkify remaining references to fs.Stats object
Apr 30, 2016
2aa3769
doc: adds 'close' events to fs.ReadStream and fs.WriteStream
May 1, 2016
a2e5719
util: truncate inspect array and typed array
jasnell Apr 21, 2016
63f090f
deps: copy all openssl header files to include dir
May 3, 2016
70acd47
deps: fix openssl assembly error on ia32 win32
indutny Jan 8, 2014
4e4a4e1
deps: fix asm build error of openssl in x86_win32
Feb 13, 2015
f136f72
openssl: fix keypress requirement in apps on win32
Feb 17, 2015
e673a93
deps: add -no_rand_screen to openssl s_client
May 27, 2015
70ae031
deps: update openssl asm and asm_obsolete files
May 3, 2016
be480b1
test: fix alpn tests for openssl1.0.2h
May 3, 2016
96198d5
deps: backport IsValid changes from 4e8736d in V8
targos May 3, 2016
59c8e46
deps: upgrade openssl sources to 1.0.2h
May 3, 2016
b72d048
repl: create history file with mode 0600
XeCycle Oct 16, 2015
52f85be
src: add O_NOATIME constant
Trott Apr 30, 2016
1027b94
lib,test: update in preparation for linter update
Trott May 1, 2016
7a8dd69
tools: update ESLint to 2.9.0
Trott May 1, 2016
fc66e55
test: avoid test-cluster-master-* flakiness
stefanmb May 2, 2016
5defa0c
buffer: fix needle length misestimation for UCS2
addaleax May 2, 2016
4d49bcb
buffer: fix UCS2 indexOf for odd buffer length
addaleax May 2, 2016
bfe645d
src: fix FindFirstCharacter argument alignment
addaleax May 3, 2016
55b975d
buffer: fix lastIndexOf crash for overlong needle
addaleax May 2, 2016
bc8b525
buffer: fix lastIndexOf index underflow issue
addaleax May 3, 2016
cd752e8
intl: Don't crash if v8BreakIterator not available
srl295 Apr 16, 2016
b261178
src: remove pre-openssl 1.0 legacy code
bnoordhuis May 4, 2016
6db772d
src: remove unused #include statement
bnoordhuis May 4, 2016
f6940df
src: don't use locale-sensitive strcasecmp()
bnoordhuis May 4, 2016
a4f94b4
deps: update comment about PURIFY define
bnoordhuis May 4, 2016
2bbd1cd
deps: Intl: Check in "small-icu" 57.1
srl295 Apr 9, 2016
03a8637
tools: Check in tools for shrinking ICU size, change default to small…
srl295 Apr 9, 2016
3ff54bd
deps: Intl: ICU 57 bump
srl295 Apr 9, 2016
020968d
tools: add mock-y js-yaml dependency to doctool
addaleax May 1, 2016
015f4fd
tools: parse documentation metadata
tflanagan Nov 14, 2015
1b365f6
test,tools: test yaml parsing of doctool
addaleax Apr 30, 2016
00ffa33
tools: allow multiple added: version entries
addaleax Apr 30, 2016
4dcc692
doc: add `added:` information for buffer
addaleax May 1, 2016
330ea76
test: unmark test-http-regr-gh-2928 as flaky
Trott May 3, 2016
e6b35f4
crypto: disable ssl compression at build time
bnoordhuis May 4, 2016
ca75446
Merge branch 'nodejs/master' into chakracore-master
kunalspathak May 5, 2016
7c88be6
deps: added chakrashim apis for Proxy
kunalspathak May 9, 2016
574b01e
test: fixed test case after merge
kunalspathak May 9, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ rules:
prefer-const: 2

# Custom rules in tools/eslint-rules
align-function-arguments: 2
align-multiline-assignment: 2
assert-fail-single-argument: 2
new-with-error: [2, "Error", "RangeError", "TypeError", "SyntaxError", "ReferenceError"]
Expand Down
57 changes: 26 additions & 31 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,25 @@ If you consistently can reproduce a test failure, search for it in the
file a new issue.


### Unix / Macintosh
### Unix / OS X

Prerequisites:

* `gcc` and `g++` 4.8 or newer, or
* `clang` and `clang++` 3.4 or newer
* Python 2.6 or 2.7
* GNU Make 3.81 or newer

On OS X, you will also need:
* [Xcode](https://developer.apple.com/xcode/download/)
* You also need to install the `Command Line Tools` via Xcode. You can find
this under the menu `Xcode -> Preferences -> Downloads`
* This step will install `gcc` and the related toolchain containing `make`

On FreeBSD and OpenBSD, you may also need:
* libexecinfo (FreeBSD and OpenBSD only)


```text
$ ./configure
$ make
Expand Down Expand Up @@ -108,29 +117,14 @@ $ make

### `Intl` (ECMA-402) support:

[Intl](https://github.com/nodejs/node/wiki/Intl) support is not
enabled by default.


#### "small" (English only) support

This option will build with "small" (English only) support, but
the full `Intl` (ECMA-402) APIs. With `--download=all` it will
download the ICU library as needed.

##### Unix / Macintosh:
[Intl](https://github.com/nodejs/node/wiki/Intl) support is
enabled by default, with English data only.

```text
$ ./configure --with-intl=small-icu --download=all
```

##### Windows:

```text
> vcbuild small-icu download-all
```
#### Default: `small-icu` (English only) support

The `small-icu` mode builds with English-only data. You can add full
By default, only English data is included, but
the full `Intl` (ECMA-402) APIs. It does not need to download
any dependencies to function. You can add full
data at runtime.

*Note:* more docs are on
Expand All @@ -139,9 +133,10 @@ data at runtime.
#### Build with full ICU support (all locales supported by ICU):

With the `--download=all`, this may download ICU if you don't have an
ICU in `deps/icu`.
ICU in `deps/icu`. (The embedded `small-icu` included in the default
Node.js source does not include all locales.)

##### Unix / Macintosh:
##### Unix / OS X:

```text
$ ./configure --with-intl=full-icu --download=all
Expand All @@ -155,22 +150,22 @@ $ ./configure --with-intl=full-icu --download=all

#### Building without Intl support

The `Intl` object will not be available. This is the default at
present, so this option is not normally needed.
The `Intl` object will not be available, nor some other APIs such as
`String.normalize`.

##### Unix / Macintosh:
##### Unix / OS X:

```text
$ ./configure --with-intl=none
$ ./configure --without-intl
```

##### Windows:

```text
> vcbuild intl-none
> vcbuild without-intl
```

#### Use existing installed ICU (Unix / Macintosh only):
#### Use existing installed ICU (Unix / OS X only):

```text
$ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
Expand All @@ -186,7 +181,7 @@ You can find other ICU releases at
Download the file named something like `icu4c-**##.#**-src.tgz` (or
`.zip`).

##### Unix / Macintosh
##### Unix / OS X

```text
# from an already-unpacked ICU:
Expand Down
226 changes: 165 additions & 61 deletions CHANGELOG.md

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ v8:
tools/make-v8.sh v8
$(MAKE) -C deps/v8 $(V8_ARCH) $(V8_BUILD_OPTIONS)

test: | cctest # Depends on 'all'.
$(PYTHON) tools/test.py --mode=release message parallel sequential -J
$(MAKE) jslint
$(MAKE) cpplint
test: | build-addons cctest # Both targets depend on 'all'.
$(PYTHON) tools/test.py --mode=release -J \
addon doctool message parallel sequential
$(MAKE) lint

test-parallel: all
$(PYTHON) tools/test.py --mode=release parallel -J
Expand All @@ -141,7 +141,10 @@ ADDONS_BINDING_GYPS := \
$(wildcard test/addons/*/binding.gyp))

# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) | test/addons/.docbuildstamp
test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) \
deps/uv/include/*.h deps/v8/include/*.h \
src/node.h src/node_buffer.h src/node_object_wrap.h \
| test/addons/.docbuildstamp
# Cannot use $(wildcard test/addons/*/) here, it's evaluated before
# embedded addons have been generated from the documentation.
for dirname in test/addons/*/; do \
Expand Down Expand Up @@ -173,7 +176,7 @@ test-all-valgrind: test-build
test-ci: | build-addons
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=release --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) addons message parallel sequential
$(TEST_CI_ARGS) addons doctool message parallel sequential

test-release: test-build
$(PYTHON) tools/test.py --mode=release
Expand Down Expand Up @@ -455,6 +458,7 @@ $(TARBALL): release-only $(NODE_EXE) doc
rm -rf $(TARNAME)/.{editorconfig,git*,mailmap}
rm -rf $(TARNAME)/tools/{eslint,eslint-rules,osx-pkg.pmdoc,pkgsrc}
rm -rf $(TARNAME)/tools/{osx-*,license-builder.sh,cpplint.py}
rm -rf $(TARNAME)/test*.tap
find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs rm
find $(TARNAME)/ -type l | xargs rm # annoying on windows
tar -cf $(TARNAME).tar $(TARNAME)
Expand Down
1 change: 1 addition & 0 deletions benchmark/net/net-c2s-cork.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Writer.prototype.write = function(chunk, encoding, cb) {
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Writer.prototype.prependListener = function() {};

function server() {
var writer = new Writer();
Expand Down
1 change: 1 addition & 0 deletions benchmark/net/net-c2s.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Writer.prototype.write = function(chunk, encoding, cb) {
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Writer.prototype.prependListener = function() {};


function Reader() {
Expand Down
1 change: 1 addition & 0 deletions benchmark/net/net-pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Writer.prototype.write = function(chunk, encoding, cb) {
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Writer.prototype.prependListener = function() {};


function Reader() {
Expand Down
1 change: 1 addition & 0 deletions benchmark/net/net-s2c.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Writer.prototype.write = function(chunk, encoding, cb) {
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Writer.prototype.prependListener = function() {};


function Reader() {
Expand Down
44 changes: 44 additions & 0 deletions benchmark/util/inspect-proxy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
'use strict';

const util = require('util');
const common = require('../common.js');

const bench = common.createBenchmark(main, {
v: [1, 2],
n: [1e6]
});

function twoDifferentProxies(n) {
// This one should be slower between we're looking up multiple proxies.
const proxyA = new Proxy({}, {get: () => {}});
const proxyB = new Proxy({}, {get: () => {}});
bench.start();
for (var i = 0; i < n; i += 1)
util.inspect({a: proxyA, b: proxyB}, {showProxy: true});
bench.end(n);
}

function oneProxy(n) {
// This one should be a bit faster because of the internal caching.
const proxy = new Proxy({}, {get: () => {}});
bench.start();
for (var i = 0; i < n; i += 1)
util.inspect({a: proxy, b: proxy}, {showProxy: true});
bench.end(n);
}

function main(conf) {
const n = conf.n | 0;
const v = conf.v | 0;

switch (v) {
case 1:
oneProxy(n);
break;
case 2:
twoDifferentProxies(n);
break;
default:
throw new Error('Should not get to here');
}
}
7 changes: 6 additions & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,12 @@
},
'target_conditions': [
['_type!="static_library"', {
'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
'xcode_settings': {
'OTHER_LDFLAGS': [
'-Wl,-no_pie',
'-Wl,-search_paths_first',
],
},
}],
],
'conditions': [
Expand Down
62 changes: 49 additions & 13 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -303,20 +303,28 @@ parser.add_option('--with-etw',
intl_optgroup.add_option('--with-intl',
action='store',
dest='with_intl',
default='none',
default='small-icu',
choices=valid_intl_modes,
help='Intl mode (valid choices: {0}) [default: %default]'.format(
', '.join(valid_intl_modes)))

intl_optgroup.add_option('--without-intl',
action='store_const',
dest='with_intl',
const='none',
help='Disable Intl, same as --with-intl=none')

intl_optgroup.add_option('--with-icu-path',
action='store',
dest='with_icu_path',
help='Path to icu.gyp (ICU i18n, Chromium version only.)')

icu_default_locales='root,en'

intl_optgroup.add_option('--with-icu-locales',
action='store',
dest='with_icu_locales',
default='root,en',
default=icu_default_locales,
help='Comma-separated list of locales for "small-icu". "root" is assumed. '
'[default: %default]')

Expand Down Expand Up @@ -889,7 +897,7 @@ do_not_edit = '# Do not edit. Generated by the configure script.\n'

def glob_to_var(dir_base, dir_sub, patch_dir):
list = []
dir_all = os.path.join(dir_base, dir_sub)
dir_all = '%s/%s' % (dir_base, dir_sub)
files = os.walk(dir_all)
for ent in files:
(path, dirs, files) = ent
Expand All @@ -909,8 +917,8 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
def configure_intl(o):
icus = [
{
'url': 'https://ssl.icu-project.org/files/icu4c/56.1/icu4c-56_1-src.zip',
'md5': '61d71888f14bf00cc3e8a6f2c087d367',
'url': 'https://ssl.icu-project.org/files/icu4c/57.1/icu4c-57_1-src.zip',
'md5': 'f797503ecaebf1d38920013dc7893066',
},
]
def icu_download(path):
Expand Down Expand Up @@ -977,6 +985,7 @@ def configure_intl(o):
locs = set(options.with_icu_locales.split(','))
locs.add('root') # must have root
o['variables']['icu_locales'] = string.join(locs,',')
# We will check a bit later if we can use the canned deps/icu-small
elif with_intl == 'full-icu':
# full ICU
o['variables']['v8_enable_i18n_support'] = 1
Expand All @@ -1003,15 +1012,42 @@ def configure_intl(o):
# this is just the 'deps' dir. Used for unpacking.
icu_parent_path = os.path.join(root_dir, 'deps')

# The full path to the ICU source directory.
icu_full_path = os.path.join(icu_parent_path, 'icu')
# The full path to the ICU source directory. Should not include './'.
icu_full_path = 'deps/icu'

# icu-tmp is used to download and unpack the ICU tarball.
icu_tmp_path = os.path.join(icu_parent_path, 'icu-tmp')

# canned ICU. see tools/icu/README.md to update.
canned_icu_dir = 'deps/icu-small'

# We can use 'deps/icu-small' - pre-canned ICU *iff*
# - with_intl == small-icu (the default!)
# - with_icu_locales == 'root,en' (the default!)
# - deps/icu-small exists!
# - with_icu_source is unset (i.e. no other ICU was specified)
# (Note that this is the *DEFAULT CASE*.)
#
# This is *roughly* equivalent to
# $ configure --with-intl=small-icu --with-icu-source=deps/icu-small
# .. Except that we avoid copying icu-small over to deps/icu.
# In this default case, deps/icu is ignored, although make clean will
# still harmlessly remove deps/icu.

# are we using default locales?
using_default_locales = ( options.with_icu_locales == icu_default_locales )

# make sure the canned ICU really exists
canned_icu_available = os.path.isdir(canned_icu_dir)

if (o['variables']['icu_small'] == b(True)) and using_default_locales and (not with_icu_source) and canned_icu_available:
# OK- we can use the canned ICU.
icu_config['variables']['icu_small_canned'] = 1
icu_full_path = canned_icu_dir

# --with-icu-source processing
# first, check that they didn't pass --with-icu-source=deps/icu
if with_icu_source and os.path.abspath(icu_full_path) == os.path.abspath(with_icu_source):
# now, check that they didn't pass --with-icu-source=deps/icu
elif with_icu_source and os.path.abspath(icu_full_path) == os.path.abspath(with_icu_source):
print 'Ignoring redundant --with-icu-source=%s' % (with_icu_source)
with_icu_source = None
# if with_icu_source is still set, try to use it.
Expand Down Expand Up @@ -1052,7 +1088,7 @@ def configure_intl(o):

# ICU mode. (icu-generic.gyp)
o['variables']['icu_gyp_path'] = 'tools/icu/icu-generic.gyp'
# ICU source dir relative to root
# ICU source dir relative to tools/icu (for .gyp file)
o['variables']['icu_path'] = icu_full_path
if not os.path.isdir(icu_full_path):
print '* ECMA-402 (Intl) support didn\'t find ICU in %s..' % (icu_full_path)
Expand Down Expand Up @@ -1092,14 +1128,14 @@ def configure_intl(o):
'source/data/in',
icu_data_file_l)
# relative to dep..
icu_data_in = os.path.join('../../deps/icu/source/data/in', icu_data_file_l)
icu_data_in = os.path.join('..','..', icu_full_path, 'source/data/in', icu_data_file_l)
if not os.path.isfile(icu_data_path) and icu_endianness != 'l':
# use host endianness
icu_data_path = os.path.join(icu_full_path,
'source/data/in',
icu_data_file)
# relative to dep..
icu_data_in = os.path.join('icu/source/data/in',
icu_data_in = os.path.join('..', icu_full_path, 'source/data/in',
icu_data_file)
# this is the input '.dat' file to use .. icudt*.dat
# may be little-endian if from a icu-project.org tarball
Expand All @@ -1126,7 +1162,7 @@ def configure_intl(o):
# with a list of the src files to use
for i in icu_src:
var = 'icu_src_%s' % i
path = '../../deps/icu/source/%s' % icu_src[i]
path = '../../%s/source/%s' % (icu_full_path, icu_src[i])
icu_config['variables'][var] = glob_to_var('tools/icu', path, 'patches/%s/source/%s' % (icu_ver_major, icu_src[i]) )
# write updated icu_config.gypi with a bunch of paths
write(icu_config_name, do_not_edit +
Expand Down
Loading