async calls WIP

This commit is contained in:
Dmitry Vasilev
2022-10-26 13:11:51 +08:00
parent a78ba0fa78
commit c3365fe1ee
8 changed files with 112 additions and 19 deletions

View File

@@ -447,10 +447,15 @@ nodes that are in the second tree that are not in the first tree
*/
const merge_calltrees = (prev, next) => {
return Object.fromEntries(
Object.entries(prev).map(([module, {exports, calls}]) =>
Object.entries(prev).map(([module, {is_external, exports, calls}]) =>
[
module,
{exports, calls: merge_calltree_nodes(calls, next[module].calls)[1]}
is_external
? {is_external, exports}
: {
exports,
calls: merge_calltree_nodes(calls, next[module].calls)[1]
}
]
)
)