Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 06113b8

Browse filesBrowse files
rvaggMyles Borins
authored andcommitted
node: s/doNTCallbackX/nextTickCallbackWithXArgs/
Rename doNTCallback functions for clarity when profiling, these make sense internally but the "NT" in particular is a bit obtuse to be immediately understandable by non-core developers. PR-URL: #4167 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
1 parent 70974e9 commit 06113b8
Copy full SHA for 06113b8

File tree

Expand file treeCollapse file tree

4 files changed

+24
-24
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

4 files changed

+24
-24
lines changed
Open diff view settings
Collapse file

‎src/node.js‎

Copy file name to clipboardExpand all lines: src/node.js
+15-15Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -345,20 +345,20 @@
345345
// callback invocation with small numbers of arguments to avoid the
346346
// performance hit associated with using `fn.apply()`
347347
if (args === undefined) {
348-
doNTCallback0(callback);
348+
nextTickCallbackWith0Args(callback);
349349
} else {
350350
switch (args.length) {
351351
case 1:
352-
doNTCallback1(callback, args[0]);
352+
nextTickCallbackWith1Arg(callback, args[0]);
353353
break;
354354
case 2:
355-
doNTCallback2(callback, args[0], args[1]);
355+
nextTickCallbackWith2Args(callback, args[0], args[1]);
356356
break;
357357
case 3:
358-
doNTCallback3(callback, args[0], args[1], args[2]);
358+
nextTickCallbackWith3Args(callback, args[0], args[1], args[2]);
359359
break;
360360
default:
361-
doNTCallbackMany(callback, args);
361+
nextTickCallbackWithManyArgs(callback, args);
362362
}
363363
}
364364
if (1e4 < tickInfo[kIndex])
@@ -386,20 +386,20 @@
386386
// callback invocation with small numbers of arguments to avoid the
387387
// performance hit associated with using `fn.apply()`
388388
if (args === undefined) {
389-
doNTCallback0(callback);
389+
nextTickCallbackWith0Args(callback);
390390
} else {
391391
switch (args.length) {
392392
case 1:
393-
doNTCallback1(callback, args[0]);
393+
nextTickCallbackWith1Arg(callback, args[0]);
394394
break;
395395
case 2:
396-
doNTCallback2(callback, args[0], args[1]);
396+
nextTickCallbackWith2Args(callback, args[0], args[1]);
397397
break;
398398
case 3:
399-
doNTCallback3(callback, args[0], args[1], args[2]);
399+
nextTickCallbackWith3Args(callback, args[0], args[1], args[2]);
400400
break;
401401
default:
402-
doNTCallbackMany(callback, args);
402+
nextTickCallbackWithManyArgs(callback, args);
403403
}
404404
}
405405
if (1e4 < tickInfo[kIndex])
@@ -413,7 +413,7 @@
413413
} while (tickInfo[kLength] !== 0);
414414
}
415415

416-
function doNTCallback0(callback) {
416+
function nextTickCallbackWith0Args(callback) {
417417
var threw = true;
418418
try {
419419
callback();
@@ -424,7 +424,7 @@
424424
}
425425
}
426426

427-
function doNTCallback1(callback, arg1) {
427+
function nextTickCallbackWith1Arg(callback, arg1) {
428428
var threw = true;
429429
try {
430430
callback(arg1);
@@ -435,7 +435,7 @@
435435
}
436436
}
437437

438-
function doNTCallback2(callback, arg1, arg2) {
438+
function nextTickCallbackWith2Args(callback, arg1, arg2) {
439439
var threw = true;
440440
try {
441441
callback(arg1, arg2);
@@ -446,7 +446,7 @@
446446
}
447447
}
448448

449-
function doNTCallback3(callback, arg1, arg2, arg3) {
449+
function nextTickCallbackWith3Args(callback, arg1, arg2, arg3) {
450450
var threw = true;
451451
try {
452452
callback(arg1, arg2, arg3);
@@ -457,7 +457,7 @@
457457
}
458458
}
459459

460-
function doNTCallbackMany(callback, args) {
460+
function nextTickCallbackWithManyArgs(callback, args) {
461461
var threw = true;
462462
try {
463463
callback.apply(null, args);
Collapse file

‎test/message/eval_messages.out‎

Copy file name to clipboardExpand all lines: test/message/eval_messages.out
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SyntaxError: Strict mode code may not include a with statement
77
at Object.<anonymous> ([eval]-wrapper:*:*)
88
at Module._compile (module.js:*:*)
99
at node.js:*:*
10-
at doNTCallback0 (node.js:*:*)
10+
at nextTickCallbackWith0Args (node.js:*:*)
1111
at process._tickCallback (node.js:*:*)
1212
42
1313
42
@@ -20,7 +20,7 @@ Error: hello
2020
at Object.<anonymous> ([eval]-wrapper:*:*)
2121
at Module._compile (module.js:*:*)
2222
at node.js:*:*
23-
at doNTCallback0 (node.js:*:*)
23+
at nextTickCallbackWith0Args (node.js:*:*)
2424
at process._tickCallback (node.js:*:*)
2525
[eval]:1
2626
throw new Error("hello")
@@ -31,7 +31,7 @@ Error: hello
3131
at Object.<anonymous> ([eval]-wrapper:*:*)
3232
at Module._compile (module.js:*:*)
3333
at node.js:*:*
34-
at doNTCallback0 (node.js:*:*)
34+
at nextTickCallbackWith0Args (node.js:*:*)
3535
at process._tickCallback (node.js:*:*)
3636
100
3737
[eval]:1
@@ -43,7 +43,7 @@ ReferenceError: y is not defined
4343
at Object.<anonymous> ([eval]-wrapper:*:*)
4444
at Module._compile (module.js:*:*)
4545
at node.js:*:*
46-
at doNTCallback0 (node.js:*:*)
46+
at nextTickCallbackWith0Args (node.js:*:*)
4747
at process._tickCallback (node.js:*:*)
4848
[eval]:1
4949
var ______________________________________________; throw 10
Collapse file

‎test/message/nexttick_throw.out‎

Copy file name to clipboardExpand all lines: test/message/nexttick_throw.out
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
^
55
ReferenceError: undefined_reference_error_maker is not defined
66
at *test*message*nexttick_throw.js:*:*
7-
at doNTCallback0 (node.js:*:*)
7+
at nextTickCallbackWith0Args (node.js:*:*)
88
at process._tickCallback (node.js:*:*)
99
at Function.Module.runMain (module.js:*:*)
1010
at startup (node.js:*:*)
Collapse file

‎test/message/stdin_messages.out‎

Copy file name to clipboardExpand all lines: test/message/stdin_messages.out
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SyntaxError: Strict mode code may not include a with statement
88
at Object.<anonymous> ([stdin]-wrapper:*:*)
99
at Module._compile (module.js:*:*)
1010
at node.js:*:*
11-
at doNTCallback0 (node.js:*:*)
11+
at nextTickCallbackWith0Args (node.js:*:*)
1212
at process._tickCallback (node.js:*:*)
1313
42
1414
42
@@ -22,7 +22,7 @@ Error: hello
2222
at Object.<anonymous> ([stdin]-wrapper:*:*)
2323
at Module._compile (module.js:*:*)
2424
at node.js:*:*
25-
at doNTCallback0 (node.js:*:*)
25+
at nextTickCallbackWith0Args (node.js:*:*)
2626
at process._tickCallback (node.js:*:*)
2727

2828
[stdin]:1
@@ -34,7 +34,7 @@ Error: hello
3434
at Object.<anonymous> ([stdin]-wrapper:*:*)
3535
at Module._compile (module.js:*:*)
3636
at node.js:*:*
37-
at doNTCallback0 (node.js:*:*)
37+
at nextTickCallbackWith0Args (node.js:*:*)
3838
at process._tickCallback (node.js:*:*)
3939
100
4040

@@ -47,7 +47,7 @@ ReferenceError: y is not defined
4747
at Object.<anonymous> ([stdin]-wrapper:*:*)
4848
at Module._compile (module.js:*:*)
4949
at node.js:*:*
50-
at doNTCallback0 (node.js:*:*)
50+
at nextTickCallbackWith0Args (node.js:*:*)
5151
at process._tickCallback (node.js:*:*)
5252

5353
[stdin]:1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.