You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mc_t14 is being defined here, not used. CSL means comma-separated list. This is a kind of IR node in McSAF (extends NameExpr) that gets created by some simplification transformations. This is described in Jesse Doherty's thesis (search for CSL). CSL[name] is how McSAF pretty prints a CSLExpr -- it's not intended to be valid MATLAB.
Tame IR also has a notion of comma-separated list (TIRCommaSeparatedList), and it does pretty-print as valid MATLAB. My guess is somehow a McSAF CSLExpr node made it into a Tame IR AST and the Tamer is not expecting it (treating it the same as a NameExpr).
I'm not sure what this means -- it's possible the Tamer is not supposed to deal with CSLExpr but some simplifications are being run that the Tamer is not expecting. Or maybe you just need to add code in the right place to explicitly handle CSLExpr.
From the McSAF thesis, the reason why we need CSL is probably the following special case in MATLAB. The c1{:} will return two values, while c1 returns one cell. If the expression is changed to c1{1:2} or c1{[1,1,2]}, the number of return values is 2 or 3. The exact number of return values is determined in run-time. That feature will confuse function calls, such as foo(c1{i}), so that we don't know the exact number of arguments passed into the function foo.
>> c1={1,5};
>> c1{:}
ans =1
ans =5
>> [t1,t2] = c1{:}
t1 =1
t2 =5
Source code
Generated TameIR
Problems:
mc_t14
has not been initialized before it is used as an index.The text was updated successfully, but these errors were encountered: