Skip to content

Changes

Started 6 days 4 hr ago
Took 43 min on w.r7950.win.1.maas

Summary

  1. MM frontend: fix uninit-output bugs (#15662) (details)
  2. Removed duplicate variable (#15665) (details)
Commit e399bfca105028d845a5541e2d275b0405fcbc9d by noreply
MM frontend: fix uninit-output bugs (#15662)

* Expression.addVec was unused (only Expression.subVec is called from
  ResolveLoops.mo). Remove addVec; the early-\`return;\` in its body
  reads back an uninitialised output array.

* Expression.subVec hit the same uninit-output bug on the size-mismatch
  path. Replace \`return;\` with \`fail();\` so an error message at the
  caller surfaces, matching the function's documented behaviour.

* Static.elabExp_If: rewrote the inner \`_ := matchcontinue()\` to
  return its values directly via \`(outCache, outExp, outProperties)
  := matchcontinue() … then (outCache, outExp, outProperties); \`.
  Returning the values explicitly makes the data flow direct and
  easier to analyze.

* Static.deduceIterationRange: initialise \`outRange\` and
  \`outProperties\` with neutral sentinels (\`DAE.ICONST(0)\` /
  \`DAE.PROP(T_UNKNOWN_DEFAULT, C_UNKNOWN)\`) to make the analysis
  easier. (It was safe before, just hard to prove)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The file was modifiedOMCompiler/Compiler/FrontEnd/Expression.mo (diff)
The file was modifiedOMCompiler/Compiler/FrontEnd/Static.mo (diff)
Commit b53c3e12d283feb88abbcb46c3ea80c56d0a637a by noreply
Removed duplicate variable (#15665)
The file was modifiedOMCompiler/Compiler/SimCode/SimCodeUtil.mo (diff)