-
Notifications
You must be signed in to change notification settings - Fork 23
Compiler steps for an RCfunction (or nimbleFunction class method)
Steps in processing an "RCfunction", which is a simple nimbleFunction (no setup code) or a method of a nimbleFunction class.
These steps are in the process method of RCfunProcessing.
-
matchKeywords("Keyword processing step 1"): fills and order arguments.-
matchKeywords_recursewalks the parse tree. -
matchFunctionscontains the prototypes for matching. -
Note: For a nimbleFunction class, keyword processing is invoked in a separate step.
-
-
processKeywords("Keyword processing step 2"): Creates new setup code and setup outputs, and optionally modifies a call.-
processKeywords_recursewalks the parse tree. -
keywordListcontains keyword processor objects.
-
-
convert the body (code) to exprClass objects, which are a bidirectional syntax tree with fields for annontation
-
process specific calls that need simple changes such as converting one name to another * build intermediate variables for the few cases where this is always necessary * initialize type information (dimensionality and scalar types) * setSizes, the most intensive step: annotates every nodes of the syntax tree with dimensionality, type, and eigenizability (yes, no, or maybe for conversion to C++ Eigen package code). This also generates run-time size checks, inserts intermediate variables, and populations the local symbol table with locally created objects. * insert size checks and other new lines generated by size processing * label sections of the syntax tree for eigenization * convert labeled sections into a syntax tree for C++ Eigen library, including generation of map variables and their initialization and insertion into the symbol table. * insert code needed for maps that were identified. Maps are indexed subsets of larger objects, such as X[2:4, ]