Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Use the externally used records marker. * Set marker to always be true for the OF. * Use a map/dictionary instead of keeping separate lists. - Use a map (string, record Declaration) to keep a track of records in the SimCode. This allows for a simpler and quicker check. In addition we can update entries easily. * Add MetaModelica records to the map as well. * Debug help * Fix traversal order to avoid possible(?) infinite recursion. * Disable the old creation of record declarations. - See what fails in the testsuite. - It was actually affecting some tests because nested records were cycling back and messing with the order. Not exactly sure how but is not relevant anymore. * Simplify processing of record declrations. - Remove returned lists from functions: elaborateNestedRecordDeclarations elaborateRecordDeclarationsFromTypes elaborateRecordDeclarationsForRecord elaborateNestedRecordDeclarations - Remove input lists from functions: - elaborateRecordDeclarationsFromTypes * Make sure we do not overwrite true values to false. - If an entry already exists in the map and we always update, then there is a chance we might overwrite a 'true' value with a 'false' value for external conversion marker. Check if the entry exists and if it is marked false while then new incoming entry is marked true, then update it. Otherwise do nothing. * Remove input lists from functions - Remove input lists from functions: - elaborateNestedRecordDeclarations - elaborateRecordDeclarationsForRecord * Remove input and output lists from more functions. - Removed from - elaborateRecordDeclarationsForMetarecords * Remove input and output lists from elaborateRecordDeclarations. * Remove input and output lists from more functions. - Remove input and output lists from functions: - elaborateFunctions2 - elaborateFunction * Convert recursive functions to loops. - Recursive functions converted to loops: - elaborateNestedRecordDeclarations - elaborateRecordDeclarationsForMetarecords - elaborateRecordDeclarationsFromTypes * Rename some functions to be more descriptive. - elaborateRecordDeclarationsForMetarecords -> collectRecDeclsFromMetaRecordCallExps - elaborateNestedRecordDeclarations -> collectRecDeclsFromTypesVars - elaborateRecordDeclarationsFromTypes -> collectRecDeclsFromTypes - elaborateRecordDeclarationsForRecord -> collectRecDeclsFromType * Change how records are collected from metarecordcalls - Instead of: - traversing all expressions, collecting all meta record calls to a list, and then traversing this list to collect record declarations - collect record declarations while traversing all expressions (without collecting metarecordcalls into a whole new list.) * Rename functions to be more descriptive. - elaborateRecordDeclarations -> collectRecDeclsFromElems * Convert recursive functions to loops. - Convert recursive functions to loops: - collectRecDeclsFromElems (used to be `elaborateRecordDeclarations`) * Some minor cleanup and renaming. - declMap -> recDeclsMap - needsExternalConversion -> usedExternally
- Loading branch information
Showing
9 changed files
with
204 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters