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

v7.10.0 proposal #12775

Merged
merged 182 commits into from
May 3, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
e8595c5
deps: cherry-pick 79aee39 from upstream v8
bnoordhuis Apr 14, 2017
25b851b
v8: fix build errors with g++ 7
bnoordhuis Apr 13, 2017
0c0241f
buffer,util: refactor for performance
Trott Apr 1, 2017
5ccafa2
tools: replace custom ESLint timers rule
Trott Apr 2, 2017
b4052e6
url: extend URLSearchParams constructor
TimothyGu Jan 28, 2017
e48e00b
doc: document URLSearchParams constructor
TimothyGu Jan 28, 2017
7c9ca0f
url: enforce valid UTF-8 in WHATWG parser
TimothyGu Feb 4, 2017
d6fe916
url: prioritize toString when stringifying
TimothyGu Mar 8, 2017
b8ff2c9
url: spec-compliant URLSearchParams serializer
TimothyGu Feb 4, 2017
72a3cac
src: remove explicit UTF-8 validity check in url
TimothyGu Mar 15, 2017
0cc37c7
querystring: move isHexTable to internal
TimothyGu Mar 15, 2017
01b8839
url: spec-compliant URLSearchParams parser
TimothyGu Mar 15, 2017
4b6097d
url: use a class for WHATWG url[context]
TimothyGu Mar 22, 2017
c7de98a
url: add ToObject method to native URL class
jasnell Mar 27, 2017
078316c
src: WHATWG URL C++ parser cleanup
TimothyGu Mar 16, 2017
b8d1a45
url: change path parsing for non-special URLs
watilde Apr 3, 2017
1adb08e
test: synchronize WPT url test data
watilde Apr 3, 2017
b9b93f2
url: error when domainTo*() is called w/o argument
TimothyGu Mar 20, 2017
b50a84a
url: avoid instanceof for WHATWG URL
mscdex Mar 5, 2017
5a27f63
url: trim leading slashes of file URL paths
watilde Apr 10, 2017
ffb2ef4
url: remove javascript URL special case
watilde Apr 12, 2017
29531d2
url: disallow invalid IPv4 in IPv6 parser
watilde Apr 14, 2017
b2a9e60
url: clean up WHATWG URL origin generation
TimothyGu Apr 5, 2017
dfc8017
url: improve WHATWG URL inspection
TimothyGu Apr 5, 2017
513fc62
src: clean up WHATWG WG parser
TimothyGu Apr 6, 2017
75f4329
crypto: add randomFill and randomFillSync
evanlucas Dec 9, 2016
b1d3f59
doc: fix stylistic issues in api/net.md
aqrln Mar 10, 2017
9bdf62f
test: refactor test-util-inspect.js
aqrln Mar 10, 2017
fe45a37
test: add arrow functions to test-util-inspect
aqrln Mar 10, 2017
9662ca1
build: enable cctest to use generated objects
danbev Oct 18, 2016
75f0855
doc: c++ unit test guide lines
danbev Mar 24, 2017
089a96f
doc: add link on logo to README
silverwind Apr 10, 2017
71b39ae
doc: update os.uptime() and process.uptime() info
vsemozhetbyt Apr 9, 2017
1ab998f
test: fix allocUnsafe uninitialized buffer check
Qantas94Heavy Apr 9, 2017
42e940c
build,win: limit maxcpucount to 2 for MSBuild
joaocgreis Apr 4, 2017
810f921
deps,win: increase msvs_shard in gyp for V8
joaocgreis Apr 3, 2017
43a39c6
doc: modernize and fix code examples in path.md
vsemozhetbyt Apr 9, 2017
94ddab0
src: guard default_inspector_port
danbev Apr 10, 2017
f316b50
benchmark: replace more [].join() with ''.repeat()
vsemozhetbyt Apr 10, 2017
aa51105
doc: add missing changelog entry for fs.readdir()
shubheksha Apr 10, 2017
ed13016
doc: add single arg scenario for util.format
tarunbatra Apr 12, 2017
aff0cfc
test: improve punycode coverage to check surrogate pair
orisano Apr 12, 2017
f3db9a6
doc: limit lines to 80 cols in internal README
evanlucas Apr 12, 2017
d58fa78
benchmark,windows: TCP.readStart() meaningful only after completion
refack Apr 6, 2017
8ac8e50
crypto: make LazyTransform compabile with Streams1
mcollina Apr 13, 2017
d1e1832
doc: add AnnaMag to collaborators
AnnaMag Apr 14, 2017
e2d66ab
doc: response.write ignores body in some cases
krydos Apr 10, 2017
4d9e671
build: run cpplint even if jslint failed
krydos Apr 7, 2017
ebeb6c0
buffer: optimize write()
mscdex Apr 10, 2017
092c723
test: add hasCrypto check to test-debug-usage
danbev Apr 12, 2017
5c57fea
doc: fix formatting in onboarding-extras
Trott Apr 11, 2017
92e239d
doc: add info about serializable types
shubheksha Apr 10, 2017
6998e80
os,vm: fix segfaults and CHECK failure
tniessen Apr 12, 2017
0661fdf
test: add test-benchmark-crypto
Trott Apr 11, 2017
6a45be2
doc: path functions ignore trailing slashes
tniessen Apr 3, 2017
e4b2f61
buffer: use slightly faster NaN check
mscdex Apr 8, 2017
5ed9ed3
test: remove common.PORT from test-cluster-basic
Trott Apr 12, 2017
060b63e
doc: add jkrems to collaborators
Apr 15, 2017
984232c
doc: fix typo in streams.md
jpbamberg1993 Apr 15, 2017
4ce58bd
doc: add DavidCai1993 to collaborators
DavidCai1111 Apr 15, 2017
4a19062
test: replace [].join() with ''.repeat()
JacksonTian Apr 10, 2017
d7d1e92
doc: update link for landing PRs
Trott Apr 14, 2017
4570d98
doc: add guide for backporting prs
evanlucas Feb 1, 2017
0f290f2
test: enable setuid/setgid test
Trott Apr 13, 2017
320e72b
doc: add missing ) in CONTRIBUTING.md
matkoniecz Apr 16, 2017
2e3813f
meta: move the Code of Conduct to TSC repository
jasnell Mar 31, 2017
5a2d358
doc: remove inspector experimental warning
cjihrig Apr 14, 2017
3c59d87
test: add crypto check to crypto-lazy-transform
danbev Apr 15, 2017
077187e
doc: s/origin/upstream/ collaborator guide
addaleax Apr 15, 2017
917534d
benchmark: fix CLI arguments check in common.js
vsemozhetbyt Apr 15, 2017
e6be4b9
build: make linter targets silent
thefourtheye Apr 15, 2017
b7aeed7
benchmark: improve cli error message
mscdex Apr 15, 2017
440f4d4
Revert "benchmark: fix CLI arguments check in common.js"
jasnell Apr 17, 2017
8ac387b
net: refactor onSlaveClose in Server.close
claudiorodriguez Apr 11, 2017
320b80b
test: add --use-bundled-ca to tls-cnnic-whitelist
danbev Apr 13, 2017
3d8878c
doc: correct git fix whitespace command
matkoniecz Apr 16, 2017
a34cccc
test: use dynamic port in 3 test-cluster-worker tests
Apr 17, 2017
d0ba631
doc: fix encoding string in buffer example
MapleGu Apr 18, 2017
a7e13e0
test: remove common.PORT from test-cluster*.js
tarunbatra Apr 16, 2017
611c23c
test: use dynamic port in test-cluster-bind-twice
Trott Apr 15, 2017
af0067c
doc: avoid colloquialism
Trott Apr 15, 2017
3fc25dc
doc: run tests before landing changes
Trott Apr 15, 2017
83a28ee
tools: update gyp to eb296f6
refack Mar 14, 2017
675244a
gyp: inherit parent for `*.host`
jbergstroem Apr 13, 2016
6003958
tools: add compile_commands.json gyp generator
bnoordhuis Aug 5, 2016
3c8e366
tools: update certdata.txt
bnoordhuis Apr 13, 2017
db585c9
crypto: update root certificates
bnoordhuis Apr 13, 2017
922c457
test: buffer should always be stringified
lucamaraschi Apr 12, 2017
8e3d54a
test: complete coverage of lib/child_process.js
cjihrig Apr 12, 2017
e09202b
net: don't create unnecessary closure
bnoordhuis Apr 11, 2017
dcc9e1a
net: don't create unnecessary closure
bnoordhuis Apr 11, 2017
d0b1be1
net: remove unnecessary process.nextTick()
bnoordhuis Apr 11, 2017
0e40e6d
net: don't concatenate strings in debug logging
bnoordhuis Apr 11, 2017
94385c6
net: don't normalize twice in Socket#connect()
bnoordhuis Apr 11, 2017
9db4f19
net: require 'dns' only once
bnoordhuis Apr 11, 2017
e919941
test: add test for child_process benchmark
joyeecheung Apr 11, 2017
38278db
doc: unify spaces in a querystring.md code example
vsemozhetbyt Apr 17, 2017
a75fbe0
test: increase coverage for buffer.js
Trott Apr 17, 2017
f48d06c
test: dynamic port in cluster worker send
Apr 17, 2017
9250f02
doc: clarify the callback arguments of dns.resolve
silverwind Apr 19, 2017
13441eb
tools: add table parsing capability to the doctool
silverwind Apr 19, 2017
ddc3528
test: remove uses of common.PORT in test-tls-client tests
z0al Apr 17, 2017
a213320
test: dynamic port in cluster worker disconnect
Apr 17, 2017
eac0d70
test: console.log removed from test-net-localport
fhalde Apr 18, 2017
3726131
test: minimize time for child_process benchmark
Trott Apr 19, 2017
08ba9d4
benchmark: fix CLI arguments check in common.js
vsemozhetbyt Apr 15, 2017
7d87edc
benchmark: add benchmark for string concatenations
vsemozhetbyt Apr 17, 2017
b09bf51
repl: support hidden history file on Windows
bzoz Apr 20, 2017
eb78722
doc: add lucamaraschi to collaborators
lucamaraschi Apr 20, 2017
434873d
doc: fix typo in fs.watch() description
ivoputzer Apr 20, 2017
3703fc6
doc: update link to Code of Conduct
aautem Apr 20, 2017
e3ccc31
test: set benchmark-child-process flaky on windows
Trott Apr 21, 2017
96b2faa
test: fix parallel/test-setproctitle.js on alpine
DavidCai1111 Apr 19, 2017
e77f1e2
v8: fix stack overflow in recursive method
bnoordhuis Apr 17, 2017
f84a5e1
test: use JSON.stringify to trigger stack overflow
hashseed Mar 8, 2017
78ac637
build: fix case in lib names
refack Apr 19, 2017
0fb69de
test: use duplex streams in duplex stream test
cjihrig Apr 19, 2017
4276c21
doc: add suggestion to use --3way
mhdawson Apr 19, 2017
184941e
src: remove TODO about uv errno removal
danbev Apr 20, 2017
661ff6d
test: move test-debugger-repeat-last to sequential
kumarrishav Apr 17, 2017
47b3992
doc: make commit guidelines easier to reference
bf4 Mar 7, 2017
f0b5afe
test: dynamic port in cluster worker dgram
Apr 18, 2017
08951a1
src: replace IsConstructCalls with lambda
danbev Apr 20, 2017
b52f77d
doc: fix typo in doc/api/process.md
morrme Apr 23, 2017
520f876
src: add fcntl.h include to node.cc
bzoz Apr 20, 2017
200e899
tools: add `root: true` in main .eslintrc.yaml
vsemozhetbyt Apr 21, 2017
cfd9144
src: remove extraneous dot
MylesBorins Apr 24, 2017
d10eb83
test: remove flaky designation for test on AIX
Trott Apr 21, 2017
14e93f6
test: dynamic port in parallel cluster tests
Apr 22, 2017
1a4bf43
test: improve test-process-chdir
vperezma Apr 22, 2017
2021ea1
test: refactored context type err message to regex
Apr 22, 2017
80ceb04
test: replace assertion error check with regex
TheLady Apr 22, 2017
539ffae
url: improve descriptiveness of identifier
Trott Apr 22, 2017
8ae5afe
test: dynamic port in cluster ipc throw
Apr 21, 2017
b82e076
test: dynamic port in cluster eaddrinuse
Apr 20, 2017
989d344
test: use block scoped variable names
neeharv Apr 20, 2017
cbdf9a9
lib: fix typo in comments in module.js
WORMSS Apr 20, 2017
313b205
doc: prepare js code for eslint-plugin-markdown
vsemozhetbyt Apr 21, 2017
ac52923
url: update WHATWG URL API to latest spec
TimothyGu Apr 19, 2017
258eeaa
tools: enable no-useless-return eslint rule
cjihrig Apr 21, 2017
51eafe8
meta: update authors list
aashil Feb 25, 2017
744ed94
src: expose V8's IsNativeError() in util bindings
cjihrig Apr 20, 2017
1316c77
doc: improve randomfill and fix broken link
thefourtheye Apr 20, 2017
da01ff7
src: remove invalid comment
cjihrig Apr 25, 2017
45facc8
doc: fix an unclear wording in readline.md
vsemozhetbyt Apr 23, 2017
46a7c29
tools: use no-useless-concat ESLint rule
vsemozhetbyt Apr 23, 2017
d15b1c4
test: add mustCall in test-timers-clearImmediate
ChatbotSchool Apr 22, 2017
e36a256
test: cleanup test-fs-watch.js
RobotMermaid Apr 22, 2017
660e58c
test: improved type checking with regex
Apr 22, 2017
8e6d440
test: improve test-process-kill-pid
QueueHefner Apr 22, 2017
d154aaf
deps: remove **/node_modules/form-data/README.md
Fishrock123 Apr 25, 2017
60daaae
url: always show password for URL instances
mscdex Apr 15, 2017
745dea9
test: use common.js to check platform
krydos Apr 24, 2017
212475b
build: use do_not_edit variable where possible
krydos Apr 23, 2017
75e053b
test: cleanup test-util-inherits.js
RobotMermaid Apr 22, 2017
3e9e6af
test: use common.mustCall in test-https-strict
weewey Apr 26, 2017
dd1dced
test: remove eslint comments
cjihrig Apr 26, 2017
79dff99
test: remove eslint comments from test-util.js
cjihrig Apr 26, 2017
fc96d1a
doc: document url.domainTo* methods separately
TimothyGu Apr 27, 2017
395380a
doc: add Added-in metadata for WHATWG URL
TimothyGu Apr 27, 2017
373e9f0
benchmark: add benchmark for v8.getHeap*Statistics
jasnell Apr 26, 2017
360efe4
doc: fix examples in repl.md
vsemozhetbyt Apr 27, 2017
224fd3a
benchmark: terminate child process on Windows
Trott Apr 25, 2017
90bba9f
test,doc: document `crashOnUnhandledRejection()`
addaleax Apr 27, 2017
819c131
test: improve test-tcp-wrap-listen
QueueHefner Apr 22, 2017
f60a2e9
doc: fixup the collaborators list
aqrln Apr 29, 2017
d78adcc
test: support multiple warnings in checkWarning
apexskier Mar 13, 2017
cd54208
process: cast promise rejection reason to string
apexskier Mar 13, 2017
9da719a
test: fix test filenames
mscdex Apr 17, 2017
caf6506
build: add target for checking for perm deopts
mscdex Apr 17, 2017
7d0adc6
stream: fix permanent deoptimizations
mscdex Apr 24, 2017
84484b7
fs: fix permanent deoptimizations
mscdex Apr 24, 2017
933b6b5
cluster: fix permanent deoptimizations
mscdex Apr 24, 2017
b573f77
process: fix permanent deoptimizations
mscdex Apr 24, 2017
4a08288
net: fix permanent deoptimizations
mscdex Apr 24, 2017
1ac331b
readline: fix permanent deoptimizations
mscdex Apr 24, 2017
7af2e79
test: fix permanent deoptimizations
mscdex Apr 24, 2017
c2c6287
doc: fix formatting of TOC
refack Apr 28, 2017
592db37
test: move test to sequential for reliability
Trott Apr 27, 2017
f5a702e
stream: Fixes missing 'unpipe' event
zaide-chris Mar 16, 2017
b5e70ae
2017-05-02, Version 7.10.0 (Current)
evanlucas May 1, 2017
69a8053
Working on v7.10.1
evanlucas May 3, 2017
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
Prev Previous commit
Next Next commit
buffer,util: refactor for performance
internal/util.js definied toInteger() and toLength() but they were only
used by buffer.js. Inlining these small functions results in a small but
statistically-significant performance gain.

PR-URL: #12153
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and evanlucas committed May 1, 2017
commit 0c0241ff7396c8b25253cbcb01ea1d6f33722f8e
10 changes: 8 additions & 2 deletions lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ function fromArrayLike(obj) {
}

function fromArrayBuffer(obj, byteOffset, length) {
byteOffset = internalUtil.toInteger(byteOffset);
// convert byteOffset to integer
byteOffset = +byteOffset;
byteOffset = byteOffset ? Math.trunc(byteOffset) : 0;

const maxLength = obj.byteLength - byteOffset;

Expand All @@ -238,7 +240,11 @@ function fromArrayBuffer(obj, byteOffset, length) {
if (length === undefined) {
length = maxLength;
} else {
length = internalUtil.toLength(length);
// convert length to non-negative integer
length = +length;
length = length ? Math.trunc(length) : 0;
length = length <= 0 ? 0 : Math.min(length, Number.MAX_SAFE_INTEGER);

if (length > maxLength)
throw new RangeError("'length' is out of bounds");
}
Expand Down
18 changes: 0 additions & 18 deletions lib/internal/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,3 @@ exports.cachedResult = function cachedResult(fn) {
return result.slice();
};
};

/*
* Implementation of ToInteger as per ECMAScript Specification
* Refer: http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger
*/
const toInteger = exports.toInteger = function toInteger(argument) {
const number = +argument;
return Number.isNaN(number) ? 0 : Math.trunc(number);
};

/*
* Implementation of ToLength as per ECMAScript Specification
* Refer: http://www.ecma-international.org/ecma-262/6.0/#sec-tolength
*/
exports.toLength = function toLength(argument) {
const len = toInteger(argument);
return len <= 0 ? 0 : Math.min(len, Number.MAX_SAFE_INTEGER);
};
32 changes: 0 additions & 32 deletions test/parallel/test-internal-util-toInteger.js

This file was deleted.

35 changes: 0 additions & 35 deletions test/parallel/test-internal-util-toLength.js

This file was deleted.