Skip to content

Commit

Permalink
Fixes for BUG: #1370
Browse files Browse the repository at this point in the history
- Compiler/susan_codegen/SimCode/SimCodeC.tpl
  + fixed iterators for functions not returning anything (added empty)
  + added more comments to the C code to understand where are things coming from (we can remove them later)
  + changed the order in which we evaluate function arguments and function variable declarations
  + changed the order in which we evaluate external function: vardecl->bivar->extArgs.
  + removed duplicates in the list map of extFunCallVarcopyF77
  + changed handling of default value in extFunCallBiVarF77
  + fixed handling of modelica_string send to Fortran (should not be prefixed by &)
  + changed algStmtTupleAssign to have a preExp and afterExp (before the preExp in 
    writeLhsCref was never unparsed anywhere as <%preExp%> was before it??!!)
  + scalarLhsCref used daeExpCrefRhs??!! which was rather totally wrong
    for anything besides scalar component references; now it uses a new daeExpCrefLhs
    which has the causality reversed (for some parts as I haven't implemented all cases).
  + all *Lhs* templates now take an afterExp buffer instead of preExp to do more things
    after the actual statement (such as array slicing, etc); used in heavily in 
    Modelica.Math.Matrices.mos, i.e. 
    (eigenvalues[:, 1],eigenvalues[:, 2],eigenvectors, info) := LAPACK.dgeev(A);
    first we bind the call outputs to temps, then update the arrays slices using
    indexed_assign_<%type%> as an afterExp.
- more error messages in the array handling inside c_runtime 
- added test to test Lapack and BUG #1370 in testsuite/mosfiles/TestLapack.mos
- added test to test Modelica.Math.Matrices in testsuite/libraries/msl31/Modelica.Math.Matrices.mos
- moved main from functions to the actual generated code for the model.
- add SimCodeAdevs.mo to testsuite/bootstrapping/LoadCompilerSources.mos
- all tests go.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9366 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Jun 25, 2011
1 parent 5fe2465 commit 775f1ff
Show file tree
Hide file tree
Showing 4 changed files with 392 additions and 124 deletions.

0 comments on commit 775f1ff

Please sign in to comment.