CPC G06F 8/60 (2013.01) [G06F 8/427 (2013.01)] | 16 Claims |
1. A computer-implemented method for optimizing a source code file containing a plurality of user-defined functions for deployment on a serverless platform as a plurality of single-function files, the method comprising:
receiving an input source code file;
creating a mapping table from the input source code file, wherein creating the mapping table from the input source code file comprises:
creating a list of symbols from the input source code file;
creating a list of statements from the input source code file;
performing a forward mapping of each symbol in the list of symbols; and
performing a dependency mapping of each statement in the list of statements;
mapping a first function from the input source code file, wherein mapping the first function from the input source code file comprises:
selecting a beginning symbol from the list of symbols;
following a forward path from the selected symbol to a corresponding statement,
wherein the forward path is based on the forward mapping; and
marking the corresponding statement for inclusion;
generating a single-function output file for the first function; and
deploying the single-function output file.
|