UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

31 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.executeExceptionQuery = executeExceptionQuery; const query_function_filter_1 = require("../../query-function-filter"); const exceptions_of_function_1 = require("../../../dataflow/fn/exceptions-of-function"); /** * Execute exception function inspection queries on the given analyzer. */ async function executeExceptionQuery({ analyzer }, queries) { const start = Date.now(); const { cg, fns } = await query_function_filter_1.QueryFunctionFilter.inCallGraph(queries, analyzer); const result = {}; for (const [id] of fns) { if (result[id]) { continue; } const res = (0, exceptions_of_function_1.calculateExceptionsOfFunction)(id, cg, result); for (const [k, v] of Object.entries(res)) { if (!result[k]) { result[k] = v; } } } return { '.meta': { timing: Date.now() - start }, exceptions: result }; } //# sourceMappingURL=inspect-exception-query-executor.js.map