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

Commit

Permalink
meta: merge node/master into node-chakracore/master
Browse files Browse the repository at this point in the history
Merge ad94be8 as of 2018-02-01
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: Jimmy Thomson <jithomso@microsoft.com>

Conflicts:
	README.md
	common.gypi
	lib/assert.js
	node.gypi
	test/parallel/test-child-process-fork-exec-path.js
	test/parallel/test-fs-write.js
  • Loading branch information
MSLaguana committed Feb 9, 2018
2 parents bfc9ea1 + ad94be8 commit f7e8fc6
Show file tree
Hide file tree
Showing 319 changed files with 3,068 additions and 2,197 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.4.0">9.4.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.5.0">9.5.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.4.0">9.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.3.0">9.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.2.1">9.2.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.2.0">9.2.0</a><br/>
Expand Down
2 changes: 1 addition & 1 deletion benchmark/_http-benchmarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ exports.run = function(options, callback) {
port: exports.PORT,
path: '/',
connections: 100,
duration: 10,
duration: 5,
benchmarker: exports.default_http_benchmarker
}, options);
if (!options.benchmarker) {
Expand Down
45 changes: 8 additions & 37 deletions benchmark/assert/deepequal-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ const bench = common.createBenchmark(main, {
});

function main({ len, n, method }) {
var i;

const data = Buffer.allocUnsafe(len + 1);
const actual = Buffer.alloc(len);
const expected = Buffer.alloc(len);
Expand All @@ -24,40 +22,13 @@ function main({ len, n, method }) {
data.copy(expected);
data.copy(expectedWrong);

switch (method) {
case '':
// Empty string falls through to next line as default, mostly for tests.
case 'deepEqual':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.deepEqual(actual, expected);
}
bench.end(n);
break;
case 'deepStrictEqual':
bench.start();
for (i = 0; i < n; ++i) {
assert.deepStrictEqual(actual, expected);
}
bench.end(n);
break;
case 'notDeepEqual':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.notDeepEqual(actual, expectedWrong);
}
bench.end(n);
break;
case 'notDeepStrictEqual':
bench.start();
for (i = 0; i < n; ++i) {
assert.notDeepStrictEqual(actual, expectedWrong);
}
bench.end(n);
break;
default:
throw new Error('Unsupported method');
// eslint-disable-next-line no-restricted-properties
const fn = method !== '' ? assert[method] : assert.deepEqual;
const value2 = method.includes('not') ? expectedWrong : expected;

bench.start();
for (var i = 0; i < n; ++i) {
fn(actual, value2);
}
bench.end(n);
}
2 changes: 1 addition & 1 deletion benchmark/assert/deepequal-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ function main({ n, len, method }) {
benchmark(assert.notDeepEqual, n, values, values2);
break;
default:
throw new Error('Unsupported method');
throw new Error(`Unsupported method ${method}`);
}
}
44 changes: 8 additions & 36 deletions benchmark/assert/deepequal-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,47 +28,19 @@ function createObj(source, add = '') {
function main({ size, n, method }) {
// TODO: Fix this "hack". `n` should not be manipulated.
n = n / size;
var i;

const source = Array.apply(null, Array(size));
const actual = createObj(source);
const expected = createObj(source);
const expectedWrong = createObj(source, '4');

switch (method) {
case '':
// Empty string falls through to next line as default, mostly for tests.
case 'deepEqual':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.deepEqual(actual, expected);
}
bench.end(n);
break;
case 'deepStrictEqual':
bench.start();
for (i = 0; i < n; ++i) {
assert.deepStrictEqual(actual, expected);
}
bench.end(n);
break;
case 'notDeepEqual':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.notDeepEqual(actual, expectedWrong);
}
bench.end(n);
break;
case 'notDeepStrictEqual':
bench.start();
for (i = 0; i < n; ++i) {
assert.notDeepStrictEqual(actual, expectedWrong);
}
bench.end(n);
break;
default:
throw new Error('Unsupported method');
// eslint-disable-next-line no-restricted-properties
const fn = method !== '' ? assert[method] : assert.deepEqual;
const value2 = method.includes('not') ? expectedWrong : expected;

bench.start();
for (var i = 0; i < n; ++i) {
fn(actual, value2);
}
bench.end(n);
}
69 changes: 22 additions & 47 deletions benchmark/assert/deepequal-prims-and-objs-big-array-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,19 @@ const bench = common.createBenchmark(main, {
]
});

function run(fn, n, actual, expected) {
bench.start();
for (var i = 0; i < n; ++i) {
fn(actual, expected);
}
bench.end(n);
}

function main({ n, len, primitive, method }) {
const prim = primValues[primitive];
const actual = [];
const expected = [];
const expectedWrong = [];
var i;

for (var x = 0; x < len; x++) {
actual.push(prim);
Expand All @@ -51,69 +58,37 @@ function main({ n, len, primitive, method }) {
const expectedWrongSet = new Set(expectedWrong);

switch (method) {
// Empty string falls through to next line as default, mostly for tests.
case '':
// Empty string falls through to next line as default, mostly for tests.
case 'deepEqual_Array':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.deepEqual(actual, expected);
}
bench.end(n);
// eslint-disable-next-line no-restricted-properties
run(assert.deepEqual, n, actual, expected);
break;
case 'deepStrictEqual_Array':
bench.start();
for (i = 0; i < n; ++i) {
assert.deepStrictEqual(actual, expected);
}
bench.end(n);
run(assert.deepStrictEqual, n, actual, expected);
break;
case 'notDeepEqual_Array':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.notDeepEqual(actual, expectedWrong);
}
bench.end(n);
// eslint-disable-next-line no-restricted-properties
run(assert.notDeepEqual, n, actual, expectedWrong);
break;
case 'notDeepStrictEqual_Array':
bench.start();
for (i = 0; i < n; ++i) {
assert.notDeepStrictEqual(actual, expectedWrong);
}
bench.end(n);
run(assert.notDeepStrictEqual, n, actual, expectedWrong);
break;
case 'deepEqual_Set':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.deepEqual(actualSet, expectedSet);
}
bench.end(n);
// eslint-disable-next-line no-restricted-properties
run(assert.deepEqual, n, actualSet, expectedSet);
break;
case 'deepStrictEqual_Set':
bench.start();
for (i = 0; i < n; ++i) {
assert.deepStrictEqual(actualSet, expectedSet);
}
bench.end(n);
run(assert.deepStrictEqual, n, actualSet, expectedSet);
break;
case 'notDeepEqual_Set':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.notDeepEqual(actualSet, expectedWrongSet);
}
bench.end(n);
// eslint-disable-next-line no-restricted-properties
run(assert.notDeepEqual, n, actualSet, expectedWrongSet);
break;
case 'notDeepStrictEqual_Set':
bench.start();
for (i = 0; i < n; ++i) {
assert.notDeepStrictEqual(actualSet, expectedWrongSet);
}
bench.end(n);
run(assert.notDeepStrictEqual, n, actualSet, expectedWrongSet);
break;
default:
throw new Error('Unsupported method');
throw new Error(`Unsupported method "${method}"`);
}
}
45 changes: 8 additions & 37 deletions benchmark/assert/deepequal-prims-and-objs-big-loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,43 +29,14 @@ function main({ n, primitive, method }) {
const actual = prim;
const expected = prim;
const expectedWrong = 'b';
var i;

// Creates new array to avoid loop invariant code motion
switch (method) {
case '':
// Empty string falls through to next line as default, mostly for tests.
case 'deepEqual':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.deepEqual([actual], [expected]);
}
bench.end(n);
break;
case 'deepStrictEqual':
bench.start();
for (i = 0; i < n; ++i) {
assert.deepStrictEqual([actual], [expected]);
}
bench.end(n);
break;
case 'notDeepEqual':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.notDeepEqual([actual], [expectedWrong]);
}
bench.end(n);
break;
case 'notDeepStrictEqual':
bench.start();
for (i = 0; i < n; ++i) {
assert.notDeepStrictEqual([actual], [expectedWrong]);
}
bench.end(n);
break;
default:
throw new Error('Unsupported method');
// eslint-disable-next-line no-restricted-properties
const fn = method !== '' ? assert[method] : assert.deepEqual;
const value2 = method.includes('not') ? expectedWrong : expected;

bench.start();
for (var i = 0; i < n; ++i) {
fn([actual], [value2]);
}
bench.end(n);
}
2 changes: 1 addition & 1 deletion benchmark/assert/deepequal-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ function main({ n, len, method }) {
benchmark(assert.notDeepEqual, n, values, values2);
break;
default:
throw new Error('Unsupported method');
throw new Error(`Unsupported method "${method}"`);
}
}
44 changes: 8 additions & 36 deletions benchmark/assert/deepequal-typedarrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,42 +31,14 @@ function main({ type, n, len, method }) {
const expectedWrong = Buffer.alloc(len);
const wrongIndex = Math.floor(len / 2);
expectedWrong[wrongIndex] = 123;
var i;

switch (method) {
case '':
// Empty string falls through to next line as default, mostly for tests.
case 'deepEqual':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.deepEqual(actual, expected);
}
bench.end(n);
break;
case 'deepStrictEqual':
bench.start();
for (i = 0; i < n; ++i) {
assert.deepStrictEqual(actual, expected);
}
bench.end(n);
break;
case 'notDeepEqual':
bench.start();
for (i = 0; i < n; ++i) {
// eslint-disable-next-line no-restricted-properties
assert.notDeepEqual(actual, expectedWrong);
}
bench.end(n);
break;
case 'notDeepStrictEqual':
bench.start();
for (i = 0; i < n; ++i) {
assert.notDeepStrictEqual(actual, expectedWrong);
}
bench.end(n);
break;
default:
throw new Error('Unsupported method');
// eslint-disable-next-line no-restricted-properties
const fn = method !== '' ? assert[method] : assert.deepEqual;
const value2 = method.includes('not') ? expectedWrong : expected;

bench.start();
for (var i = 0; i < n; ++i) {
fn(actual, value2);
}
bench.end(n);
}
7 changes: 4 additions & 3 deletions benchmark/async_hooks/gc-tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ function endAfterGC(n) {
}

function main({ n, method }) {
var i;
switch (method) {
case 'trackingEnabled':
bench.start();
for (let i = 0; i < n; i++) {
for (i = 0; i < n; i++) {
new AsyncResource('foobar');
}
endAfterGC(n);
break;
case 'trackingDisabled':
bench.start();
for (let i = 0; i < n; i++) {
for (i = 0; i < n; i++) {
new AsyncResource('foobar', { requireManualDestroy: true });
}
endAfterGC(n);
break;
default:
throw new Error('Unsupported method');
throw new Error(`Unsupported method "${method}"`);
}
}
3 changes: 1 addition & 2 deletions benchmark/buffers/buffer-bytelength.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ const chars = [

function main({ n, len, encoding }) {
var strings = [];
var results;
var results = [ len * 16 ];
if (encoding === 'buffer') {
strings = [ Buffer.alloc(len * 16, 'a') ];
results = [ len * 16 ];
} else {
for (const string of chars) {
// Strings must be built differently, depending on encoding
Expand Down
Loading

0 comments on commit f7e8fc6

Please sign in to comment.