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

v12.2.0 proposal #27578

Merged
merged 106 commits into from
May 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
76af4f0
tools: prohibit `assert.doesNotReject()` in Node.js core
BridgeAR Apr 24, 2019
c2a03d5
lib: print to stdout/stderr directly instead of using console
joyeecheung Apr 18, 2019
cfc7bdd
benchmark: add benchmark for node -p
joyeecheung Apr 18, 2019
af29ae0
test: add mustCall to net-connect-buffer test
pd4d10 Apr 28, 2019
7a35077
test: add mustCall to test-fs-readfile-pipe
tonyhty Apr 28, 2019
6fd1384
test: add mustcall in test-dgram-connect-send-callback-buffer-length
jyjunyz Apr 28, 2019
d784ecb
test: add mustCall to test-net-eaddrinuse test
Apr 28, 2019
e8d5b62
test: add "mustCall" for test-net-buffersize
Apr 28, 2019
9fa5ba8
test: add mustCall to test-fs-readfile-pipe-large
Apr 28, 2019
7d80999
test: add mustCall to net-can-reset-timeout
heartAndRain Apr 28, 2019
7c25dce
deps: V8: cherry-pick 5d0cf6b
joyeecheung Apr 26, 2019
149412c
repl: add autocomplete for filesystem modules
antsmartian Apr 25, 2019
cf84f20
test: skip fs-copyfile-respect-permission if root
danbev Apr 24, 2019
a37ca24
test: add mustCallAtLeast to test-fs-read-stream-fd test
hardfist Apr 28, 2019
23fb430
test: add mustCall to test-dgram-connect-send-callback-buffer
Apr 28, 2019
c4d67f2
test: add common.mustCall test-dgram-listen-after-bind
Apr 28, 2019
4b9d109
test: add mustCall to test-dgram-implicit-bind.js
yuanchenxi95 Apr 28, 2019
51fc672
test: add mustCallAtLeast to test-fs-read-stream-inherit
Apr 28, 2019
47d311b
lib: remove outdated optimizations
starkwang Apr 24, 2019
115d06c
test: document NODE_TEST_KNOWN_GLOBALS
cjihrig Apr 26, 2019
2c33592
test: document NODE_SKIP_FLAG_CHECK
cjihrig Apr 26, 2019
66bff50
test: document report helper module
cjihrig Apr 26, 2019
b6c65c1
test: add missing ToC entries
cjihrig Apr 26, 2019
c1b0465
test: add "mustCall" to test-fs-readfile-unlink
Apr 28, 2019
615d386
child_process: only stop readable side of stream passed to proc
addaleax Apr 23, 2019
b68132e
deps: configure OpenSSL's SSL_trace to be built
sam-github Apr 25, 2019
230a773
deps: update archs files for OpenSSL-1.1.1b
sam-github Apr 23, 2019
30a72e8
tls: allow enabling the TLS debug trace
sam-github Feb 13, 2019
7d1c90b
meta: move @vsemozhetbyt to collaborator emeriti
vsemozhetbyt Apr 25, 2019
8e876e6
console: use consolePropAttributes for k-bind properties (reland)
BridgeAR Apr 23, 2019
eeab007
test: add mustCall to test-net-after-close test
Apr 28, 2019
3370291
src: prefer v8::Global over node::Persistent
addaleax Apr 17, 2019
0dfe5be
test: add test of policy about parse error
sasurau4 Mar 23, 2019
1dd0205
test: add mustCall to test-dgram-connect-send-multi-buffer-copy.js
XGHeaven Apr 28, 2019
e21f035
test: add mustCall in test-fs-readfilesync-pipe-large.js
sinoon Apr 28, 2019
8495e8b
meta: move Forrest Norvell to Collaborator Emeriti list
Trott Apr 27, 2019
9c842f4
lib: remove Reflect.apply where appropriate
apapirovski Apr 22, 2019
f4124d5
test: add mustCall to http-abort-queued test
tsyeyuanfeng Apr 28, 2019
457549b
test: add common.mustCall in test-http-abort-client.js
y1d7ng Apr 28, 2019
e89b6fe
test: adding mustCall in test-fs-readfile-empty.js
chenjian-bzh Apr 28, 2019
0e4f878
test: add mustCallAtLeast to test-fs-read-stream-resume.js
Apr 28, 2019
3711684
test: add mustCall for parallel/test-net-connect-paused-connection
Apr 28, 2019
53eefeb
buffer: remove unreachable code
Trott Apr 28, 2019
f882c9b
http: `servername === false` should disable SNI
indutny Apr 19, 2019
5f72246
deps: add acorn stage-3 plugins
BridgeAR Apr 24, 2019
c0ab2a1
assert: use new language features
BridgeAR Apr 24, 2019
01d632d
repl: add new language features to top level await statements
BridgeAR Apr 24, 2019
05cea67
repl: handle stage-3 language features properly
BridgeAR Apr 24, 2019
fefbbd9
test: add tests for new language features
BridgeAR Apr 24, 2019
a9748bc
doc: describe API ERR_INVALID_PROTOCOL context
sam-github Apr 24, 2019
1b94d02
test: add missing line breaks to keep-alive header of slow headers test
shuhei Apr 27, 2019
67205f5
build: remove unsupported Python 2.6 from configure
cclauss Apr 24, 2019
16af943
test: remove flaky designation for test-tls-sni-option
lpinca Apr 26, 2019
a9a85d6
test: check `napi_get_reference_value()` during finalization
addaleax Apr 29, 2019
33fead3
Revert "test: skip test-cpu-prof in debug builds with code cache"
addaleax Apr 28, 2019
7be1e0a
fs: added tests for util file preprocessSymlinkDestination
rpgeeganage Apr 28, 2019
86c27c6
test: add mustcall in test-net-bytes-read.js
ImHype Apr 29, 2019
cb97de7
doc: move James back onto TSC
mhdawson Apr 25, 2019
cac584d
buffer,errors: improve bigint, big numbers and more
BridgeAR Apr 14, 2019
b51dcf6
doc: add Electron 6 to abi_version_registry
nornagon Apr 17, 2019
a55457c
report: use const reference in node_report.cc
gengjiawen Apr 29, 2019
aa281d2
test: better output for test-report-uv-handles.js
gengjiawen Apr 29, 2019
a278814
test: make sure weak references are not GCed too early
BridgeAR Apr 29, 2019
a0353fd
fs: align fs.ReadStream buffer pool writes to 8-byte boundary
trxcllnt Apr 1, 2019
be9a1ec
module: allow passing a directory to createRequireFromPath
gillesdemey Oct 22, 2018
df4246e
test: refactor and deflake test-tls-sni-server-client
lpinca Apr 26, 2019
600048b
src: move Environment::context out of strong properties
joyeecheung Apr 21, 2019
c787bb8
src: refactor profile initialization
joyeecheung Apr 29, 2019
0c9bc02
src: refactor V8ProfilerConnection to be more reusable
joyeecheung Apr 29, 2019
29e2793
tools: add Release and Debug symlinks to .gitignore
Flarna Apr 29, 2019
576fe33
tls: simplify enableTrace logic
cjihrig Apr 30, 2019
84a2768
tls: support enableTrace in TLSSocket()
cjihrig Apr 30, 2019
f1efe6d
tls,cli: add --trace-tls command-line flag
cjihrig Apr 30, 2019
9d6d45e
stream: remove TODO and add a description instead
BridgeAR Apr 4, 2019
66cf706
test: allow EAI_FAIL in test-http-dns-error.js
cjihrig Apr 30, 2019
22a5a05
build: delegate building from Makefile to ninja
refack Apr 30, 2019
e1d88aa
test: document NODE_COMMON_PORT env var
cjihrig Apr 30, 2019
fd17f37
meta: move stefanmb to Collaborator Emeriti list
Trott Apr 30, 2019
99e4a57
test: add mustCall to openssl-client-cert-engine
li-boxuan Apr 29, 2019
caab7d4
util: better number formatters
BridgeAR Apr 30, 2019
4b3d0d1
async_hooks: fixup do not reuse HTTPParser
Flarna Apr 22, 2019
2c3c0d7
doc: add cclauss to collaborators
cclauss May 3, 2019
5bcd770
module: add createRequire method
MylesBorins Apr 25, 2019
014a9fd
module: throw on require('./path.mjs');
MylesBorins Apr 25, 2019
7bbf951
tls: disallow conflicting TLS protocol options
sam-github May 1, 2019
91b7f5e
process: improve cwd performance
BridgeAR Apr 14, 2019
826fb66
process: compatibility patch to backport 1d022e8
BridgeAR Apr 29, 2019
bb373d0
src: remove unnecessary semicolons after macros
hashseed May 2, 2019
ca720b3
test: converting NghttpError to string in HTTP2 module
rpgeeganage Apr 30, 2019
b68ecf3
meta: move andrasq to Collaborator Emeriti list
Trott May 3, 2019
d648ecc
test: improve test-async-hooks-http-parser-destroy
Trott Apr 19, 2019
a758f9b
src: remove node_options-inl.h from header files
sam-github May 2, 2019
52d4f1f
util: improve function inspection
BridgeAR Apr 14, 2019
7b5bd93
util: compatibility patch to backport d0667e8
BridgeAR May 5, 2019
95498df
util: inspect constructor closer
BridgeAR May 1, 2019
55804e1
deps: update llhttp to 1.1.2
indutny May 1, 2019
bdabf69
tls: add --tls-min-v1.2 CLI switch
sam-github May 1, 2019
294d2ea
src: refactor V8ProfilerConnection::DispatchMessage()
joyeecheung May 2, 2019
de337bb
inspector: implement --cpu-prof-interval
joyeecheung May 2, 2019
3d37414
tools: fix node-core/required-modules eslint rule
bnoordhuis May 2, 2019
e5fdc30
n-api: make napi_get_property_names return strings
addaleax May 1, 2019
1489d12
src: make deleted function public in node_main_instance.h
gengjiawen May 1, 2019
8724229
src: make deleted function public in node_native_module.h
gengjiawen May 1, 2019
bb1eaee
test: mark test-tls-enable-trace-cli flaky
cjihrig May 4, 2019
f142363
deps: update llhttp to 1.1.3
indutny May 7, 2019
e8dda76
2019-05-07, Version 12.2.0 (Current)
targos May 6, 2019
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
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ module.exports = {
},
{
selector: "CallExpression[callee.property.name='doesNotThrow']",
message: 'Please replace `assert.doesNotThrow()` and add a comment next to the code instead.',
message: 'Do not use `assert.doesNotThrow()`. Write the code without the wrapper and add a comment instead.',
},
{
selector: "CallExpression[callee.property.name='doesNotReject']",
message: 'Do not use `assert.doesNotReject()`. Write the code without the wrapper and add a comment instead.',
},
{
selector: "CallExpression[callee.property.name='rejects'][arguments.length<2]",
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ coverage/
/out

# various stuff that VC++ produces/uses and is not in /out
/Debug/
/Release/
/Debug
/Release
!doc/blog/**
*.sln
!nodemsi.sln
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.1.0">12.1.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.2.0">12.2.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.1.0">12.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.0.0">12.0.0</a><br/>
</td>
<td valign="top">
Expand Down
23 changes: 23 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,29 @@ The externally maintained libraries used by Node.js are:
THE SOFTWARE.
"""

- Acorn plugins, located at deps/acorn-plugins, is licensed as follows:
"""
Copyright (C) 2017-2018 by Adrian Heine

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
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.
"""

- c-ares, located at deps/cares, is licensed as follows:
"""
Copyright (c) 2007 - 2018, Daniel Stenberg with many contributors, see AUTHORS
Expand Down
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ GTEST_FILTER ?= "*"
GNUMAKEFLAGS += --no-print-directory
GCOV ?= gcov
PWD = $(CURDIR)
BUILD_WITH ?= make

ifdef JOBS
PARALLEL_ARGS = -j $(JOBS)
Expand Down Expand Up @@ -95,13 +96,37 @@ help: ## Print help for targets with comments.
# Without the check there is a race condition between the link being deleted
# and recreated which can break the addons build when running test-ci
# See comments on the build-addons target for some more info
ifeq ($(BUILD_WITH), make)
$(NODE_EXE): config.gypi out/Makefile
$(MAKE) -C out BUILDTYPE=Release V=$(V)
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi

$(NODE_G_EXE): config.gypi out/Makefile
$(MAKE) -C out BUILDTYPE=Debug V=$(V)
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
else
ifeq ($(BUILD_WITH), ninja)
ifeq ($(V),1)
NINJA_ARGS := $(NINJA_ARGS) -v
endif
ifdef JOBS
NINJA_ARGS := $(NINJA_ARGS) -j$(JOBS)
else
NINJA_ARGS := $(NINJA_ARGS) $(filter -j%,$(MAKEFLAGS))
endif
$(NODE_EXE): config.gypi out/Release/build.ninja
ninja -C out/Release $(NINJA_ARGS)
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi

$(NODE_G_EXE): config.gypi out/Debug/build.ninja
ninja -C out/Debug $(NINJA_ARGS)
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
else
$(NODE_EXE) $(NODE_G_EXE):
echo This Makefile currently only supports building with 'make' or 'ninja'
endif
endif


ifeq ($(BUILDTYPE),Debug)
CONFIG_FLAGS += --debug
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ For information about the governance of the Node.js project, see
**Gabriel Schulhof** &lt;gabriel.schulhof@intel.com&gt;
* [gireeshpunathil](https://github.com/gireeshpunathil) -
**Gireesh Punathil** &lt;gpunathi@in.ibm.com&gt; (he/him)
* [jasnell](https://github.com/jasnell) -
**James M Snell** &lt;jasnell@gmail.com&gt; (he/him)
* [joyeecheung](https://github.com/joyeecheung) -
**Joyee Cheung** &lt;joyeec9h3@gmail.com&gt; (she/her)
* [mcollina](https://github.com/mcollina) -
Expand Down Expand Up @@ -216,8 +218,6 @@ For information about the governance of the Node.js project, see
**Fedor Indutny** &lt;fedor.indutny@gmail.com&gt;
* [isaacs](https://github.com/isaacs) -
**Isaac Z. Schlueter** &lt;i@izs.me&gt;
* [jasnell](https://github.com/jasnell) -
**James M Snell** &lt;jasnell@gmail.com&gt; (he/him)
* [joshgav](https://github.com/joshgav) -
**Josh Gavant** &lt;josh.gavant@outlook.com&gt;
* [mscdex](https://github.com/mscdex) -
Expand All @@ -243,8 +243,6 @@ For information about the governance of the Node.js project, see
**Anna Henningsen** &lt;anna@addaleax.net&gt; (she/her)
* [ak239](https://github.com/ak239) -
**Aleksei Koziatinskii** &lt;ak239spb@gmail.com&gt;
* [andrasq](https://github.com/andrasq) -
**Andras** &lt;andras@kinvey.com&gt;
* [AndreasMadsen](https://github.com/AndreasMadsen) -
**Andreas Madsen** &lt;amwebdk@gmail.com&gt; (he/him)
* [AnnaMag](https://github.com/AnnaMag) -
Expand Down Expand Up @@ -279,6 +277,8 @@ For information about the governance of the Node.js project, see
**Bartosz Sosnowski** &lt;bartosz@janeasystems.com&gt;
* [calvinmetcalf](https://github.com/calvinmetcalf) -
**Calvin Metcalf** &lt;calvin.metcalf@gmail.com&gt;
* [cclauss](https://github.com/cclauss) -
**Christian Clauss** &lt;cclauss@me.com&gt; (he/him)
* [ChALkeR](https://github.com/ChALkeR) -
**Сковорода Никита Андреевич** &lt;chalkerx@gmail.com&gt; (he/him)
* [chrisdickinson](https://github.com/chrisdickinson) -
Expand Down Expand Up @@ -401,8 +401,6 @@ For information about the governance of the Node.js project, see
**Ali Ijaz Sheikh** &lt;ofrobots@google.com&gt; (he/him)
* [orangemocha](https://github.com/orangemocha) -
**Alexis Campailla** &lt;orangemocha@nodejs.org&gt;
* [othiym23](https://github.com/othiym23) -
**Forrest L Norvell** &lt;ogd@aoaioxxysz.net&gt; (he/him)
* [oyyd](https://github.com/oyyd) -
**Ouyang Yadong** &lt;oyydoibh@gmail.com&gt; (he/him)
* [pmq20](https://github.com/pmq20) -
Expand Down Expand Up @@ -447,8 +445,6 @@ For information about the governance of the Node.js project, see
**Steven R Loomis** &lt;srloomis@us.ibm.com&gt;
* [starkwang](https://github.com/starkwang) -
**Weijia Wang** &lt;starkwang@126.com&gt;
* [stefanmb](https://github.com/stefanmb) -
**Stefan Budeanu** &lt;stefan@budeanu.com&gt;
* [targos](https://github.com/targos) -
**Michaël Zasso** &lt;targos@protonmail.com&gt; (he/him)
* [thefourtheye](https://github.com/thefourtheye) -
Expand All @@ -471,8 +467,6 @@ For information about the governance of the Node.js project, see
**Vladimir de Turckheim** &lt;vlad2t@hotmail.com&gt; (he/him)
* [vkurchatkin](https://github.com/vkurchatkin) -
**Vladimir Kurchatkin** &lt;vladimir.kurchatkin@gmail.com&gt;
* [vsemozhetbyt](https://github.com/vsemozhetbyt) -
**Vse Mozhet Byt** &lt;vsemozhetbyt@gmail.com&gt; (he/him)
* [watilde](https://github.com/watilde) -
**Daijiro Wachi** &lt;daijiro.wachi@gmail.com&gt; (he/him)
* [watson](https://github.com/watson) -
Expand All @@ -492,6 +486,8 @@ For information about the governance of the Node.js project, see

### Collaborator Emeriti

* [andrasq](https://github.com/andrasq) -
**Andras** &lt;andras@kinvey.com&gt;
* [imran-iq](https://github.com/imran-iq) -
**Imran Iqbal** &lt;imran@imraniqbal.org&gt;
* [isaacs](https://github.com/isaacs) -
Expand All @@ -508,6 +504,8 @@ For information about the governance of the Node.js project, see
**Christopher Monsanto** &lt;chris@monsan.to&gt;
* [Olegas](https://github.com/Olegas) -
**Oleg Elifantiev** &lt;oleg@elifantiev.ru&gt;
* [othiym23](https://github.com/othiym23) -
**Forrest L Norvell** &lt;ogd@aoaioxxysz.net&gt; (he/him)
* [petkaantonov](https://github.com/petkaantonov) -
**Petka Antonov** &lt;petka_antonov@hotmail.com&gt;
* [phillipj](https://github.com/phillipj) -
Expand All @@ -522,10 +520,14 @@ For information about the governance of the Node.js project, see
**Robert Kowalski** &lt;rok@kowalski.gd&gt;
* [romankl](https://github.com/romankl) -
**Roman Klauke** &lt;romaaan.git@gmail.com&gt;
* [stefanmb](https://github.com/stefanmb) -
**Stefan Budeanu** &lt;stefan@budeanu.com&gt;
* [tellnes](https://github.com/tellnes) -
**Christian Tellnes** &lt;christian@tellnes.no&gt;
* [tunniclm](https://github.com/tunniclm) -
**Mike Tunnicliffe** &lt;m.j.tunnicliffe@gmail.com&gt;
* [vsemozhetbyt](https://github.com/vsemozhetbyt) -
**Vse Mozhet Byt** &lt;vsemozhetbyt@gmail.com&gt; (he/him)

Collaborators follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in
maintaining the Node.js project.
Expand Down
5 changes: 3 additions & 2 deletions benchmark/http/bench-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ function main({ len, n }) {
bench.start();
for (var i = 0; i < n; i++) {
parser.execute(header, 0, header.length);
parser.initialize(REQUEST, header);
parser.initialize(REQUEST, {});
}
bench.end(n);
}

function newParser(type) {
const parser = new HTTPParser(type);
const parser = new HTTPParser();
parser.initialize(type, {});

parser.headers = [];

Expand Down
59 changes: 59 additions & 0 deletions benchmark/misc/print.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
'use strict';
const common = require('../common.js');
const { spawn } = require('child_process');

const bench = common.createBenchmark(main, {
dur: [1],
code: ['1', '"string"', 'process.versions', 'process']
});

function spawnProcess(code) {
const cmd = process.execPath || process.argv[0];
const argv = ['-p', code];
return spawn(cmd, argv);
}

function start(state, code, bench, getNode) {
const node = getNode(code);
let stdout = '';
let stderr = '';

node.stdout.on('data', (data) => {
stdout += data;
});

node.stderr.on('data', (data) => {
stderr += data;
});

node.on('exit', (code) => {
if (code !== 0) {
console.error('------ stdout ------');
console.error(stdout);
console.error('------ stderr ------');
console.error(stderr);
throw new Error(`Error during node startup, exit code ${code}`);
}
state.throughput++;

if (state.go) {
start(state, code, bench, getNode);
} else {
bench.end(state.throughput);
}
});
}

function main({ dur, code }) {
const state = {
go: true,
throughput: 0
};

setTimeout(() => {
state.go = false;
}, dur * 1000);

bench.start();
start(state, code, bench, spawnProcess);
}
42 changes: 42 additions & 0 deletions benchmark/timers/timers-breadth-args.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
'use strict';
const common = require('../common.js');

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

function main({ n }) {
var j = 0;
function cb1(arg1) {
j++;
if (j === n)
bench.end(n);
}
function cb2(arg1, arg2) {
j++;
if (j === n)
bench.end(n);
}
function cb3(arg1, arg2, arg3) {
j++;
if (j === n)
bench.end(n);
}
function cb4(arg1, arg2, arg3, arg4) {
j++;
if (j === n)
bench.end(n);
}

bench.start();
for (var i = 0; i < n; i++) {
if (i % 4 === 0)
setTimeout(cb4, 1, 3.14, 1024, true, false);
else if (i % 3 === 0)
setTimeout(cb3, 1, 512, true, null);
else if (i % 2 === 0)
setTimeout(cb2, 1, false, 5.1);
else
setTimeout(cb1, 1, 0);
}
}
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.16',
'v8_embedder_string': '-node.17',

##### V8 defaults for Node.js #####

Expand Down
6 changes: 3 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ del _

import sys
from distutils.spawn import find_executable as which
if sys.version_info[0] != 2 or sys.version_info[1] not in (6, 7):
sys.stderr.write('Please use either Python 2.6 or 2.7')
if sys.version_info[:2] != (2, 7):
sys.stderr.write('Please use Python 2.7')

python2 = which('python2') or which('python2.6') or which('python2.7')
python2 = which('python2') or which('python2.7')

if python2:
sys.stderr.write(':\n\n')
Expand Down
20 changes: 16 additions & 4 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1627,23 +1627,35 @@ def make_bin_override():
' '.join([pipes.quote(arg) for arg in original_argv]) + '\n')
os.chmod('config.status', 0o775)


config = {
'BUILDTYPE': 'Debug' if options.debug else 'Release',
'PYTHON': sys.executable,
'NODE_TARGET_TYPE': variables['node_target_type'],
}

# Not needed for trivial case. Useless when it's a win32 path.
if sys.executable != 'python' and ':\\' not in sys.executable:
config['PYTHON'] = sys.executable

if options.prefix:
config['PREFIX'] = options.prefix

config = '\n'.join(['='.join(item) for item in config.items()]) + '\n'
if options.use_ninja:
config['BUILD_WITH'] = 'ninja'

config_lines = ['='.join((k,v)) for k,v in config.items()]
# Add a blank string to get a blank line at the end.
config_lines += ['']
config_str = '\n'.join(config_lines)

# On Windows there's no reason to search for a different python binary.
bin_override = None if sys.platform == 'win32' else make_bin_override()
if bin_override:
config = 'export PATH:=' + bin_override + ':$(PATH)\n' + config
config_str = 'export PATH:=' + bin_override + ':$(PATH)\n' + config_str

write('config.mk', do_not_edit + config_str)


write('config.mk', do_not_edit + config)

gyp_args = ['--no-parallel', '-Dconfiguring_node=1']

Expand Down
Loading