Commit 8abcc76
src: move process.nextTick and promise setup into node_task_queue.cc
This patch:
- Moves the process.nextTick and promise setup C++ code into
node_task_queue.cc which is exposed as
`internalBinding('task_queue')`
- Makes `lib/internal/process/promises.js` and
`lib/internal/process/next_tick.js` as side-effect-free
as possible
- Removes the bootstrapper object being passed into
`bootstrap/node.js`, let `next_tick.js` and `promises.js`
load whatever they need from `internalBinding('task_queue')`
instead.
- Rename `process._tickCallback` to `runNextTicks` internally
for clarity but still expose it as `process._tickCallback`.
PR-URL: #25163
Refs: #24961
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>1 parent 733af61 commit 8abcc76Copy full SHA for 8abcc76
File tree
Expand file treeCollapse file tree
13 files changed
+199
-192
lines changedOpen diff view settings
Filter options
- lib/internal
- bootstrap
- process
- src
- test
- message
- parallel
Expand file treeCollapse file tree
13 files changed
+199
-192
lines changedOpen diff view settings
Collapse file
lib/internal/bootstrap/node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js+13-7Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | | - |
| 17 | + |
18 | 18 | |
19 | 19 | |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | 20 | |
25 | 21 | |
26 | 22 | |
| ||
105 | 101 | |
106 | 102 | |
107 | 103 | |
108 | | - |
109 | | - |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
110 | 116 | |
111 | 117 | |
112 | 118 | |
|
Collapse file
lib/internal/process/next_tick.js
Copy file name to clipboard+129-119Lines changed: 129 additions & 119 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
63 | | - |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | | - |
69 | | - |
70 | | - |
71 | | - |
72 | | - |
73 | | - |
74 | | - |
75 | | - |
76 | | - |
77 | | - |
78 | | - |
79 | | - |
80 | | - |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
81 | 46 | |
82 | | - |
83 | | - |
84 | | - |
85 | | - |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | | - |
98 | | - |
99 | | - |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
100 | 72 | |
101 | | - |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
102 | 78 | |
103 | | - |
104 | | - |
105 | | - |
106 | | - |
107 | | - |
108 | | - |
109 | | - |
110 | | - |
111 | | - |
112 | | - |
113 | | - |
114 | | - |
115 | | - |
116 | | - |
117 | | - |
118 | | - |
119 | | - |
120 | | - |
121 | | - |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
122 | 96 | |
| 97 | + |
| 98 | + |
123 | 99 | |
124 | | - |
125 | | - |
126 | | - |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
127 | 119 | |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
128 | 124 | |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
Collapse file
lib/internal/process/promises.js
Copy file name to clipboardExpand all lines: lib/internal/process/promises.js+9-9Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
| 4 | + |
| 5 | + |
| 6 | + |
4 | 7 | |
5 | 8 | |
6 | 9 | |
7 | 10 | |
8 | | - |
9 | 11 | |
10 | 12 | |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
| 13 | + |
19 | 14 | |
20 | 15 | |
21 | 16 | |
| ||
124 | 119 | |
125 | 120 | |
126 | 121 | |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
327 | 327 | |
328 | 328 | |
329 | 329 | |
330 | | - |
331 | 330 | |
332 | 331 | |
333 | 332 | |
| ||
374 | 373 | |
375 | 374 | |
376 | 375 | |
| 376 | + |
377 | 377 | |
378 | 378 | |
379 | 379 | |
|
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
362 | 362 | |
363 | 363 | |
364 | 364 | |
365 | | - |
| 365 | + |
366 | 366 | |
367 | 367 | |
368 | 368 | |
| ||
377 | 377 | |
378 | 378 | |
379 | 379 | |
380 | | - |
| 380 | + |
381 | 381 | |
382 | 382 | |
383 | 383 | |
|
Collapse file
-6Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1163 | 1163 | |
1164 | 1164 | |
1165 | 1165 | |
1166 | | - |
1167 | | - |
1168 | | - |
1169 | | - |
1170 | 1166 | |
1171 | 1167 | |
1172 | 1168 | |
1173 | | - |
1174 | 1169 | |
1175 | 1170 | |
1176 | 1171 | |
1177 | 1172 | |
1178 | 1173 | |
1179 | | - |
1180 | 1174 | |
1181 | 1175 | |
1182 | 1176 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
52 | 52 | |
53 | 53 | |
54 | 54 | |
| 55 | + |
55 | 56 | |
56 | 57 | |
57 | 58 | |
|
0 commit comments