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 8a5e434

Browse filesBrowse files
committed
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 da5ac55 commit 8a5e434
Copy full SHA for 8a5e434

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
@@ -356,20 +356,20 @@
356356
// callback invocation with small numbers of arguments to avoid the
357357
// performance hit associated with using `fn.apply()`
358358
if (args === undefined) {
359-
doNTCallback0(callback);
359+
nextTickCallbackWith0Args(callback);
360360
} else {
361361
switch (args.length) {
362362
case 1:
363-
doNTCallback1(callback, args[0]);
363+
nextTickCallbackWith1Arg(callback, args[0]);
364364
break;
365365
case 2:
366-
doNTCallback2(callback, args[0], args[1]);
366+
nextTickCallbackWith2Args(callback, args[0], args[1]);
367367
break;
368368
case 3:
369-
doNTCallback3(callback, args[0], args[1], args[2]);
369+
nextTickCallbackWith3Args(callback, args[0], args[1], args[2]);
370370
break;
371371
default:
372-
doNTCallbackMany(callback, args);
372+
nextTickCallbackWithManyArgs(callback, args);
373373
}
374374
}
375375
if (1e4 < tickInfo[kIndex])
@@ -397,20 +397,20 @@
397397
// callback invocation with small numbers of arguments to avoid the
398398
// performance hit associated with using `fn.apply()`
399399
if (args === undefined) {
400-
doNTCallback0(callback);
400+
nextTickCallbackWith0Args(callback);
401401
} else {
402402
switch (args.length) {
403403
case 1:
404-
doNTCallback1(callback, args[0]);
404+
nextTickCallbackWith1Arg(callback, args[0]);
405405
break;
406406
case 2:
407-
doNTCallback2(callback, args[0], args[1]);
407+
nextTickCallbackWith2Args(callback, args[0], args[1]);
408408
break;
409409
case 3:
410-
doNTCallback3(callback, args[0], args[1], args[2]);
410+
nextTickCallbackWith3Args(callback, args[0], args[1], args[2]);
411411
break;
412412
default:
413-
doNTCallbackMany(callback, args);
413+
nextTickCallbackWithManyArgs(callback, args);
414414
}
415415
}
416416
if (1e4 < tickInfo[kIndex])
@@ -424,7 +424,7 @@
424424
} while (tickInfo[kLength] !== 0);
425425
}
426426

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

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

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

460-
function doNTCallback3(callback, arg1, arg2, arg3) {
460+
function nextTickCallbackWith3Args(callback, arg1, arg2, arg3) {
461461
var threw = true;
462462
try {
463463
callback(arg1, arg2, arg3);
@@ -468,7 +468,7 @@
468468
}
469469
}
470470

471-
function doNTCallbackMany(callback, args) {
471+
function nextTickCallbackWithManyArgs(callback, args) {
472472
var threw = true;
473473
try {
474474
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.