[ClavaLaraApi] Fixes bug with memoi code gen getting the table from DMT
@@ -311,7 +311,7 @@ MemoiGen.prototype._generateFromReport = function() {
if(site === "global") {
var sTmp = this._generateAll(report);
- for(var sT of sTmp) {
+ for(var sT of sTmp.values()) {
s.add(sT);
}
} else {
@@ -495,7 +495,7 @@ MemoiGen.prototype._generateGeneric = function(wrapperName, report) {
// generate the table (and reset) code and add it before the wrapper
var tableCode = MemoiCodeGen.generateTableCode(
- dmt,
+ dmt.getTable(),
this._tableSize,
this._target._numInputs, this._target._numOutputs,
this._isOnline,
@@ -505,6 +505,8 @@ MemoiGen.prototype._generateGeneric = function(wrapperName, report) {
);
$function.insert("before", tableCode);
+
+
// generate the logic code and add it before the original call
var paramNames = [];
for(var $param of $function.params) {
